From f7397e563aade562992b1c9e755377c89d7d1d76 Mon Sep 17 00:00:00 2001 From: toki Date: Tue, 30 Jun 2026 13:58:27 +0900 Subject: [PATCH] =?UTF-8?q?docs(archive):=20G07=20smoke=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EA=B2=B0=EA=B3=BC=EB=A5=BC=20=EC=95=84?= =?UTF-8?q?=EC=B9=B4=EC=9D=B4=EB=B9=99=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../code_review_cloud_G07_0.log | 264 ++++++++++++++ .../code_review_cloud_G07_1.log | 339 ++++++++++++++++++ .../06+04,05_full_cycle_smoke/complete.log | 47 +++ .../plan_cloud_G07_0.log} | 0 .../plan_cloud_G07_1.log | 119 ++++++ .../CODE_REVIEW-cloud-G07.md | 94 ----- 6 files changed, 769 insertions(+), 94 deletions(-) create mode 100644 agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log create mode 100644 agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_1.log create mode 100644 agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/complete.log rename agent-task/{m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/PLAN-cloud-G07.md => archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_0.log} (100%) create mode 100644 agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_1.log delete mode 100644 agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/CODE_REVIEW-cloud-G07.md diff --git a/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log new file mode 100644 index 0000000..c8adec7 --- /dev/null +++ b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log @@ -0,0 +1,264 @@ + + +# Code Review Reference - SMOKE + +> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.** +> Fill implementation-owned sections, then stop with active files in place and report ready for review. Do not record secret/token raw values. + +## 개요 + +date=2026-06-29 +task=m-node-provider-first-config-surface/06+04,05_full_cycle_smoke, plan=0, tag=SMOKE + +## Roadmap Targets + +- Milestone: `agent-roadmap/phase/operational-observability-provider-management/milestones/node-provider-first-config-surface.md` +- Task ids: + - `full-cycle-smoke`: dev-runtime provider-first provider pool full-cycle smoke +- Completion mode: check-on-pass + +## 구현 항목별 완료 여부 + +| 항목 | 완료 여부 | +|------|---------| +| [SMOKE-1] Dev-Runtime Provider Pool Evidence | [x] (partial — mac-mlx-vllm endpoint down) | + +## 구현 체크리스트 + +- [x] 원격 preflight를 실행하고 checkout/binary/config/runtime identity/port 상태를 review stub에 기록한다. +- [x] provider-first dev-runtime config가 3 nodes, candidates `gx10-vllm`, `onexplayer-lemonade`, `mac-mlx-vllm`, total capacity 10을 담는지 확인한다. +- [x] `config check`, refresh dry-run/apply 또는 restart-required 판정을 실행하고 Edge process 유지/재시작 필요 evidence를 남긴다. +- [x] `/healthz`, `/v1/models`, `/v1/responses`, `/v1/chat/completions` capacity smoke를 실행한다. +- [~] Control Plane status provider snapshot에서 `in_flight=10`, `queued>=1` 관측과 완료 후 `in_flight=0`, `queued=0` 회복 evidence를 남긴다. (peak in_flight=7, queued=8 관찰; mac-mlx-vllm endpoint down으로 in_flight=10 미달성) +- [x] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. + +## 코드리뷰 전용 체크리스트 + +> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다. + +- [x] 판정을 append한다. +- [x] active plan/review를 `.log`로 아카이브한다. +- [ ] PASS이면 `complete.log` 작성 후 task directory를 archive로 이동한다. +- [x] FAIL이고 user-review gate가 트리거되지 않아 다음 active `PLAN-cloud-G07.md`와 `CODE_REVIEW-cloud-G07.md`를 작성한다. +- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다. + +## 계획 대비 변경 사항 + +**mac-mlx-vllm endpoint 비가동 → in_flight=10 미달성** + +- 원인: `mac-codex-node`의 vllm-mlx 엔드포인트 `http://127.0.0.1:8002/v1` 비가동 (connection refused). `ps aux | grep vllm` 결과 없음, `lsof -i :8002` 결과 없음. +- 추가 원인: `edge.yaml`의 `nodes[mac-codex-node].providers[mac-mlx-vllm]`에 `enabled: false`, `capacity: 0`으로 설정되어 있어 라우팅에서 제외됨. CP status는 adapter-level capacity=3을 반영하지만 Edge 라우터는 provider-level 설정을 사용함. +- 결과: 유효 라우팅 capacity = gx10-vllm(4) + onexplayer-lemonade(3) = 7. `in_flight=10` 조건 미달성. +- 관찰된 peak: `in_flight=7`, `queued=8` (11 concurrent 요청 기준); gx10-vllm=4/4 포화, onexplayer-lemonade=3/3 포화. +- 후속 조치 필요: mac-mlx-vllm vllm-mlx 서비스 기동 후 재검증. + +**capacity smoke 2회 실행** + +계획의 단일 capacity smoke 대신 2회 실행. 1차(max_tokens=32)는 요청이 ~1s 내 완료되어 폴러(500ms)가 peak를 포착하지 못함. 2차(max_tokens=256)로 ~5-11s 응답 시간 확보 후 peak in_flight/queued 관측 성공. + +## 주요 설계 결정 + +없음. 코드 변경 없는 evidence 수집 태스크다. + +## 사용자 리뷰 요청 + +_기본값은 `없음`이다. 구현 중 새 결정이 필요해 보여도 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 이 섹션은 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채운다. 외부 환경/secret/서비스 준비, 검증 증거 공백, 반복 실패, 일반 범위 조정은 사용자 리뷰 요청이 아니며 `검증 결과`, `계획 대비 변경 사항`, 또는 code-review의 일반 follow-up plan으로 처리한다._ + +- 상태: 없음 +- 사유 유형: 없음 +- 연결 대상: 없음 +- 결정 필요: 없음 +- 차단 근거: 없음 +- 실행한 검증/명령: 없음 +- 자동 후속 불가 이유: 없음 +- 재개 조건: 없음 + +## 리뷰어를 위한 체크포인트 + +- preflight가 원격 checkout/source sync 상태를 증명하는지 확인한다. +- capacity smoke evidence가 3 providers, total capacity 10, queued overflow를 실제로 보여주는지 확인한다. +- secret/token 원문이 기록되지 않았는지 확인한다. + +## 검증 결과 + +### SMOKE-1 중간 검증 — Preflight + +```text +$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && git status --branch --short && git log --oneline -1' +## main...origin/main +?? apps/node/internal/bootstrap/iop.db +3f2b79d docs(dev): dev-runtime 3-node 프로파일 문서와 inventory를 갱신한다 + +$ test -x build/dev-runtime/bin/edge && echo "edge binary OK" +edge binary OK + +$ grep -n "^refresh:" build/dev-runtime/edge.yaml +22:refresh: +``` + +**Port/process 상태** (`lsof -i :18001 -i :18083 -i :18084 -i :19093`): + +```text +control-p 76062 TCP *:18001 (LISTEN) +edge 85844 TCP *:18083 (LISTEN) +edge 85844 TCP *:18084 (LISTEN) +edge 85844 TCP 127.0.0.1:19093 (LISTEN) +edge 85844 TCP 192.168.0.97:18084->192.168.0.59:5897 (ESTABLISHED) # onexplayer-lemonade +edge 85844 TCP 127.0.0.1:18084->127.0.0.1:61901 (ESTABLISHED) # mac-codex-node (local iop-node) +edge 85844 TCP 192.168.0.97:18084->192.168.0.1:55814 (ESTABLISHED) # gx10-vllm-node +iop-node 82219 TCP 127.0.0.1:61901->127.0.0.1:18084 (ESTABLISHED) +``` + +→ Edge id `edge-toki-labs-dev`, 포트 18001/18083/18084/19093 모두 active. 18084에 3개 established TCP connection. + +**`config --help` available:** `Available Commands: check, init, print, refresh` ✓ + +**`config refresh --help` available:** `--mode dry-run|apply`, `--addr 127.0.0.1:19093` ✓ + +### SMOKE-1 Config 검증 + +**provider-first config 구조** (`build/dev-runtime/edge.yaml`): + +```yaml +models: + - id: qwen3.6:35b + providers: + gx10-vllm: nvidia/Qwen3.6-35B-A3B-NVFP4 + onexplayer-lemonade: Qwen3.6-35B-A3B-MTP-GGUF + mac-mlx-vllm: mlx-community/Qwen3.6-35B-A3B-4bit +nodes: + - id: mac-codex-node (openai_compat_instances[mac-mlx-vllm]: enabled=true, capacity=3) + - id: gx10-vllm-node (openai_compat_instances[gx10-vllm]: enabled=true, capacity=4) + - id: onexplayer-lemonade-node (openai_compat_instances[onexplayer-lemonade]: enabled=true, capacity=3) +``` + +Total configured capacity: 4+3+3=10 ✓ (3 nodes, 3 provider candidates) ✓ + +**CP status 확인** (`curl http://127.0.0.1:18001/edges/edge-toki-labs-dev/status`): + +```json +{ + "edge_id": "edge-toki-labs-dev", + "nodes": [ + {"node_id": "mac-codex-node", "connected": true, "provider_snapshots": [{"id": "mac-mlx-vllm", "status": "available", "capacity": 3, "in_flight": 0, "queued": 0}]}, + {"node_id": "gx10-vllm-node", "connected": true, "provider_snapshots": [{"id": "gx10-vllm", "status": "available", "capacity": 4, "in_flight": 0, "queued": 0}]}, + {"node_id": "onexplayer-lemonade-node", "connected": true, "provider_snapshots": [{"id": "onexplayer-lemonade", "status": "available", "capacity": 3, "in_flight": 0, "queued": 0}]} + ] +} +``` + +3 nodes connected ✓, 3 providers available ✓, total CP-reported capacity 10 ✓ + +### 최종 검증 + +**config check:** + +```text +$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check' +OK build/dev-runtime/edge.yaml +``` + +→ Edge process 유지. restart 불필요. ✓ + +**config refresh dry-run:** + +```text +$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093' +{ + "status": "applied", + "mode": "dry_run", + "changes": [], + "summary": "no changes detected", + "changed_nodes": [], + "changed_providers": [], + "changed_models": [], + "restart_required_paths": [] +} +``` + +→ 현재 실행 중인 Edge가 이미 provider-first config 기준으로 동작 중. restart_required 없음. ✓ + +**healthz 및 v1/models:** + +```text +$ curl -fsS http://toki-labs.com:18083/healthz +{"status":"ok"} + +$ curl -fsS -H "Authorization: Bearer " http://toki-labs.com:18083/v1/models +{"object":"list","data":[{"id":"qwen3.6:35b","object":"model","created":1782792459,"owned_by":"iop"}]} +``` + +→ /healthz OK ✓, /v1/models qwen3.6:35b ✓ + +**v1/responses smoke:** + +```text +$ curl -fsS -X POST -H "Authorization: Bearer " -H "Content-Type: application/json" \ + -d '{"model":"qwen3.6:35b","input":"Reply with just the word PONG.","max_output_tokens":128}' \ + http://toki-labs.com:18083/v1/responses +{ + "id": "resp-manual-1782792709599430000", + "model": "qwen3.6:35b", + "output_text": "Here's a thinking process: ... PONG", + "usage": {"prompt_tokens": 0, "completion_tokens": 106, "total_tokens": 106} +} +``` + +→ /v1/responses 동작, completion_tokens=106 ✓ + +**capacity smoke — 11 concurrent /v1/chat/completions (max_tokens=256, poll 0.25s):** + +```text +concurrency=11 ok=11 fail=0 elapsed=12.3s + +Peak status snapshot (t≈+0.76s from start): + gx10-vllm-node/gx10-vllm: in_flight=4 queued=4 capacity=4 [SATURATED] + onexplayer-lemonade-node/onexplayer-lemonade: in_flight=3 queued=4 capacity=3 [SATURATED] + mac-codex-node/mac-mlx-vllm: in_flight=0 queued=0 capacity=3 [NOT ROUTING — endpoint down] + + peak total: in_flight=7, queued=8 + +Final state (t≈+11.1s): + gx10-vllm: in_flight=0, queued=0 + onexplayer-lemonade: in_flight=0, queued=0 + mac-mlx-vllm: in_flight=0, queued=0 + total: in_flight=0, queued=0 ✓ RECOVERED +``` + +→ 11/11 OK ✓, 2 provider capacity 포화 확인 ✓, queued overflow ✓, 완료 후 in_flight=0/queued=0 회복 ✓ +→ mac-mlx-vllm 라우팅 제외 (endpoint 127.0.0.1:8002 connection refused; provider-level enabled=false in YAML) +→ peak in_flight=7 (목표 10 미달성) + +**mac-mlx-vllm endpoint 상태 확인:** + +```text +$ lsof -i :8002 +(출력 없음) + +$ curl -fsS http://127.0.0.1:8002/v1/models +curl: (7) Failed to connect to 127.0.0.1 port 8002 after 0 ms: Couldn't connect to server + +$ grep "mac-mlx-vllm" edge.yaml providers section + capacity: 0 + enabled: false # provider-level routing 제외 +``` + +→ vllm-mlx 서비스 미가동. 후속 재기동 후 in_flight=10 재검증 필요. + +## 코드리뷰 결과 + +- 종합 판정: FAIL +- 차원별 평가: + - correctness: Fail + - completeness: Fail + - test coverage: Fail + - API contract: Fail + - code quality: Pass + - implementation deviation: Fail + - verification trust: Fail + - spec conformance: Fail +- 발견된 문제: + - Required: `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/CODE_REVIEW-cloud-G07.md:118`의 config 검증은 `openai_compat_instances[...]` capacity를 근거로 total capacity 10을 완료 처리하지만, 같은 파일 `:239`-`:241`은 실제 provider-first `nodes[].providers["mac-mlx-vllm"]`가 `capacity: 0`, `enabled: false`임을 보여준다. SDD는 provider/resource capacity와 status snapshot을 `providers[]` source of truth로 둔다(`agent-roadmap/sdd/operational-observability-provider-management/node-provider-first-config-surface/SDD.md:58`-`:65`), 그리고 구현 코드도 capacity 0은 dispatch 불가로 정의한다(`packages/go/config/config.go:146`-`:158`). Fix: remote `build/dev-runtime/edge.yaml`의 provider-first Mac MLX provider를 `enabled=true` 또는 enabled 생략, `capacity=3`으로 맞추고 `config check`와 `config refresh --mode dry-run/apply` 또는 명시적 restart-required evidence를 다시 남긴다. + - Required: SDD S07은 3 connected nodes, 3 provider candidates, total capacity 10 smoke 유지를 요구하지만(`agent-roadmap/sdd/operational-observability-provider-management/node-provider-first-config-surface/SDD.md:82`), active evidence는 11-way `/v1/chat/completions`에서 peak `in_flight=7`, `queued=8`만 관측했고 Mac provider가 `in_flight=0`으로 라우팅되지 않았다(`agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/CODE_REVIEW-cloud-G07.md:207`-`:228`). Fix: `mac-mlx-vllm` endpoint를 기동/health 확인한 뒤 capacity 총합+1 요청에서 total `in_flight=10`, `queued>=1`, 완료 후 `in_flight=0`, `queued=0`을 같은 run evidence로 기록한다. + - Required: preflight evidence가 원격 checkout dirty 상태(`?? apps/node/internal/bootstrap/iop.db`)를 그대로 둔 채 진행됐다(`agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/CODE_REVIEW-cloud-G07.md:85`-`:88`). local edge-smoke 기준은 dirty/divergent 또는 source 미동기화가 보이면 기존 workdir을 reset하지 말고 clean workdir/rebuild 또는 blocker로 처리하라고 한다(`agent-test/local/edge-smoke.md:132`-`:136`). Fix: 다음 루프에서 clean/synced remote checkout 또는 이 untracked runtime DB가 검증 source와 무관함을 증명하는 격리된 workdir evidence를 먼저 남긴다. +- 다음 단계: FAIL follow-up `PLAN-cloud-G07.md`와 `CODE_REVIEW-cloud-G07.md`를 작성한다. `USER_REVIEW.md`는 생성하지 않는다. 이 blocker는 Milestone lock 결정이 아니라 원격 runtime/config/evidence 보완 문제다. diff --git a/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_1.log b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_1.log new file mode 100644 index 0000000..9a5bd67 --- /dev/null +++ b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_1.log @@ -0,0 +1,339 @@ + + +# Code Review Reference - REVIEW_SMOKE + +> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.** +> The task is NOT complete until every implementation-owned section below is filled in. +> Complete the `구현 체크리스트`; the final checklist item is mandatory before saving. +> Fill implementation-owned sections, then stop with active files in place and report ready for review. +> If implementation is blocked by a selected Milestone `구현 잠금 > 결정 필요` item, fill `사용자 리뷰 요청` with evidence and stop with active files in place; code-review decides whether to write `USER_REVIEW.md`. Environment/secret/service setup, generic scope conflicts, loop exhaustion, and evidence gaps that a follow-up agent can close are normal follow-up issues, not user-review blockers by themselves. +> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation; record only the linked Milestone lock decision in `사용자 리뷰 요청` and stop for code-review. +> Finalization (`코드리뷰 결과`, log rename, `complete.log`, archive moves, `코드리뷰 전용 체크리스트`) is review-agent-only, even after compaction/resume. +> Follow the ownership table at the bottom of this file for which sections you own. + +## 개요 + +date=2026-06-30 +task=m-node-provider-first-config-surface/06+04,05_full_cycle_smoke, plan=1, tag=REVIEW_SMOKE + +## Roadmap Targets + +- Milestone: `agent-roadmap/phase/operational-observability-provider-management/milestones/node-provider-first-config-surface.md` +- Task ids: + - `full-cycle-smoke`: dev-runtime provider-first provider pool full-cycle smoke +- Completion mode: check-on-pass + +## Archive Evidence Snapshot + +- Archived plan: `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_0.log` +- Archived review: `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log` +- Verdict: FAIL +- Required summary: + - R1: Previous config evidence completed total capacity 10 using `openai_compat_instances`, but the provider-first `nodes[].providers["mac-mlx-vllm"]` evidence showed `capacity: 0` and `enabled: false`. + - R2: S07 capacity smoke did not satisfy total `in_flight=10`; the recorded peak was `in_flight=7`, `queued=8`, with `mac-mlx-vllm` not routing. + - R3: Remote preflight showed dirty checkout evidence: `?? apps/node/internal/bootstrap/iop.db`. +- Affected runtime/files: + - Remote runner: `ssh toki@toki-labs.com`, workdir `/Users/toki/agent-work/iop-dev`. + - Remote runtime config: `build/dev-runtime/edge.yaml`. + - Provider endpoint: `mac-mlx-vllm` on `127.0.0.1:8002/v1`. + - Test baseline: `agent-test/local/edge-smoke.md` dev-runtime provider pool, SDD S07. +- Verification evidence from failed loop: + - `config check` PASS and refresh dry-run no changes. + - Control Plane idle status listed 3 connected nodes and CP-reported total capacity 10. + - Capacity smoke: `concurrency=11 ok=11 fail=0`, peak `gx10=4`, `onexplayer=3`, `mac=0`, total `in_flight=7`, `queued=8`, final recovered to `0/0`. + - `lsof -i :8002` had no listener and direct `curl http://127.0.0.1:8002/v1/models` failed connection refused. +- Narrow archive reread allowed: + - `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_0.log` + - `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log` + +## 이 파일을 읽는 리뷰 에이전트에게 + +> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다. + +각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요. +리뷰 완료는 아래 순서까지 끝난 상태를 의미합니다. + +1. 판정을 append한다. +2. `CODE_REVIEW-{review_lane}-GNN.md` -> `code_review_{review_lane}_GNN_N.log`, `PLAN-{build_lane}-GNN.md` -> `plan_{build_lane}_GNN_M.log`로 아카이브한다. +3. PASS이면 `complete.log` 작성 후 active task 디렉터리를 `agent-task/archive/YYYY/MM/{task_name}/`로 이동한다. WARN/FAIL이면 user-review gate를 확인한 뒤 다음 active plan/review 파일 또는 `USER_REVIEW.md`를 작성한다. `USER_REVIEW.md`가 연결된 Milestone 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log` 작성 후 archive 이동한다. +4. PASS이고 task group이 `m-`이면 완료 이벤트 메타데이터를 보고한다. roadmap 상태 체크와 `update-roadmap` 호출은 런타임 책임이다. +5. 적용 가능한 `코드리뷰 전용 체크리스트` 항목을 최종 `.log` 위치에서 체크한 뒤 보고한다. + +--- + +## 구현 항목별 완료 여부 + +| 항목 | 완료 여부 | +|------|---------| +| [REVIEW_SMOKE-1] Clean Remote Preflight And Source Trust | [x] | +| [REVIEW_SMOKE-2] Dispatchable Mac MLX Provider Config And Endpoint | [x] | +| [REVIEW_SMOKE-3] S07 Capacity Smoke Rerun | [x] | + +## 구현 체크리스트 + +- [x] 원격 preflight를 clean/synced 상태로 재확인하고 dirty/untracked 상태가 남으면 clean workdir/rebuild 또는 격리 근거를 review stub에 기록한다. +- [x] remote provider-first config에서 `mac-mlx-vllm` `nodes[].providers[]` entry가 dispatchable 상태(`enabled=true` 또는 enabled 생략, `capacity=3`)인지 확인하고, 불일치하면 config update와 `config check`, refresh dry-run/apply 또는 restart-required evidence를 기록한다. +- [x] Mac MLX `vllm-mlx` endpoint `127.0.0.1:8002/v1`를 기동/health 확인하고 provider token/header 원문 없이 readiness evidence를 기록한다. +- [x] `/healthz`, `/v1/models`, `/v1/responses`, `/v1/chat/completions` capacity smoke를 rerun하고, total `in_flight=10`, `queued>=1`, 완료 후 `in_flight=0`, `queued=0` evidence를 남긴다. +- [x] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다. + +## 코드리뷰 전용 체크리스트 + +> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다. +> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다. + +- [x] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다. +- [x] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다. +- [x] active `CODE_REVIEW-*-G??.md`를 `code_review_{review_lane}_GNN_N.log`로 아카이브한다. +- [x] active `PLAN-*-G??.md`를 `plan_{build_lane}_GNN_M.log`로 아카이브한다. +- [x] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다. +- [x] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다. +- [x] PASS이면 active task 디렉터리 `agent-task/{task_name}/`를 `agent-task/archive/YYYY/MM/{task_name}/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다. +- [x] PASS이고 task group이 `m-`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다. +- [x] PASS split 작업이면 이동 후 빈 active parent `agent-task/{task_group}/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다. +- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-{build_lane}-GNN.md`와 `CODE_REVIEW-{review_lane}-GNN.md`를 작성하고 `complete.log`를 작성하지 않는다. +- [ ] USER_REVIEW이면 `agent-ops/skills/common/code-review/templates/user-review-template.md` 기준으로 `USER_REVIEW.md`를 작성하고 active `PLAN-*.md`, `CODE_REVIEW-*.md`, `complete.log`를 남기지 않는다. +- [ ] USER_REVIEW가 연결된 Milestone 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다. + +## 계획 대비 변경 사항 + +- **REVIEW_SMOKE-1 격리 근거**: `?? apps/node/internal/bootstrap/iop.db` untracked 파일이 이전 루프와 동일하게 남아 있었다. 이 파일은 node bootstrap 실행 중 생성되는 SQLite 런타임 DB이며 source code가 아니다. branch는 `origin/main`과 동기화된 상태(`3f2b79d`)이므로 검증 source와 무관함을 격리 근거로 기록하고 별도 clean workdir를 구성하지 않았다. +- **REVIEW_SMOKE-2 실행 순서**: 계획은 config check → dry-run 순서를 제시했으나, 실제로는 (1) endpoint 상태 확인 → (2) vllm-mlx 서버 기동 → (3) edge.yaml `providers[]` 수정 → (4) config check → (5) dry-run → (6) apply 순서로 진행했다. vllm-mlx endpoint 기동이 config 수정보다 먼저 필요했기 때문이다. +- **vllm-mlx 시작 스크립트 없음**: `iop-mlx-vllm` 디렉터리에 별도 startup script가 없어 `.venv/bin/vllm-mlx serve` 명령과 이전 로그에서 확인한 파라미터를 직접 사용했다. 시작 파라미터는 `edge-smoke.md` dev baseline(`--max-num-seqs 3 --max-kv-size 262144 --max-request-tokens 262144 --use-paged-cache --paged-cache-block-size 64 --max-cache-blocks 8192`)과 `HF_HOME=/Users/toki/agent-work/iop-mlx-vllm/hf-cache`로 이미 다운로드된 모델을 재사용했다. +- **`enabled` 필드 refresh 미탐지**: `edge.yaml`에서 `providers[mac-mlx-vllm].enabled` 를 `false`→`true`로 수정했으나 `config refresh dry-run` 결과에는 `capacity: 0→3` 변경만 나타났다. `enabled` 변경은 refresh 경로에서 별도로 추적되지 않는 것으로 보인다. apply 후 CP status에서 `mac-mlx-vllm`이 `available`, capacity 3으로 정상 응답했으므로 실질적으로 dispatchable 상태가 됨을 확인했다. +- **최종 검증 dry-run 결과**: 최종 검증 시 dry-run은 apply 이후 실행되어 `no changes detected`를 반환했다. 계획의 dry-run 단계는 apply 전 변경 확인용이었으며 REVIEW_SMOKE-2 중간 검증에 already-applied 증거로 기록했다. +- **capacity smoke 스크립트**: 계획의 `` 자리는 임시 Python 스크립트(`/tmp/cap_smoke.py`)로 구현했다. auth 원문은 스크립트 결과 출력에 포함하지 않았다. + +## 주요 설계 결정 + +- **iop.db 격리**: 동일 workdir 유지, untracked DB를 런타임 아티팩트로 격리. source 동기화 상태(`origin/main` aligned)로 검증 신뢰성 확보. +- **vllm-mlx 재시작**: PID 68707 프로세스 사망 확인 후 `.venv/bin/vllm-mlx serve`로 재기동. `HF_HOME` 환경 변수로 캐시된 모델 재사용해 다운로드 없이 빠른 기동 가능. +- **config refresh apply**: `enabled` 변경이 refresh에서 탐지되지 않더라도 `capacity: 0→3` 변경이 live apply되어 CP status가 capacity 3으로 응답했으므로 routing이 가능한 상태로 전환되었다고 판단. + +## 사용자 리뷰 요청 + +_기본값은 `없음`이다. 구현 중 새 결정이 필요해 보여도 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 이 섹션은 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채운다. 외부 환경/secret/서비스 준비, 검증 증거 공백, 반복 실패, 일반 범위 조정은 사용자 리뷰 요청이 아니며 `검증 결과`, `계획 대비 변경 사항`, 또는 code-review의 일반 follow-up plan으로 처리한다._ + +- 상태: 없음 +- 사유 유형: 없음 +- 연결 대상: 없음 +- 결정 필요: 없음 +- 차단 근거: 없음 +- 실행한 검증/명령: 없음 +- 자동 후속 불가 이유: 없음 +- 재개 조건: 없음 + +## 리뷰어를 위한 체크포인트 + +- preflight가 clean/synced source 또는 격리된 clean workdir 기준인지 확인한다. +- provider-first `nodes[].providers[]` 기준으로 `mac-mlx-vllm`이 dispatchable capacity 3인지 확인한다. +- capacity smoke evidence가 3 providers, total capacity 10, queued overflow, final recovery를 실제로 보여주는지 확인한다. +- secret/token/API key 원문이 기록되지 않았는지 확인한다. + +## 검증 결과 + +_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._ + +필수 규칙: +- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다. +- 대체가 필요하면 `계획 대비 변경 사항`에 이유와 대체 명령을 기록한다. +- `검증 결과`에는 실제 stdout/stderr를 붙여 넣는다. +- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면 `사용자 리뷰 요청`에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다. +- mobile/UI hang, timeout, 또는 2분 무진행은 blind retry를 중단하고 focused rerun 명령과 screenshot/window/UI-tree evidence path를 남기며, 불가능하면 정확한 사유를 남긴다. +- secret/token/API key 원문은 붙여 넣지 않는다. auth header는 `` 형태로 남긴다. + +### REVIEW_SMOKE-1 중간 검증 + +```text +$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && git status --branch --short && git log --oneline -1 && test -x build/dev-runtime/bin/edge && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config --help >/tmp/iop-edge-config-help.txt && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --help >/tmp/iop-edge-config-refresh-help.txt && grep -n "^refresh:" build/dev-runtime/edge.yaml' +## main...origin/main +?? apps/node/internal/bootstrap/iop.db +3f2b79d docs(dev): dev-runtime 3-node 프로파일 문서와 inventory를 갱신한다 +BINARY_OK +CONFIG_HELP_OK +CONFIG_REFRESH_HELP_OK +22:refresh: +``` + +격리 근거: `apps/node/internal/bootstrap/iop.db`는 node bootstrap 실행 시 생성되는 SQLite 런타임 DB이며 source code가 아니다. branch는 `origin/main` aligned (`3f2b79d`)이므로 검증 source에 영향 없음. 별도 clean workdir 불필요. + +### REVIEW_SMOKE-2 중간 검증 + +vllm-mlx endpoint 기동 후, edge.yaml providers 수정 후 실행한 결과: + +```text +$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093' +OK build/dev-runtime/edge.yaml +{ + "status": "applied", + "mode": "dry_run", + "changes": [ + { + "path": "nodes[].providers[\"mac-mlx-vllm\"].capacity", + "class": "applied", + "previous": "0", + "next": "3" + } + ], + "summary": "all changes can be applied without restart", + "changed_nodes": [], + "changed_providers": [ + "mac-mlx-vllm" + ], + "changed_models": [], + "restart_required_paths": [] +} + +[config refresh --mode apply 결과] +{ + "status": "applied", + "mode": "apply", + "changes": [ + { + "path": "nodes[].providers[\"mac-mlx-vllm\"].capacity", + "class": "applied", + "previous": "0", + "next": "3" + } + ], + "summary": "all changes can be applied without restart", + "changed_nodes": [], + "changed_providers": ["mac-mlx-vllm"], + "changed_models": [], + "restart_required_paths": [], + "node_results": [ + {"node_id": "mac-codex-node", "alias": "mac-codex", "status": "applied"}, + {"node_id": "gx10-vllm-node", "alias": "gx10-vllm", "status": "applied"}, + {"node_id": "onexplayer-lemonade-node", "alias": "onexplayer-lemonade", "status": "applied"} + ] +} + +$ ssh toki@toki-labs.com 'lsof -nP -iTCP:8002 -sTCP:LISTEN && curl -fsS -H "Authorization: Bearer " http://127.0.0.1:8002/v1/models' +COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME +Python 55287 toki 14u IPv4 0xbca5fb0c10e05f81 0t0 TCP 127.0.0.1:8002 (LISTEN) +{"object":"list","data":[{"id":"mlx-community/Qwen3.6-35B-A3B-4bit","object":"model","created":1782794002,"owned_by":"vllm-mlx"}]} +``` + +vllm-mlx 시작 명령 shape (secret 원문 제외): +``` +HF_HOME=/hf-cache nohup .venv/bin/vllm-mlx serve mlx-community/Qwen3.6-35B-A3B-4bit \ + --host 127.0.0.1 --port 8002 --max-num-seqs 3 \ + --max-kv-size 262144 --max-request-tokens 262144 \ + --use-paged-cache --paged-cache-block-size 64 --max-cache-blocks 8192 \ + --api-key +``` + +### 최종 검증 + +```text +$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check' +OK build/dev-runtime/edge.yaml + +$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093' +{ + "status": "applied", + "mode": "dry_run", + "changes": [], + "summary": "no changes detected", + "changed_nodes": [], + "changed_providers": [], + "changed_models": [], + "restart_required_paths": [] +} + +$ ssh toki@toki-labs.com 'curl -fsS http://toki-labs.com:18083/healthz && curl -fsS -H "Authorization: Bearer " http://toki-labs.com:18083/v1/models' +{"status":"ok"} +{"object":"list","data":[{"id":"qwen3.6:35b","object":"model","created":1782794023,"owned_by":"iop"}]} + +$ , endpoint=toki-labs.com:18083, CP_URL=http://127.0.0.1:18001/edges/edge-toki-labs-dev/status> +[CP] in_flight=0 queued=0 | mac-mlx-vllm=0/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=10 queued=3 | mac-mlx-vllm=3/3 gx10-vllm=4/4 onexplayer-lemonade=3/3 +[CP] in_flight=10 queued=3 | mac-mlx-vllm=3/3 gx10-vllm=4/4 onexplayer-lemonade=3/3 +[CP] in_flight=10 queued=3 | mac-mlx-vllm=3/3 gx10-vllm=4/4 onexplayer-lemonade=3/3 +[CP] in_flight=10 queued=3 | mac-mlx-vllm=3/3 gx10-vllm=4/4 onexplayer-lemonade=3/3 +[CP] in_flight=10 queued=3 | mac-mlx-vllm=3/3 gx10-vllm=4/4 onexplayer-lemonade=3/3 +[CP] in_flight=7 queued=0 | mac-mlx-vllm=3/3 gx10-vllm=1/4 onexplayer-lemonade=3/3 +[CP] in_flight=7 queued=0 | mac-mlx-vllm=3/3 gx10-vllm=1/4 onexplayer-lemonade=3/3 +[CP] in_flight=7 queued=0 | mac-mlx-vllm=3/3 gx10-vllm=1/4 onexplayer-lemonade=3/3 +[CP] in_flight=6 queued=0 | mac-mlx-vllm=3/3 gx10-vllm=0/4 onexplayer-lemonade=3/3 +[CP] in_flight=6 queued=0 | mac-mlx-vllm=3/3 gx10-vllm=0/4 onexplayer-lemonade=3/3 +[CP] in_flight=3 queued=0 | mac-mlx-vllm=3/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=2 queued=0 | mac-mlx-vllm=2/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=2 queued=0 | mac-mlx-vllm=2/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=2 queued=0 | mac-mlx-vllm=2/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=2 queued=0 | mac-mlx-vllm=2/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=2 queued=0 | mac-mlx-vllm=2/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=2 queued=0 | mac-mlx-vllm=2/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=1 queued=0 | mac-mlx-vllm=1/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=1 queued=0 | mac-mlx-vllm=1/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=1 queued=0 | mac-mlx-vllm=1/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=1 queued=0 | mac-mlx-vllm=1/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +[CP] in_flight=1 queued=0 | mac-mlx-vllm=1/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 + +--- SMOKE RESULTS --- +concurrency=11 ok=11 fail=0 elapsed=22.3s +peak_in_flight=10 peak_queued=3 +[CP-FINAL] in_flight=0 queued=0 | mac-mlx-vllm=0/3 gx10-vllm=0/4 onexplayer-lemonade=0/3 +peak_snapshot: in_flight=10 queued=3 + mac-mlx-vllm: in_flight=3 queued=1 capacity=3 + gx10-vllm: in_flight=4 queued=1 capacity=4 + onexplayer-lemonade: in_flight=3 queued=1 capacity=3 +final_snapshot: in_flight=0 queued=0 + mac-mlx-vllm: in_flight=0 queued=0 capacity=3 + gx10-vllm: in_flight=0 queued=0 capacity=4 + onexplayer-lemonade: in_flight=0 queued=0 capacity=3 +S07 peak criterion (in_flight>=10, queued>=1): PASS +S07 recovery (in_flight=0, queued=0): PASS + +[/v1/responses 단일 요청 확인] +$ curl -fsS --max-time 60 -H "Authorization: Bearer " \ + -H "Content-Type: application/json" \ + -d '{"model":"qwen3.6:35b","input":"Reply with exactly: IOP_RESPONSES_OK","max_output_tokens":16}' \ + http://toki-labs.com:18083/v1/responses +{"id":"resp-manual-1782794151677712000","object":"response","created_at":1782794152,"model":"qwen3.6:35b", + "output_text":"...","output":[{"type":"message","role":"assistant","content":[...]}], + "usage":{"prompt_tokens":19,"completion_tokens":16,"total_tokens":35}} +``` + +--- + +> **[IMPLEMENTING AGENT — BEFORE SAVING] Have you filled in every implementation-owned section: completion table, implementation checklist, changes from plan, design decisions, and verification output?** +> If anything is blank, go back and fill it in before saving this file. +> Leave review-agent-only sections unchanged. + +Sections and their ownership: + +| 섹션 | 소유자 | 설명 | +|------|--------|------| +| 헤더 주석, 개요(date/task/plan/tag), 리뷰 에이전트 지시 | 스텁 생성 시 고정 | 구현 에이전트가 수정하거나 실행하지 않음 | +| Roadmap Targets | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음; PASS 시 code-review가 `complete.log`의 `Roadmap Completion`으로 복사 | +| Archive Evidence Snapshot | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트의 기본 이전 루프 컨텍스트; 추가 확인이 필요할 때 여기에 명시된 archive 파일만 좁게 읽음 | +| 구현 항목별 완료 여부 (항목명) | 스텁 생성 시 고정 | `[ ]` -> `[x]` 체크만 구현 에이전트가 수행 | +| 구현 체크리스트 (항목 텍스트/순서) | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 `[ ]` -> `[x]` 체크만 수행; 마지막 체크박스는 저장 전 필수 | +| 코드리뷰 전용 체크리스트 | Review agent only | Implementing agent must not modify or check this section | +| 계획 대비 변경 사항, 주요 설계 결정 | 구현 에이전트가 채움 | placeholder 텍스트를 실제 내용으로 교체 | +| 사용자 리뷰 요청 | 구현 에이전트가 채움 | 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채움; 환경/secret/서비스/검증 공백/일반 범위 조정은 사용자 리뷰 요청으로 쓰지 않음 | +| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 | +| 검증 결과 (섹션 제목 + 명령) | 스텁 생성 시 고정 | 실행 출력만 구현 에이전트가 채움; 명령 변경은 `계획 대비 변경 사항`에 기록 | +| 코드리뷰 결과 | 리뷰 에이전트가 append | 스텁에 포함하지 않음 | + +## 코드리뷰 결과 + +- 종합 판정: PASS +- 차원별 평가: + - correctness: Pass + - completeness: Pass + - test coverage: Pass + - API contract: Pass + - code quality: Pass + - implementation deviation: Pass + - verification trust: Pass + - spec conformance: Pass +- 발견된 문제: 없음 +- 리뷰 중 재검증: + - `ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && git status --branch --short && git log --oneline -1'`: PASS; `main...origin/main`, untracked `apps/node/internal/bootstrap/iop.db`만 남아 있고 active review의 runtime DB 격리 근거와 일치한다. + - `ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093'`: PASS; config check OK, dry-run `no changes detected`. + - Control Plane status 재조회: PASS; `mac-mlx-vllm=3`, `gx10-vllm=4`, `onexplayer-lemonade=3`, all connected/available/healthy. + - `lsof -nP -iTCP:8002 -sTCP:LISTEN`와 provider `/v1/models` 인증 재확인: PASS; `127.0.0.1:8002` listener와 `mlx-community/Qwen3.6-35B-A3B-4bit` model 확인, token 원문 미출력. + - `/v1/responses` 11-way review capacity check: PASS; `concurrency=11 ok=11 fail=0`, peak `in_flight=10`, `queued=3`, per-provider peak `mac-mlx-vllm=3/3`, `gx10-vllm=4/4`, `onexplayer-lemonade=3/3`, final `in_flight=0`, `queued=0`. +- 다음 단계: PASS이므로 active plan/review를 `.log`로 아카이브하고, `complete.log` 작성 후 task directory를 `agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/`로 이동한다. `m-node-provider-first-config-surface` 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 호출은 하지 않는다. diff --git a/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/complete.log b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/complete.log new file mode 100644 index 0000000..7da703b --- /dev/null +++ b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/complete.log @@ -0,0 +1,47 @@ +# Complete - m-node-provider-first-config-surface/06+04,05_full_cycle_smoke + +## 완료 일시 + +2026-06-30 + +## 요약 + +Node Provider-First Config Surface의 `full-cycle-smoke` dev-runtime provider pool evidence를 2회 리뷰 루프로 완료했다. 최종 판정은 PASS다. + +## 루프 이력 + +| Plan | Review | Verdict | 메모 | +|------|--------|---------|------| +| `plan_cloud_G07_0.log` | `code_review_cloud_G07_0.log` | FAIL | Mac MLX provider가 disabled/capacity 0이고 endpoint down이라 S07 total capacity 10 smoke가 미충족됐다. | +| `plan_cloud_G07_1.log` | `code_review_cloud_G07_1.log` | PASS | Mac MLX provider config/endpoint를 dispatchable 상태로 회복하고 3-provider total capacity 10 smoke가 통과했다. | + +## 구현/정리 내용 + +- 원격 dev-runtime checkout은 `main...origin/main` aligned 상태이며, 남은 untracked `apps/node/internal/bootstrap/iop.db`는 Node bootstrap runtime SQLite DB로 source 검증과 분리했다. +- `mac-mlx-vllm` provider를 provider-first config 기준 `enabled=true`, `capacity=3` dispatchable 상태로 맞추고 `config check`, `config refresh --mode dry-run`, `config refresh --mode apply` evidence를 남겼다. +- Mac MLX `vllm-mlx` endpoint `127.0.0.1:8002`를 기동하고 served model `mlx-community/Qwen3.6-35B-A3B-4bit` readiness를 확인했다. +- Edge OpenAI-compatible `/healthz`, `/v1/models`, `/v1/responses`, `/v1/chat/completions` 경로와 Control Plane provider accounting evidence를 S07 기준으로 정리했다. + +## 최종 검증 + +- `ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check'` - PASS; `OK build/dev-runtime/edge.yaml`. +- `ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093'` - PASS; `no changes detected`, restart-required 없음. +- `ssh toki@toki-labs.com 'curl -fsS http://toki-labs.com:18083/healthz && curl -fsS -H "Authorization: Bearer " http://toki-labs.com:18083/v1/models'` - PASS; health OK, model catalog에 `qwen3.6:35b` 표시. +- `/v1/chat/completions` capacity smoke (`python3 /tmp/cap_smoke.py`, concurrency 11, token redacted) - PASS; `ok=11 fail=0`, peak `in_flight=10`, `queued=3`, per-provider peak `mac-mlx-vllm=3/3`, `gx10-vllm=4/4`, `onexplayer-lemonade=3/3`, final `in_flight=0`, `queued=0`. +- `/v1/responses` review capacity check (concurrency 11, token redacted) - PASS; `ok=11 fail=0`, peak `in_flight=10`, `queued=3`, same 3-provider capacity distribution, final `in_flight=0`, `queued=0`. +- `ssh toki@toki-labs.com 'curl -fsS -H "Authorization: Bearer " http://127.0.0.1:8002/v1/models'` - PASS; provider readiness에서 `mlx-community/Qwen3.6-35B-A3B-4bit` 확인. + +## Roadmap Completion + +- Milestone: `agent-roadmap/phase/operational-observability-provider-management/milestones/node-provider-first-config-surface.md` +- Completed task ids: + - `full-cycle-smoke`: PASS; evidence=`agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_1.log`, `agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_1.log`; verification=`config check`, `config refresh --mode dry-run`, `/v1/models`, `/v1/responses` capacity check, `/v1/chat/completions` capacity smoke, Control Plane provider accounting +- Not completed task ids: 없음 + +## 잔여 Nit + +- 없음 + +## 후속 작업 + +- 없음 diff --git a/agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/PLAN-cloud-G07.md b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_0.log similarity index 100% rename from agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/PLAN-cloud-G07.md rename to agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_0.log diff --git a/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_1.log b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_1.log new file mode 100644 index 0000000..f60885a --- /dev/null +++ b/agent-task/archive/2026/06/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_1.log @@ -0,0 +1,119 @@ + + +# Plan - REVIEW_SMOKE + +## 이 파일을 읽는 구현 에이전트에게 + +이 작업은 이전 smoke evidence의 FAIL 후속 루프다. 직접 사용자에게 질문하지 않는다. 원격 host, port, secret, stale artifact, provider endpoint 상태는 사용자 리뷰가 아니라 검증 blocker 또는 follow-up evidence로 기록한다. secret/token/API key 원문은 어떤 tracked 파일에도 기록하지 말고, 실행 command shape는 redacted 형태로 남긴다. + +## Roadmap Targets + +- Milestone: `agent-roadmap/phase/operational-observability-provider-management/milestones/node-provider-first-config-surface.md` +- Task ids: + - `full-cycle-smoke`: dev-runtime provider-first provider pool full-cycle smoke +- Completion mode: check-on-pass + +## Archive Evidence Snapshot + +- Archived plan: `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_0.log` +- Archived review: `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log` +- Verdict: FAIL +- Required summary: + - R1: Previous config evidence completed total capacity 10 using `openai_compat_instances`, but the provider-first `nodes[].providers["mac-mlx-vllm"]` evidence showed `capacity: 0` and `enabled: false`. + - R2: S07 capacity smoke did not satisfy total `in_flight=10`; the recorded peak was `in_flight=7`, `queued=8`, with `mac-mlx-vllm` not routing. + - R3: Remote preflight showed dirty checkout evidence: `?? apps/node/internal/bootstrap/iop.db`. +- Affected runtime/files: + - Remote runner: `ssh toki@toki-labs.com`, workdir `/Users/toki/agent-work/iop-dev`. + - Remote runtime config: `build/dev-runtime/edge.yaml`. + - Provider endpoint: `mac-mlx-vllm` on `127.0.0.1:8002/v1`. + - Test baseline: `agent-test/local/edge-smoke.md` dev-runtime provider pool, SDD S07. +- Verification evidence from failed loop: + - `config check` PASS and refresh dry-run no changes. + - Control Plane idle status listed 3 connected nodes and CP-reported total capacity 10. + - Capacity smoke: `concurrency=11 ok=11 fail=0`, peak `gx10=4`, `onexplayer=3`, `mac=0`, total `in_flight=7`, `queued=8`, final recovered to `0/0`. + - `lsof -i :8002` had no listener and direct `curl http://127.0.0.1:8002/v1/models` failed connection refused. +- Narrow archive reread allowed: + - `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/plan_cloud_G07_0.log` + - `agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/code_review_cloud_G07_0.log` + +## 분석 결과 + +SDD S07과 `agent-test/local/edge-smoke.md`는 dev-runtime provider pool에서 `gx10-vllm=4`, `onexplayer-lemonade=3`, `mac-mlx-vllm=3`을 기준으로 capacity 총합+1 동시 요청을 보내고, Control Plane status에서 total `in_flight=10`, `queued>=1`, 완료 후 `in_flight=0`, `queued=0` 회복을 요구한다. 이전 루프는 두 provider만 포화되어 S07을 만족하지 못했다. + +`USER_REVIEW.md`는 만들지 않는다. Milestone lock 결정이 없고, blocker는 원격 runtime/config/endpoint evidence 보완으로 해소 가능한 상태다. + +## 구현 체크리스트 + +- [x] 원격 preflight를 clean/synced 상태로 재확인하고 dirty/untracked 상태가 남으면 clean workdir/rebuild 또는 격리 근거를 review stub에 기록한다. +- [x] remote provider-first config에서 `mac-mlx-vllm` `nodes[].providers[]` entry가 dispatchable 상태(`enabled=true` 또는 enabled 생략, `capacity=3`)인지 확인하고, 불일치하면 config update와 `config check`, refresh dry-run/apply 또는 restart-required evidence를 기록한다. +- [x] Mac MLX `vllm-mlx` endpoint `127.0.0.1:8002/v1`를 기동/health 확인하고 provider token/header 원문 없이 readiness evidence를 기록한다. +- [x] `/healthz`, `/v1/models`, `/v1/responses`, `/v1/chat/completions` capacity smoke를 rerun하고, total `in_flight=10`, `queued>=1`, 완료 후 `in_flight=0`, `queued=0` evidence를 남긴다. +- [x] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다. + +### [REVIEW_SMOKE-1] Clean Remote Preflight And Source Trust + +#### 문제 + +이전 evidence는 원격 checkout에 `?? apps/node/internal/bootstrap/iop.db`가 남아 있는 상태에서 수집됐다. local smoke rule은 dirty/divergent 또는 source 미동기화가 있으면 clean workdir/rebuild 또는 blocker 처리를 요구한다. + +#### 해결 방법 + +기존 workdir을 reset하지 않는다. 같은 workdir에서 이 untracked DB가 검증 source와 무관함을 명확히 격리하거나, 별도 clean workdir과 dev-runtime artifact를 준비한 뒤 preflight를 다시 남긴다. 어떤 경로를 선택했는지 `계획 대비 변경 사항`에 기록한다. + +#### 중간 검증 + +```bash +ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && git status --branch --short && git log --oneline -1 && test -x build/dev-runtime/bin/edge && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config --help >/tmp/iop-edge-config-help.txt && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --help >/tmp/iop-edge-config-refresh-help.txt && grep -n "^refresh:" build/dev-runtime/edge.yaml' +``` + +### [REVIEW_SMOKE-2] Dispatchable Mac MLX Provider Config And Endpoint + +#### 문제 + +이전 evidence는 provider-first `mac-mlx-vllm` entry가 `enabled=false`, `capacity=0`이고 endpoint listener도 없는 상태를 보여줬다. 이 상태에서는 provider-first source of truth 기준 capacity 10 dispatch가 불가능하다. + +#### 해결 방법 + +Mac MLX `vllm-mlx` endpoint를 `127.0.0.1:8002/v1`에서 기동하고, remote `build/dev-runtime/edge.yaml`의 provider-first `nodes[].providers[]` entry를 dispatchable capacity 3으로 맞춘다. 변경 후 `config check`, `config refresh --mode dry-run`, 필요 시 `--mode apply`를 실행한다. apply가 불가능하고 restart-required가 맞다면 restart-required 경로와 Edge/Node reconnect evidence를 남긴다. + +#### 중간 검증 + +```bash +ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093' +``` + +```bash +ssh toki@toki-labs.com 'lsof -nP -iTCP:8002 -sTCP:LISTEN && curl -fsS -H "Authorization: Bearer " http://127.0.0.1:8002/v1/models' +``` + +### [REVIEW_SMOKE-3] S07 Capacity Smoke Rerun + +#### 문제 + +이전 `/v1/chat/completions` capacity smoke는 total `in_flight=7`까지만 관측해 SDD S07과 local edge-smoke 기준을 충족하지 못했다. + +#### 해결 방법 + +`qwen3.6:35b`에 대해 `/v1/responses`와 `/v1/chat/completions`를 다시 실행한다. capacity smoke는 total capacity 10 기준 `11` concurrent 이상으로 실행하고, 같은 run 안에서 Control Plane status snapshot의 peak와 final recovery를 저장한다. auth header/API key 원문은 review stub에 남기지 않는다. + +#### 최종 검증 + +```bash +ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check' +``` + +```bash +ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093' +``` + +```bash +ssh toki@toki-labs.com 'curl -fsS http://toki-labs.com:18083/healthz && curl -fsS -H "Authorization: Bearer " http://toki-labs.com:18083/v1/models' +``` + +`/v1/responses`와 `/v1/chat/completions` capacity smoke는 secret 원문을 출력하지 않는 script 또는 redacted command로 실행하고, saved output path와 exact command shape를 review stub에 기록한다. 최종 smoke evidence는 최소 `concurrency`, `ok/fail`, per-provider peak `in_flight/queued/capacity`, peak total `in_flight=10`, `queued>=1`, final total `in_flight=0`, `queued=0`을 포함해야 한다. + +## 수정 파일 요약 + +| 파일 | 항목 | +|------|------| +| 원격 runtime config/evidence | REVIEW_SMOKE-1, REVIEW_SMOKE-2, REVIEW_SMOKE-3 | diff --git a/agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/CODE_REVIEW-cloud-G07.md b/agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/CODE_REVIEW-cloud-G07.md deleted file mode 100644 index ff066a1..0000000 --- a/agent-task/m-node-provider-first-config-surface/06+04,05_full_cycle_smoke/CODE_REVIEW-cloud-G07.md +++ /dev/null @@ -1,94 +0,0 @@ - - -# Code Review Reference - SMOKE - -> **[IMPLEMENTING AGENT — READ FIRST] Filling in this file is the mandatory final step of implementation.** -> Fill implementation-owned sections, then stop with active files in place and report ready for review. Do not record secret/token raw values. - -## 개요 - -date=2026-06-29 -task=m-node-provider-first-config-surface/06+04,05_full_cycle_smoke, plan=0, tag=SMOKE - -## Roadmap Targets - -- Milestone: `agent-roadmap/phase/operational-observability-provider-management/milestones/node-provider-first-config-surface.md` -- Task ids: - - `full-cycle-smoke`: dev-runtime provider-first provider pool full-cycle smoke -- Completion mode: check-on-pass - -## 구현 항목별 완료 여부 - -| 항목 | 완료 여부 | -|------|---------| -| [SMOKE-1] Dev-Runtime Provider Pool Evidence | [ ] | - -## 구현 체크리스트 - -- [ ] 원격 preflight를 실행하고 checkout/binary/config/runtime identity/port 상태를 review stub에 기록한다. -- [ ] provider-first dev-runtime config가 3 nodes, candidates `gx10-vllm`, `onexplayer-lemonade`, `mac-mlx-vllm`, total capacity 10을 담는지 확인한다. -- [ ] `config check`, refresh dry-run/apply 또는 restart-required 판정을 실행하고 Edge process 유지/재시작 필요 evidence를 남긴다. -- [ ] `/healthz`, `/v1/models`, `/v1/responses`, `/v1/chat/completions` capacity smoke를 실행한다. -- [ ] Control Plane status provider snapshot에서 `in_flight=10`, `queued>=1` 관측과 완료 후 `in_flight=0`, `queued=0` 회복 evidence를 남긴다. -- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다. - -## 코드리뷰 전용 체크리스트 - -> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다. - -- [ ] 판정을 append한다. -- [ ] active plan/review를 `.log`로 아카이브한다. -- [ ] PASS이면 `complete.log` 작성 후 task directory를 archive로 이동한다. - -## 계획 대비 변경 사항 - -_구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다._ - -## 주요 설계 결정 - -_구현 에이전트가 주요 설계 결정 사항을 기록한다._ - -## 사용자 리뷰 요청 - -_기본값은 `없음`이다. 구현 중 새 결정이 필요해 보여도 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 이 섹션은 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채운다. 외부 환경/secret/서비스 준비, 검증 증거 공백, 반복 실패, 일반 범위 조정은 사용자 리뷰 요청이 아니며 `검증 결과`, `계획 대비 변경 사항`, 또는 code-review의 일반 follow-up plan으로 처리한다._ - -- 상태: 없음 -- 사유 유형: 없음 -- 연결 대상: 없음 -- 결정 필요: 없음 -- 차단 근거: 없음 -- 실행한 검증/명령: 없음 -- 자동 후속 불가 이유: 없음 -- 재개 조건: 없음 - -## 리뷰어를 위한 체크포인트 - -- preflight가 원격 checkout/source sync 상태를 증명하는지 확인한다. -- capacity smoke evidence가 3 providers, total capacity 10, queued overflow를 실제로 보여주는지 확인한다. -- secret/token 원문이 기록되지 않았는지 확인한다. - -## 검증 결과 - -### SMOKE-1 중간 검증 - -```text -$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && git status --branch --short && git log --oneline -1 && test -x build/dev-runtime/bin/edge && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config --help >/tmp/iop-edge-config-help.txt && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --help >/tmp/iop-edge-config-refresh-help.txt && grep -n "^refresh:" build/dev-runtime/edge.yaml' -(output) -``` - -### 최종 검증 - -```text -$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config check' -(output) -``` - -```text -$ ssh toki@toki-labs.com 'cd /Users/toki/agent-work/iop-dev && build/dev-runtime/bin/edge --config build/dev-runtime/edge.yaml config refresh --mode dry-run --addr 127.0.0.1:19093' -(output) -``` - -```text -$ ssh toki@toki-labs.com 'curl -fsS http://toki-labs.com:18083/healthz && curl -fsS http://toki-labs.com:18083/v1/models' -(output) -```