# Complete - m-proto-socket-infrastructure-communication-rail/01_core_endpoint

## 완료 일시

2026-05-30

## 요약

Core proto-socket endpoint foundation task completed after 3 review loops plus a resolved USER_REVIEW dependency decision; final verdict PASS/RESOLVED.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G08_0.log` | `code_review_cloud_G08_0.log` | FAIL | repo-external `replace`, `retryable` 누락, authenticated route test 누락, gofmt 문제 |
| `plan_cloud_G08_1.log` | `code_review_cloud_G08_1.log` | FAIL | follow-up implementation이 placeholder 상태였고 이전 Required가 남음 |
| `plan_cloud_G08_2.log` | `code_review_cloud_G08_2.log` | FAIL | proto-socket module mismatch로 USER_REVIEW 필요 |
| `USER_REVIEW.md` | user decision | PASS/RESOLVED | 원격 proto-socket HEAD pseudo-version으로 `replace` 제거 |

## 구현/정리 내용

- Core HTTP server에 protected `/proto-socket` endpoint, semantic envelope/dispatcher skeleton, websocket lifecycle close를 추가했다.
- `PROTO_SOCKET_*` 설정과 config/router/envelope/server tests를 추가했다.
- `EnvelopeError.retryable` contract와 authenticated `/proto-socket` route exposure test를 반영했다.
- `services/core/go.mod`에서 repo-external proto-socket `replace`를 제거하고 `git.toki-labs.com/toki/proto-socket/go v0.0.0-20260530100557-fed0da37fa1a`로 고정했다.
- contract note에 proto-socket 내부 통신 원칙, endpoint 후보, REST compatibility map을 정리했다.

## 최종 검증

- `GOPRIVATE=git.toki-labs.com/toki go mod tidy` in `services/core` - PASS; 출력 없음.
- `GOPRIVATE=git.toki-labs.com/toki go list -m git.toki-labs.com/toki/proto-socket/go` in `services/core` - PASS; `git.toki-labs.com/toki/proto-socket/go v0.0.0-20260530100557-fed0da37fa1a`.
- `gofmt -l services/core/internal/config/config.go services/core/internal/protosocket/envelope.go services/core/internal/protosocket/envelope_test.go services/core/internal/protosocket/server_test.go services/core/internal/http/middleware_test.go` - PASS; 출력 없음.
- `git diff --check` - PASS; 출력 없음.
- `cd services/core && go test -count=1 ./...` - PASS; 출력은 `code_review_cloud_G08_2.log`에 기록됨. 현재 리뷰 에이전트는 local test 금지 규칙 때문에 재실행하지 않음.

## 잔여 Nit

- 없음

## 후속 작업

- 없음
