14 KiB
Plan - API
이 파일을 읽는 구현 에이전트에게
구현 후 active CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 반드시 실제 구현 내용과 검증 출력으로 채운다. 검증을 실행하고, active 파일은 그대로 둔 뒤 리뷰 준비를 보고한다. 최종 판정, log rename, complete.log, archive 이동은 code-review 스킬 전용이다.
선택된 Milestone의 구현 잠금 > 결정 필요 항목이 실구현을 막을 때만 review stub의 사용자 리뷰 요청 섹션을 채우고 멈춘다. 구현 중 사용자에게 직접 질문하거나 선택지를 제시하거나 request_user_input을 호출하지 않는다. secret, 외부 서비스 준비, 배포 상태, evidence 공백은 사용자 리뷰 요청이 아니라 검증 결과나 follow-up 대상이다.
배경
이 plan은 S08 field smoke 전용이다. 앞선 subtasks가 agent-origin 생성, identity ledger, identity backfill, self-loop, update, conflict policy를 구현한 뒤 dev Plane/Gito/NomadCode 환경에서 실제 active Milestone 추가 push를 통해 Plane ticket 생성, identity backfill commit, 재전달 no-op까지 확인한다.
사용자 리뷰 요청 흐름
사용자 리뷰 요청은 선택된 Milestone lock decision만 active review stub의 사용자 리뷰 요청 섹션에 기록한다. 직접 사용자 prompt는 금지이며, code-review가 정당성을 검증하고 실제 USER_REVIEW.md 작성을 소유한다.
Roadmap Targets
- Milestone:
agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/agent-origin-milestone-creation-sync.md - Task ids:
field-smoke: dev 환경에서 agent가 active Milestone을 직접 추가해 push한 뒤 Plane ticket 생성, identity backfill commit, 재전달 no-op까지 확인한다.
- Completion mode: check-on-pass
분석 결과
읽은 파일
agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/agent-origin-milestone-creation-sync.mdagent-roadmap/sdd/agent-ops-mcp-control-plane/agent-origin-milestone-creation-sync/SDD.mdagent-contract/outer/gito-branch-webhook-consumer-v1.mdagent-test/local/rules.mdagent-test/local/core-smoke.mdagent-test/live-cycle-smoke.mdagent-test/plane-dev.mdservices/core/internal/gitosync/scanner.goservices/core/internal/roadmapsyncpipeline/service.goservices/core/internal/storage/roadmap_sync_identities.goservices/core/internal/storage/roadmap_sync_steps.goservices/core/internal/http/gito_webhook.goservices/core/internal/scheduler/roadmap_sync_jobs.goservices/core/docker-compose.yml
SDD 기준
- SDD:
agent-roadmap/sdd/agent-ops-mcp-control-plane/agent-origin-milestone-creation-sync/SDD.md - 상태:
[승인됨], SDD 잠금 해제, 사용자 리뷰 없음. - Targeted scenario: S08=
field-smoke. - Evidence Map row: dev field smoke with redacted logs/DB/Plane/git evidence; completion evidence must show Roadmap Completion and final dev cycle evidence without secrets.
- Field smoke must confirm Plane ticket creation, identity backfill commit, self-loop redelivery no-op, and secret redaction.
테스트 환경 규칙
- test_env:
localwith remote runner deployment for live smoke. agent-test/local/rules.md,agent-test/live-cycle-smoke.md, andagent-test/plane-dev.mdpresent/read.- Current preflight: repo root
/config/workspace/nomadcode, branchmain, HEADd80abe83579dd0d6fbc86b1a74c83db6d18c756d,go version go1.26.2 linux/arm64,git version 2.43.0. - Remote runner:
toki@toki-labs.com, checkout$HOME/agent-work/nomadcode. - Core URL for remote local profile:
http://127.0.0.1:18010. - Plane dev non-secret fixtures:
- Plane base URL:
https://plane.toki-labs.com - Workspace slug/id:
general/dadf050e-cd1e-4590-bc33-672511630841 - Project id/identifier:
a6beb42f-7a8a-410c-b50f-ea3ca94828f3/NOMAD - Todo state id:
45ba7449-f684-4381-af6d-5854747c5e8d - Backlog state id:
62d4c50c-0cea-4a76-a0ed-ec97498b2d5f - AGENT assignee id:
5d116a77-d3df-4f54-80bf-eca61e0118c4
- Plane base URL:
- Secrets are loaded only from ignored/SOPS-backed local sources such as
.env.plane.localorsecrets/nomadcode.dev.sops.yaml; secret values must not be copied into tracked files or final output.
테스트 커버리지 공백
- Unit/focused tests can prove behavior, but S08 requires live dev evidence that the whole path works through Gito delivery, Core worker, Plane mutation, git backfill push, and redelivery.
- Existing live-cycle smoke describes Plane-origin lifecycle; this plan adapts the same runner/secret/evidence discipline to agent-origin missing-create/backfill.
심볼 참조
- No production symbol change is planned in this smoke subtask unless field validation exposes a bug. If a code fix is required, implementation must make the smallest fix and update this review file with the exact deviation.
분할 판단
- Split decision policy evaluated before file selection.
- This dependent subtask is
04+01,02,03_field_smoke. - Predecessors required:
agent-task/m-agent-origin-milestone-creation-sync/01_scan_create_ledger/complete.logagent-task/m-agent-origin-milestone-creation-sync/02+01_identity_backfill/complete.logagent-task/m-agent-origin-milestone-creation-sync/03+01,02_self_loop_update_conflict/complete.log
- Active predecessor lookup: no predecessor
complete.logfiles exist at plan creation. - Archive predecessor lookup: not performed because no active predecessor completion exists and no runtime-provided archive evidence was specified.
- Implementer must wait for all predecessor PASS/complete.log files before starting this plan.
범위 결정 근거
- Include live dev smoke evidence and small bug fixes discovered only by the smoke.
- Exclude new feature design, broad refactors, non-agent-origin lifecycle, child ticket sync, and secrets/documentation of secret values.
빌드 등급
cloud-G07: the task is primarily validation/evidence, but it touches live dev Plane/Gito/NomadCode and may require narrow fixes if integration drift appears.
의존 관계 및 구현 순서
04+01,02,03_field_smoke depends on sibling predecessors 01_scan_create_ledger, 02+01_identity_backfill, and 03+01,02_self_loop_update_conflict. Start implementation only after all three active complete.log files exist or matching archived complete.log evidence is explicitly provided by runtime.
구현 체크리스트
- Remote runner checkout
toki@toki-labs.com:$HOME/agent-work/nomadcode를 현재 검증 대상 상태로 동기화하고 Core server를 빌드/재배포한다. - identity 없는 disposable active Milestone을
develop에 push하고 Gitobranch.updatedwebhook delivery 또는 equivalent wakeup을 확인한다. - Core가
afterSHA를 fetch/verify하고 missing-create path로 Plane ticket을 생성한 증거를 DB/log/Plane에서 secret redaction 상태로 수집한다. - identity backfill commit이
develop에 push됐고 diff가 provider identity block만 포함하는지 git evidence를 수집한다. - backfill commit 재전달이 provider create/update 반복 없이 complete/no-op으로 수렴하는지 DB/log evidence를 수집한다.
- disposable smoke Milestone/Plane item cleanup 여부와 남은 dev 환경 상태를 기록한다.
git diff --check, focused unit fallback tests, live smoke 명령을 실행한다.- CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
[API-1] Remote Runner Preflight And Deploy
문제
S08 evidence는 현재 reviewed code가 실행 중인 Core server에 배포되어 있을 때만 의미가 있다. remote checkout이 낡았거나 dirty여도 차단으로 간주하지 않고, 검증 대상 상태와 같게 동기화한 뒤 smoke를 수행해야 한다.
해결 방법
Remote runner checkout을 reset/clean/reclone or file sync로 현재 작업 상태와 맞추고 Docker Compose Core server를 rebuild/recreate한다. Secret은 ignored local file or SOPS에서 로드하되 값을 출력하지 않는다.
수정 파일 및 체크리스트
agent-task/m-agent-origin-milestone-creation-sync/04+01,02,03_field_smoke/CODE_REVIEW-cloud-G07.md: preflight command output 기록.- If code/config fix is needed, update only the smallest related Core file and rerun predecessor-relevant focused tests.
테스트 작성
No new unit test is expected for deploy-only work unless smoke exposes a code bug.
중간 검증
ssh toki@toki-labs.com 'cd $HOME/agent-work/nomadcode && git rev-parse HEAD && git status --short'
ssh toki@toki-labs.com 'cd $HOME/agent-work/nomadcode/services/core && docker compose ps'
ssh toki@toki-labs.com 'curl -s http://127.0.0.1:18010/api/tasks | python3 -c "import sys,json; d=json.load(sys.stdin); print(\"task_count:\", len(d.get(\"tasks\",[])))"'
Expected: checkout matches reviewed change set, Core is reachable, and no secret values are printed.
[API-2] Agent-Origin Missing Create And Backfill Smoke
문제
The milestone acceptance requires a real agent-origin active Milestone push that starts without provider identity and ends with Plane ticket creation plus provider identity backfill commit.
해결 방법
Create a disposable active Milestone file on develop with a unique slug and no Provider identity block. Push it through Gito, wait for Core webhook/worker processing, then record Plane item id, roadmap_sync_identities row, completed steps, and backfill commit diff. Redact tokens, webhook signatures, and raw credentials.
수정 파일 및 체크리스트
- Record disposable milestone slug and pushed
afterSHA. - Record Gito webhook delivery id or equivalent accepted wakeup evidence if available.
- Record Plane work item id/key and state using non-secret evidence.
- Record DB identity row and completed steps with secret-free SQL/curl output.
- Record backfill commit SHA and
git show --stat/diff excerpt proving identity-block-only scope.
테스트 작성
Live smoke evidence is required for S08. If live service is unavailable, run the runtime-equivalent unit fallback and record the blocker as follow-up rather than marking S08 complete.
중간 검증
# On remote runner after secrets are loaded from ignored/SOPS-backed sources.
CORE_URL="http://127.0.0.1:18010"
curl -s "$CORE_URL/api/tasks" | python3 -c 'import sys,json; d=json.load(sys.stdin); print("task_count:", len(d.get("tasks",[])))'
git fetch origin develop
git rev-parse origin/develop
Expected: Core reachable; target develop revision visible to the checkout.
[API-3] Redelivery No-Op Evidence And Cleanup
문제
Plane ticket creation and identity backfill are insufficient if the backfill webhook creates or updates provider state again. S08 requires the redelivery no-op evidence and secret-redacted final record.
해결 방법
Trigger or observe the backfill commit's Gito redelivery. Verify the same milestone slug/Plane item keeps one identity row, no second create/update happens, and the job completes or no-ops. Cleanup disposable data only if safe and record what was left behind for traceability.
수정 파일 및 체크리스트
- Record redelivery job/log/DB evidence showing no duplicate provider mutation.
- Record Plane item remains single and linked to the same milestone slug.
- Record cleanup decision and final dev environment state.
agent-task/m-agent-origin-milestone-creation-sync/04+01,02,03_field_smoke/CODE_REVIEW-cloud-G07.md: fill implementation-owned sections.
테스트 작성
If redelivery cannot be triggered live, use the runtime-equivalent unit fallback and keep S08 incomplete or WARN according to code-review policy.
중간 검증
git diff --check
cd services/core && go test -count=1 ./internal/gitosync ./internal/roadmapsyncpipeline ./internal/storage ./internal/http ./internal/scheduler
cd services/core && go vet ./internal/gitosync ./internal/roadmapsyncpipeline ./internal/storage ./internal/http ./internal/scheduler
Expected: local/focused fallback stays green after any smoke-driven fix.
수정 파일 요약
| 파일 | 항목 |
|---|---|
agent-task/m-agent-origin-milestone-creation-sync/04+01,02,03_field_smoke/CODE_REVIEW-cloud-G07.md |
API-1, API-2, API-3 |
services/core/internal/gitosync/* |
only if smoke exposes a minimal bug |
services/core/internal/roadmapsyncpipeline/* |
only if smoke exposes a minimal bug |
services/core/internal/storage/* |
only if smoke exposes a minimal bug |
services/core/internal/http/* |
only if smoke exposes a minimal bug |
services/core/internal/scheduler/* |
only if smoke exposes a minimal bug |
최종 검증
git diff --check
cd services/core && go test -count=1 ./internal/gitosync ./internal/roadmapsyncpipeline ./internal/storage ./internal/http ./internal/scheduler
cd services/core && go vet ./internal/gitosync ./internal/roadmapsyncpipeline ./internal/storage ./internal/http ./internal/scheduler
ssh toki@toki-labs.com 'cd $HOME/agent-work/nomadcode && git rev-parse HEAD && git status --short'
ssh toki@toki-labs.com 'curl -s http://127.0.0.1:18010/api/tasks | python3 -c "import sys,json; d=json.load(sys.stdin); print(\"task_count:\", len(d.get(\"tasks\",[])))"'
Expected: all commands exit 0, live smoke evidence is secret-free, and S08 evidence includes Plane ticket, identity backfill commit, and redelivery no-op.
모든 코드 변경 완료 후 반드시 CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.