# Complete - m-control-plane-edge-wire-baseline/05+04_event_relay_boundary

## 완료 일시

2026-05-30

## 요약

Control Plane-Edge node lifecycle event relay and service boundary completed after 2 review loops; final verdict PASS.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G08_0.log` | `code_review_cloud_G08_0.log` | FAIL | Event relay implementation was broadly complete, but Control Plane receive path accepted stale same-`edge_id` connection events without checking the active connection token. |
| `plan_cloud_G08_1.log` | `code_review_cloud_G08_1.log` | PASS | Token-aware event recording and stale reconnect regression test closed the Required issue. |

## 구현/정리 내용

- Added Control Plane parser/receive/store support for relayed `EdgeNodeEvent` messages and a bounded copied recent event buffer.
- Added Edge connector relay wiring from `events.Bus.SubscribeAllNodes()` through the Control Plane connection without importing Edge node registry/run/command internals.
- Added `/edges/{edge_id}/events` observation surface and tests for event JSON views.
- Added token-aware Control Plane event recording so stale superseded connections cannot pollute recent event snapshots.

## 최종 검증

- `ssh toki@toki-labs.com 'cd /config/workspace/iop && go test -count=1 ./apps/control-plane/internal/wire'` - BLOCKED; remote shell reported `zsh:cd:1: no such file or directory: /config/workspace/iop`.
- `go test -count=1 ./apps/control-plane/internal/wire` - PASS; `ok iop/apps/control-plane/internal/wire`.
- `go test -count=1 ./apps/control-plane/cmd/control-plane ./apps/edge/internal/controlplane ./apps/edge/internal/bootstrap ./apps/edge/internal/events` - PASS; all listed packages passed.
- `go test -race -count=1 ./apps/edge/internal/controlplane ./apps/control-plane/internal/wire` - PASS; both packages passed under race detector.
- `go test ./...` - PASS; repository Go test suite passed with expected no-test packages.
- `make test-control-plane-edge-wire` - PASS; markers included `CP: hello accepted`, `Edge: connected to control plane`, `CP: edge disconnected`, and `Control Plane-Edge wire smoke PASSED.`
- `(rg --sort path -n "apps/edge/internal/node|NodeCommandRequest|RunRequest" apps/edge/internal/controlplane; test $? -eq 1)` - PASS; no boundary matches.

## Roadmap Completion

- Milestone: `agent-roadmap/phase/control-plane-portal-ops/milestones/control-plane-edge-wire-baseline.md`
- Completed task ids:
  - `event-relay`: PASS; evidence=`agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/plan_cloud_G08_0.log`, `agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/code_review_cloud_G08_0.log`, `agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/plan_cloud_G08_1.log`, `agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/code_review_cloud_G08_1.log`; verification=`go test -count=1 ./apps/control-plane/internal/wire`, `go test -race -count=1 ./apps/edge/internal/controlplane ./apps/control-plane/internal/wire`, `make test-control-plane-edge-wire`
  - `service-boundary`: PASS; evidence=`agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/plan_cloud_G08_0.log`, `agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/code_review_cloud_G08_0.log`, `agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/plan_cloud_G08_1.log`, `agent-task/archive/2026/05/m-control-plane-edge-wire-baseline/05+04_event_relay_boundary/code_review_cloud_G08_1.log`; verification=`(rg --sort path -n "apps/edge/internal/node|NodeCommandRequest|RunRequest" apps/edge/internal/controlplane; test $? -eq 1)`
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
