105 lines
5.6 KiB
Markdown
105 lines
5.6 KiB
Markdown
---
|
|
test_env: dev-corp
|
|
test_profile: control-plane-smoke
|
|
domain: control-plane
|
|
verification_type: smoke
|
|
last_rule_updated_at: 2026-07-02
|
|
---
|
|
|
|
# control-plane-smoke dev-corp 테스트
|
|
|
|
## 읽기 조건
|
|
|
|
- `apps/control-plane/**` 변경 또는 dev-corp Control Plane health/readiness, config loading, wire endpoint 검증 판단이 필요한 경우
|
|
|
|
## 적용 범위
|
|
|
|
- `apps/control-plane/cmd/control-plane/**`
|
|
- `apps/control-plane/internal/wire/**`
|
|
- `apps/control-plane/Dockerfile`
|
|
- Control Plane HTTP health/readiness와 proto-socket WebSocket hello baseline
|
|
- Control Plane-Edge TCP wire endpoint, Edge outbound hello, disconnect baseline
|
|
- dev-corp compose host publish와 DB/Redis 분리
|
|
|
|
## 분류
|
|
|
|
- domain: control-plane
|
|
- verification_type: smoke
|
|
- scope: dev-corp control-plane HTTP와 wire baseline
|
|
|
|
## 환경
|
|
|
|
- host: Docker compose 또는 Flutter client가 포함된 runtime evidence는 mac-mini `ssh fe@172.24.63.178`의 `/Users/fe/agent-work/iop-dev-corp` 기준으로 수행한다.
|
|
- port: Control Plane HTTP `18002`, Client WS `19004`, CP-Edge wire `19005`, Edge-Node TCP transport `19006`, web/dev preview `13002`.
|
|
- runtime: Go `1.24`, Docker compose
|
|
- package manager: Go modules / Makefile
|
|
- docker: compose 검증은 mac-mini에서 `.env.dev-corp.example` 기준으로 수행한다. 파일 생성 전에는 compose 검증을 차단으로 보고한다. provider-pool native runtime 검증은 `build/dev-corp-runtime/bin/control-plane`과 env override를 사용할 수 있다.
|
|
- external service: postgres host publish `15402`, redis host publish `16302`
|
|
- model endpoint:
|
|
- credential: DB/Redis credential 원문은 문서에 기록하지 않는다.
|
|
|
|
## 명령
|
|
|
|
- setup: mac-mini 환경에서 `IOP_EDGE_NODE_TOKEN`을 안전하게 주입한 뒤 `docker compose --env-file .env.dev-corp.example up -d postgres redis control-plane edge web`
|
|
- setup-native: mac-mini `/Users/fe/agent-work/iop-dev-corp`에서 `IOP_LISTEN=0.0.0.0:18002 IOP_WIRE_LISTEN=0.0.0.0:19004 IOP_EDGE_WIRE_LISTEN=0.0.0.0:19005 build/dev-corp-runtime/bin/control-plane serve --config configs/control-plane.yaml`
|
|
- lint:
|
|
- unit: `go test ./apps/control-plane/...`
|
|
- smoke: `curl -fsS http://127.0.0.1:18002/healthz`, `curl -fsS http://127.0.0.1:18002/readyz`, `curl -fsS http://127.0.0.1:18002/edges/dev-corp-edge/status`
|
|
- e2e: `make test-control-plane-edge-wire`는 보조 smoke이며 기본 포트를 쓰는 스크립트이므로 dev-corp 포트 override 가능 여부를 먼저 확인한다.
|
|
- model:
|
|
- full-cycle: Control Plane command, health/readiness, wire hello 수동 검증
|
|
|
|
## 필수 검증
|
|
|
|
- 변경한 control-plane 패키지 또는 `go test ./apps/control-plane/...`를 실행한다.
|
|
- HTTP lifecycle 변경 시 dev-corp port `/healthz`와 `/readyz`를 확인한다.
|
|
- Client-Control Plane wire protocol 변경 시 proto-socket WebSocket hello baseline을 dev-corp wire port `19004` 기준으로 확인한다.
|
|
- Control Plane-Edge TCP wire, Edge outbound connector, registry lifecycle 변경 시 dev-corp `19005` 기준으로 hello accepted, Edge connected, Edge disconnected marker를 확인한다.
|
|
|
|
## 보조 검증
|
|
|
|
- docker compose control-plane service healthcheck를 확인한다.
|
|
- Edge 포함 compose 검증에서는 `IOP_EDGE_NODE_TOKEN`을 mac-mini 환경에서 주입하고, token 원문은 tracked 파일에 기록하지 않는다.
|
|
|
|
## 2026-07-02 native Control Plane 상태
|
|
|
|
- mac-mini provider-pool runtime에서 Control Plane native binary `build/dev-corp-runtime/bin/control-plane`을 `18002/19004/19005` dev-corp 포트로 실행한다.
|
|
- Edge config는 `control_plane.enabled=true`, `wire_addr=127.0.0.1:19005`이며 Edge id는 `dev-corp-edge`다.
|
|
- `/edges`에서 `dev-corp-edge`가 `connected=true`로 관측된다.
|
|
- `/edges/dev-corp-edge/status`는 Edge-owned snapshot을 반환하며 3개 provider node의 `provider_snapshots`를 포함한다. 이 status는 provider capacity smoke의 `in_flight`/`queued` evidence 기준이다.
|
|
- 2026-07-02 mac-mini runtime capacity smoke에서 `/v1/responses`와 `/v1/chat/completions` 모두 peak total `in_flight=13`, `queued=3`, 완료 후 provider별 `in_flight=0`, `queued=0` 회복을 확인했다. 이 기록은 historical evidence이며, current public Edge provider-pool 표준 smoke는 `/v1/chat/completions`만 사용한다.
|
|
|
|
## 판정 기준
|
|
|
|
- control-plane service가 dev-corp stack으로 기동되고 health endpoint가 성공 응답을 반환한다.
|
|
- wire endpoint는 Control Plane 브라우저/앱 경계로 유지되고 Node 직접 연결/스케줄링 경로로 확장되지 않는다.
|
|
- dev-corp stack은 local/test/dev stack의 host publish 포트를 점유하지 않는다.
|
|
|
|
## 기준 출력 예시
|
|
|
|
```text
|
|
curl -fsS http://127.0.0.1:18002/healthz
|
|
curl -fsS http://127.0.0.1:18002/readyz
|
|
```
|
|
|
|
## 차단 기준
|
|
|
|
- mac-mini runner checkout 또는 docker compose 실행 권한이 없다.
|
|
- `.env.dev-corp.example` 또는 compose override가 없어 dev-corp compose stack을 렌더링할 수 없다.
|
|
- 현재 작업 컨테이너에서 Docker-in-Docker가 필요해지는 검증은 수행하지 않고 mac-mini runner 차단으로 보고한다.
|
|
- 실제 DB/Redis credential 확인이 필요한데 안전하게 제공되지 않았다.
|
|
- dev-corp 포트가 이미 점유되어 local/test/dev stack과 공존할 수 없다.
|
|
|
|
## 보고 항목
|
|
|
|
- 실행한 명령:
|
|
- 성공한 검증:
|
|
- 실패/차단된 검증:
|
|
- 생략 사유:
|
|
- 남은 위험:
|
|
|
|
## 금지 사항
|
|
|
|
- Control Plane에서 Node 직접 연결이나 직접 스케줄링을 제품 기본 계약으로 만들지 않는다.
|
|
- 실제 DB/Redis credential이나 private endpoint를 tracked docs/rules에 기록하지 않는다.
|
|
- secret, token, API key 원문은 tracked 파일에 기록하지 않는다.
|