iop/agent-test/dev-corp/testing-smoke.md
toki d6dd3da59d docs(dev-corp): Control Plane 검증 기준을 갱신한다
native Control Plane이 활성화된 provider-pool 상태와 capacity smoke 결과를 dev-corp 테스트 규칙과 인벤토리에 반영한다.
2026-07-02 16:07:26 +09:00

113 lines
6.1 KiB
Markdown

---
test_env: dev-corp
test_profile: testing-smoke
domain: testing
verification_type: smoke
last_rule_updated_at: 2026-07-02
---
# testing-smoke dev-corp 테스트
## 읽기 조건
- `Makefile`, `scripts/dev/**`, `scripts/e2e-*.sh`, bootstrap pack, 테스트/검증 절차, dev-corp compose/profile 변경 판단이 필요한 경우
## 적용 범위
- `Makefile`
- `scripts/dev/edge.sh`
- `scripts/dev/node.sh`
- `scripts/e2e-smoke.sh`
- `scripts/e2e-openai-ollama.sh`
- `iop-edge bootstrap pack`
- `docker-compose.yml`
- `.env.dev-corp.example` 또는 dev-corp compose override
- `agent-test/dev-corp/**`
## 분류
- domain: testing
- verification_type: smoke
- scope: dev-corp 테스트 도구, 보조 smoke, full-cycle 실제 구동 기준
## 환경
- host: local checkout. Flutter client 포함 검증, Docker compose, field/bootstrap, artifact server, external provider evidence가 필요하면 mac-mini runner를 사용한다.
- port: web/dev preview `13002`, artifact/bootstrap HTTP 후보 `18085`, Edge OpenAI-compatible HTTP 후보 `18086`, Client WS `19004`, CP-Edge wire `19005`, compose Edge-Node TCP transport `19006`, native Edge-Node TCP 후보 `18087`, Edge metrics 후보 `19102`.
- runtime: Go `1.24`
- package manager: Go modules / Makefile
- docker: quick check는 Docker를 요구하지 않는다. 현재 작업 컨테이너에서는 Docker-in-Docker를 사용하지 않으며, Docker compose 검증은 mac-mini 환경에서 수행한다.
- external service: dev-corp Control Plane 후보는 mac-mini local 기준 `http://127.0.0.1:18002`, 외부 후보 `http://172.24.63.178:18002`이다. Client wire 후보는 mac-mini local 기준 `ws://127.0.0.1:19004/client`, 외부 후보 `ws://172.24.63.178:19004/client`이다. dev-corp Edge runtime 후보는 `172.24.63.178:18087` 또는 host별 reverse SSH tunnel이다.
- model endpoint: dev-corp OpenAI-compatible base URL 후보 `http://172.24.63.178:18086/v1`
- credential: token/secret/API key 원문은 문서에 기록하지 않는다.
## 명령
- setup:
- lint:
- unit: `make test`
- smoke: `./scripts/e2e-smoke.sh`
- compose-smoke: mac-mini 환경에서 `IOP_EDGE_NODE_TOKEN`을 안전하게 주입한 뒤 `docker compose --env-file .env.dev-corp.example up -d postgres redis control-plane edge web`
- compose-health: `curl -fsS http://127.0.0.1:18002/healthz`
- control-plane-status: mac-mini에서 `curl -fsS http://127.0.0.1:18002/edges/dev-corp-edge/status`
- provider-health: mac-mini에서 `curl -fsS http://192.168.2.2:8002/health`, `curl -fsS http://192.168.2.4:8004/health`, `curl -fsS http://192.168.2.3:8004/health`
- e2e: `make test-e2e`
- model: `./scripts/e2e-openai-ollama.sh` 또는 dev-corp OpenAI-compatible smoke
- full-cycle: `make pack-node-target`, repo 내부 edge-node 진단, field bootstrap UX, 실제 provider pool 검증
## 필수 검증
- 테스트 도구 자체를 바꾼 경우 해당 도구를 직접 실행해 성공/실패 판정을 확인한다.
- 사용자 실행 파이프라인에 닿는 변경은 일반 Go 테스트와 변경 범위에 맞는 full-cycle 실제 구동을 함께 검증한다.
- dev-corp compose/profile 변경 시 `docker compose --env-file .env.dev-corp.example config`로 렌더링된 host publish 포트와 network name을 확인한다.
- `iop-edge bootstrap pack`, `make pack-edge`, 내장 artifact server 변경 시 현재 host target build와 artifact/checksum/bootstrap script를 확인한다.
- field/bootstrap/deploy 작업은 one-line bootstrap UX 기준을 적용한다.
- 사용자에게 전달하는 Node bootstrap 명령은 완성된 URL과 token positional value 하나만 포함한다.
- dev-corp provider-pool 작업은 mac-mini에서 provider direct endpoint health를 먼저 확인한다.
- dev-corp native provider-pool capacity 검증은 Control Plane status의 `provider_snapshots`에서 `in_flight`/`queued`를 관측한다.
## 보조 검증
- `make test-e2e`, `./scripts/e2e-smoke.sh`, `./scripts/e2e-openai-ollama.sh`는 보조 smoke다.
- 보조 smoke는 full-cycle 실제 구동이나 field bootstrap 검증을 대체하지 않는다.
## 판정 기준
- dev-corp compose는 `COMPOSE_PROJECT_NAME=iop-dev-corp-agent``IOP_COMPOSE_NETWORK=iop-dev-corp-agent-net`을 사용한다.
- dev-corp compose가 local/test/dev 포트를 점유하지 않는다.
- edge console에서 메시지 2회가 각각 기대 payload를 포함한 `[node-*-message]`로 표시되고, command 결과가 edge 화면에 도착한다.
- node 로컬 `[node-message]` payload 라인 목록과 edge `[node-*-message]` payload 라인 목록이 run별로 내용/순서까지 동일해야 한다.
- Node bootstrap UX는 Edge가 출력한 완성된 bootstrap URL과 실제 positional token 값 하나만 포함하는 한 줄 명령 형태를 유지한다.
- dev-corp provider pool의 기본 endpoint 3개가 mac-mini에서 `/health``/v1/models`에 성공 응답한다.
- native Control Plane이 활성화된 provider-pool 검증에서는 `dev-corp-edge`가 connected이고 capacity smoke 완료 후 provider `in_flight=0`, `queued=0`으로 회복해야 한다.
## 기준 출력 예시
```text
docker compose --env-file .env.dev-corp.example config
curl -fsS http://127.0.0.1:18002/healthz
curl -fsS http://192.168.2.2:8002/v1/models
```
## 차단 기준
- mac-mini 접근, 지정 port, provider 상태가 없어 필수 검증을 수행할 수 없다.
- mac-mini에 `/Users/fe/agent-work/iop-dev-corp` checkout이 없다.
- 사용자가 명시하지 않았는데 code-server 컨테이너 재시작이 필요한 상황이다.
- dev-corp 포트가 이미 사용 중이라 local/test/dev stack과 공존할 수 없다.
## 보고 항목
- 실행한 명령:
- 성공한 검증:
- 실패/차단된 검증:
- 생략 사유:
- 남은 위험:
## 금지 사항
- 보조 E2E smoke 통과만으로 완료 처리하지 않는다.
- 사용자 기본 경로에서 `IOP_ARTIFACT_BASE_URL=...`, `IOP_EDGE_ADDR=...`, `IOP_NODE_TOKEN=...` 같은 named environment parameter를 요구하지 않는다.
- 사용자가 명시하지 않으면 code-server 컨테이너를 재시작하지 않는다.
- 환경값을 사람용 docs나 roadmap에 복사하지 않는다.
- secret, token, API key 원문은 tracked 파일에 기록하지 않는다.