# Complete - m-multi-edge-operations/03+01,02_control_plane_fleet_api

## 완료 일시

2026-06-04

## 요약

Control Plane Fleet API 구현을 1회 리뷰 루프로 검토했고 최종 판정은 PASS다.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_cloud_G06_0.log` | `code_review_cloud_G06_0.log` | PASS | Multi-edge command API, command result/event relay, fleet status summary API, bounded audit 저장, edge별 command routing이 계획 범위를 충족했다. |

## 구현/정리 내용

- Control Plane HTTP API에 `/edges/{id}/status`, `/edges/{id}/operations`, `POST /edges/{id}/commands`, `/fleet/status`, `POST /fleet/commands`를 추가했다.
- `EdgeServer.SendCommand`와 `EdgeRegistry` command audit/event view를 추가해 target Edge의 active client로만 command를 보내고 result/event를 bounded in-memory view로 보관한다.
- API 응답은 connection/control/audit summary와 Edge-provided capability/domain-agent summary로 제한하고 Edge 설정, Node registry, runtime 원본 복제를 피했다.
- command routing, offline error, command lifecycle event relay, bounded audit copy, fleet status/command fan-out, 기존 Edge list/status/events 회귀 테스트를 보강했다.

## 최종 검증

- `git diff --check` - PASS; 출력 없음.
- `go test -count=1 ./apps/control-plane/internal/wire ./apps/control-plane/cmd/control-plane` - PASS; `iop/apps/control-plane/internal/wire` 1.494s, `iop/apps/control-plane/cmd/control-plane` 0.016s.
- `go test -count=1 ./apps/control-plane/...` - PASS; `cmd/control-plane`와 `internal/wire` 통과.
- `go test -count=1 ./apps/edge/internal/controlplane` - PASS; `iop/apps/edge/internal/controlplane` 4.453s.
- `go test -count=1 ./apps/control-plane/internal/wire -run 'TestEdgeServer(SendsCommandToTargetEdgeOnly|RecordsCommandLifecycleEventsFromEdge|SendCommandFailsWhenEdgeNotConnected)|TestEdgeRegistryCommandsAreBoundedAndCopied'` - PASS; `iop/apps/control-plane/internal/wire` 0.187s.
- `make test-control-plane-edge-wire` - PASS; Control Plane-Edge wire smoke에서 hello accepted, connected to control plane, edge disconnected marker를 확인했다.

## 잔여 Nit

- 없음

## 후속 작업

- 없음
