feat: add gito delivery subtask and update milestone
This commit is contained in:
parent
a23c723823
commit
e3053ed0a9
9 changed files with 1303 additions and 5 deletions
|
|
@ -64,10 +64,10 @@ Plane-origin authoring이 짧은 사용자 입력과 workspace metadata만으로
|
|||
|
||||
Git/Plane 동기화는 path나 provider work item id가 아니라 Milestone 파일명 slug 하나를 canonical id로 삼는다. path는 active/archive 위치를 찾기 위한 속성이고, provider work item id는 Plane foreign key다.
|
||||
|
||||
- [ ] [canonical-id] `agent-roadmap/phase/*/milestones/<milestone-id>.md`의 `<milestone-id>`를 단일 canonical sync id로 정의하고, `roadmap_sync_identities`/parser/matcher/projection이 path 대신 이 id를 1차 판별값으로 사용한다. 검증: phase 이동, archive 이동 후보, provider work item id 변경이 있어도 같은 filename slug는 같은 Milestone으로 판별된다.
|
||||
- [x] [canonical-id] `agent-roadmap/phase/*/milestones/<milestone-id>.md`의 `<milestone-id>`를 단일 canonical sync id로 정의하고, `roadmap_sync_identities`/parser/matcher/projection이 path 대신 이 id를 1차 판별값으로 사용한다. 검증: phase 이동, archive 이동 후보, provider work item id 변경이 있어도 같은 filename slug는 같은 Milestone으로 판별된다.
|
||||
- [x] [active-index] Gito wakeup 이후 Core가 remote `develop`을 fetch한 뒤 `agent-roadmap/phase/*/milestones/*.md`만 active Milestone index로 스캔하고 `agent-roadmap/archive/**`는 sync 대상에서 제외한다. 검증: active 문서는 reconcile 후보가 되고 archive 문서는 생성/갱신 대상에서 제외되지만 slug lookup으로 이력 조회 후보를 찾을 수 있다.
|
||||
- [ ] [plane-missing-create] active Milestone slug가 ledger와 Plane에서 발견되지 않으면 Plane work item을 생성하고, 생성된 Plane work item id를 slug ledger와 Milestone provider identity block 또는 동등한 sync marker에 기록한다. 검증: Plane에 없는 active Milestone 전체가 중복 없이 생성되고 제목에는 `[milestone-id]`가 들어간다.
|
||||
- [ ] [slug-reconcile] 같은 Milestone slug 재처리는 중복 Plane item을 만들지 않고 path, provider work item id, revision, 완료 step만 갱신한다. 검증: 같은 slug의 재처리/부분 실패 복구는 resume되고, slug 충돌 또는 파일명 재사용은 자동 병합하지 않고 명시 failure로 멈춘다.
|
||||
- [x] [plane-missing-create] active Milestone slug가 ledger와 Plane에서 발견되지 않으면 Plane work item을 생성하고, 생성된 Plane work item id를 slug ledger와 Milestone provider identity block 또는 동등한 sync marker에 기록한다. 검증: Plane에 없는 active Milestone 전체가 중복 없이 생성되고 제목에는 `[milestone-id]`가 들어간다.
|
||||
- [x] [slug-reconcile] 같은 Milestone slug 재처리는 중복 Plane item을 만들지 않고 path, provider work item id, revision, 완료 step만 갱신한다. 검증: 같은 slug의 재처리/부분 실패 복구는 resume되고, slug 충돌 또는 파일명 재사용은 자동 병합하지 않고 명시 failure로 멈춘다.
|
||||
|
||||
### Epic: [gito-plane] Gito callback and Plane projection
|
||||
|
||||
|
|
@ -138,7 +138,7 @@ Gito HTTP webhook wakeup 이후 Core sync pipeline이 active Milestone reconcile
|
|||
- `develop-match` Task는 `roadmapsync.MatchDevelopMilestone`/`roadmapsyncpipeline.SyncCreation`의 not-ready gate 테스트와 현재 workspace/standard remote runner `cd services/core && go test ./...` 통과 근거로 완료 처리했다.
|
||||
- `idempotency-retry` Task는 `roadmapsync.ReconcileCreationCycle`, `roadmap_sync_identities`, `roadmap_sync_steps`, `roadmapsyncpipeline`, `gitosync` dedup 테스트와 현재 workspace/standard remote runner `cd services/core && go test ./...` 통과 근거로 완료 처리했다.
|
||||
- 현재 활성 `agent-task` plan/review/user-review/complete 파일은 없다.
|
||||
- 남은 실구현/검증 후보는 `canonical-id`, `active-index`, `plane-missing-create`, `slug-reconcile`, `gito-delivery`, `scan-enqueue`, `plane-todo`, `slot-finalize`, `remote-baseline`, `full-cycle`, `regression-doc`이다.
|
||||
- 당시 남은 실구현/검증 후보는 `canonical-id`, `active-index`, `plane-missing-create`, `slug-reconcile`, `gito-delivery`, `scan-enqueue`, `plane-todo`, `slot-finalize`, `remote-baseline`, `full-cycle`, `regression-doc`이다.
|
||||
- 핸즈오프(2026-06-20):
|
||||
- 현재 타겟은 이 마일스톤이다. 로컬 `agent-roadmap/current.md`의 활성 Milestone은 `Plane-Origin Authoring Roundtrip Sync` 하나로 정리되어 있다.
|
||||
- SDD gate는 작성과 해제까지 완료되어 구현 plan 생성이 가능하다.
|
||||
|
|
@ -151,5 +151,13 @@ Gito HTTP webhook wakeup 이후 Core sync pipeline이 active Milestone reconcile
|
|||
- 작업 현황 동기화(2026-06-21):
|
||||
- `active-index` Task는 `services/core/internal/gitosync/scanner.go`가 Gito wakeup 이후 `git diff`가 아니라 `git ls-tree -r --name-only <revision> -- agent-roadmap/phase agent-roadmap/archive`로 remote `develop` revision의 active Milestone 전체를 인덱싱하고, archive Milestone은 `ArchiveCandidates` slug lookup 후보로만 보존하도록 보강해 완료 처리했다.
|
||||
- 검증 근거: `cd services/core && go test ./internal/gitosync`, `cd services/core && go test ./...`, `git diff --check` 통과.
|
||||
- `canonical-id`, `plane-missing-create`, `slug-reconcile`은 큰 작업으로 분류하고 split plan을 작성했다: `agent-task/m-plane-origin-authoring-roundtrip-sync/05_canonical_id/PLAN-cloud-G06.md`, `agent-task/m-plane-origin-authoring-roundtrip-sync/06+05_plane_missing_create/PLAN-cloud-G06.md`, `agent-task/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/PLAN-cloud-G05.md`.
|
||||
- `canonical-id` Task는 filename slug canonical id와 path/provider work item id 속성화, 기존 row mutation 전 revision mismatch 차단, safe attribute update 보강 근거로 완료 처리했다.
|
||||
- `plane-missing-create` Task는 Plane에 없는 active Milestone slug가 bridge-produced missing-create job에서도 중복 없이 Plane item 생성과 ledger upsert로 수렴하도록 보강한 근거로 완료 처리했다.
|
||||
- `slug-reconcile` Task는 same-slug 재처리 시 최신 incoming provider ref를 보존하고, completed-cycle no-op에서도 safe attribute upsert가 일어나도록 보강한 근거로 완료 처리했다.
|
||||
- 완료 근거:
|
||||
- `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/05_canonical_id/complete.log`
|
||||
- `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/06+05_plane_missing_create/complete.log`
|
||||
- `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- 현재 활성 `agent-task` plan/review/user-review/complete 파일은 없다.
|
||||
- 현재 남은 실구현/검증 후보는 `gito-delivery`, `scan-enqueue`, `plane-todo`, `slot-finalize`, `remote-baseline`, `full-cycle`, `regression-doc`이다.
|
||||
- 확인 필요: 없음
|
||||
|
|
|
|||
|
|
@ -0,0 +1,155 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/08+07_gito_delivery plan=0 tag=TEST -->
|
||||
|
||||
# Code Review Reference - TEST
|
||||
|
||||
> **[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 SDD decision or selected Milestone `구현 잠금 > 결정 필요` item, fill `사용자 리뷰 요청` with linked evidence and stop with active files in place; code-review decides whether to write `USER_REVIEW.md`. Environment/secret/service blockers, generic scope changes, repeated failures, 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 SDD/Milestone lock decisions 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-21
|
||||
task=m-plane-origin-authoring-roundtrip-sync/08+07_gito_delivery, plan=0, tag=TEST
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `gito-delivery`: Forgejo push -> Gito -> Core signed HTTP webhook delivery and duplicate handling
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S13`: task=`gito-delivery`; evidence=`signed delivery 202, Core log, duplicate result recorded without secret`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Verdict: PASS
|
||||
- Carryover: filename slug based reconcile and same-slug idempotency are complete; `gito-plane` plans may depend on S12 being done.
|
||||
- Verification carried over: `cd services/core && go test -count=1 ./...`, `git diff --check`
|
||||
|
||||
## 이 파일을 읽는 리뷰 에이전트에게
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 아래 종결 절차는 코드리뷰 에이전트 전용이다. 구현 에이전트는 이 섹션을 실행하지 않는다.
|
||||
|
||||
각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과` 섹션의 출력이 코드와 일치하는지 확인하세요.
|
||||
리뷰 완료는 plan skill의 종결 절차를 따른다.
|
||||
|
||||
## 구현 항목별 완료 여부
|
||||
|
||||
| 항목 | 완료 여부 |
|
||||
|------|---------|
|
||||
| [TEST-1] Gito Signed Delivery Evidence | [ ] |
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Forgejo push 또는 equivalent Gito branch.updated delivery를 발생시키고 Core `POST /api/integrations/gito/webhook` 202 및 duplicate result를 secret 없이 증거화한다.
|
||||
- [ ] `gito-delivery` 검증 기준의 Gito subscription target, Core webhook log, duplicate delivery 결과를 `CODE_REVIEW-cloud-G07.md`에 실제 출력으로 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
## 코드리뷰 전용 체크리스트
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
|
||||
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
|
||||
|
||||
- [ ] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
|
||||
- [ ] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
|
||||
- [ ] active `CODE_REVIEW-*-G??.md`를 `code_review_cloud_G07_0.log`로 아카이브한다.
|
||||
- [ ] active `PLAN-*-G??.md`를 `plan_cloud_G07_0.log`로 아카이브한다.
|
||||
- [ ] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
|
||||
- [ ] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
|
||||
- [ ] PASS이면 active task 디렉터리 `agent-task/m-plane-origin-authoring-roundtrip-sync/08+07_gito_delivery/`를 `agent-task/archive/YYYY/MM/m-plane-origin-authoring-roundtrip-sync/08+07_gito_delivery/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
|
||||
- [ ] PASS이고 task group이 `m-plane-origin-authoring-roundtrip-sync`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
|
||||
- [ ] PASS split 작업이면 이동 후 빈 active parent `agent-task/m-plane-origin-authoring-roundtrip-sync/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다.
|
||||
- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-cloud-G07.md`와 `CODE_REVIEW-cloud-G07.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가 연결된 SDD/Milestone 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
|
||||
|
||||
## 계획 대비 변경 사항
|
||||
|
||||
_구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다._
|
||||
|
||||
## 주요 설계 결정
|
||||
|
||||
_구현 에이전트가 주요 설계 결정 사항을 기록한다._
|
||||
|
||||
## 사용자 리뷰 요청
|
||||
|
||||
_기본값은 `없음`이다. 구현 중 새 결정이 필요해 보여도 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 이 섹션은 선택된 SDD 결정 또는 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채운다. 외부 환경/secret/서비스 준비, 검증 증거 공백, 반복 실패, 일반 범위 조정은 사용자 리뷰 요청이 아니며 `검증 결과`, `계획 대비 변경 사항`, 또는 code-review의 일반 follow-up plan으로 처리한다._
|
||||
|
||||
- 상태: 없음
|
||||
- 사유 유형: 없음
|
||||
- 연결 대상: 없음
|
||||
- 결정 필요: 없음
|
||||
- 차단 근거: 없음
|
||||
- 실행한 검증/명령: 없음
|
||||
- 자동 후속 불가 이유: 없음
|
||||
- 재개 조건: 없음
|
||||
|
||||
## 리뷰어를 위한 체크포인트
|
||||
|
||||
- Secret 원문 없이 signed delivery 202와 duplicate 결과가 남았는지 확인한다.
|
||||
- Core log가 `gito creation sync enqueued` 또는 equivalent enqueue path를 보여주는지 확인한다.
|
||||
- Unit/fake tests만으로 S13을 PASS 처리하지 않았는지 확인한다.
|
||||
|
||||
## 검증 결과
|
||||
|
||||
_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._
|
||||
|
||||
필수 규칙:
|
||||
- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다.
|
||||
- 대체가 필요하면 `계획 대비 변경 사항`에 이유와 대체 명령을 기록한다.
|
||||
- `검증 결과`에는 실제 stdout/stderr를 붙여 넣는다.
|
||||
- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면 `사용자 리뷰 요청`에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다.
|
||||
- mobile/UI hang, timeout, 또는 2분 무진행은 blind retry를 중단하고 focused rerun 명령과 screenshot/window/UI-tree evidence path를 남기며, 불가능하면 정확한 사유를 남긴다.
|
||||
|
||||
### TEST-1 중간 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode" && git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && cd services/core && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
### 최종 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && docker compose logs --no-color --since=30m nomadcode-core | rg "gito http webhook consumer enabled|gito creation sync enqueued|gito missing-create sync enqueued|gito webhook handler failed|duplicate"'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> **[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`으로 복사 |
|
||||
| Spec Targets | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음; PASS 시 code-review가 `complete.log`의 `Spec 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 텍스트를 실제 내용으로 교체 |
|
||||
| 사용자 리뷰 요청 | 구현 에이전트가 채움 | 선택된 SDD 결정 또는 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채움; 구현 중 직접 질문은 금지; 환경/secret/서비스/검증 공백/일반 범위 조정은 사용자 리뷰 요청으로 쓰지 않음 |
|
||||
| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 |
|
||||
| 검증 결과 (섹션 제목 + 명령) | 스텁 생성 시 고정 | 실행 출력만 구현 에이전트가 채움; 명령 변경은 `계획 대비 변경 사항`에 기록 |
|
||||
| 코드리뷰 결과 | 리뷰 에이전트가 append | 스텁에 포함하지 않음 |
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/08+07_gito_delivery plan=0 tag=TEST -->
|
||||
|
||||
# Plan - TEST
|
||||
|
||||
## 이 파일을 읽는 구현 에이전트에게
|
||||
|
||||
`CODE_REVIEW-cloud-G07.md`의 구현 에이전트 소유 섹션을 채우는 것까지가 구현이다. 검증을 실행하고 실제 출력과 증거 경로를 붙여 넣은 뒤 active 파일을 그대로 두고 리뷰 준비를 보고한다. SDD 결정 또는 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 막을 때만 review stub의 `사용자 리뷰 요청`을 채우고 멈춘다. 직접 사용자에게 묻거나 `USER_REVIEW.md`, `complete.log`, archive 로그를 만들지 않는다. secret/service 준비, 증거 공백, 범위 조정은 일반 follow-up으로 기록한다.
|
||||
|
||||
## 배경
|
||||
|
||||
현재 마일스톤의 `gito-plane` Epic은 Gito HTTP webhook wakeup 이후 Core sync pipeline이 실제 환경에서 닫히는지 검증해야 한다. `gito-delivery`는 Forgejo push가 Gito를 거쳐 Core signed HTTP webhook으로 들어오고, duplicate delivery가 secret 없이 확인되는지를 SDD S13 근거로 남기는 작업이다.
|
||||
|
||||
## 사용자 리뷰 요청 흐름
|
||||
|
||||
사용자 리뷰 요청은 선택된 SDD 결정 또는 Milestone lock 결정이 있을 때만 active review stub의 `사용자 리뷰 요청` 섹션에 기록한다. 구현 중 직접 질문하거나 선택지를 제시하지 않으며, code-review가 검증 후 실제 `USER_REVIEW.md` 작성 여부를 판단한다.
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Verdict: PASS
|
||||
- Carryover: filename slug based reconcile and same-slug idempotency are complete; `gito-plane` plans may depend on S12 being done.
|
||||
- Verification carried over: `cd services/core && go test -count=1 ./...`, `git diff --check`
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `gito-delivery`: Forgejo push -> Gito -> Core signed HTTP webhook delivery and duplicate handling
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S13`: task=`gito-delivery`; evidence=`signed delivery 202, Core log, duplicate result recorded without secret`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## 분석 결과
|
||||
|
||||
### 읽은 파일
|
||||
|
||||
- `agent-test/local/rules.md`
|
||||
- `agent-test/local/core-smoke.md`
|
||||
- `agent-test/live-cycle-smoke.md`
|
||||
- `agent-roadmap/phase/agent-ops-mcp-control-plane/PHASE.md`
|
||||
- `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- `services/core/cmd/server/main.go`
|
||||
- `services/core/cmd/server/main_test.go`
|
||||
- `services/core/docker-compose.yml`
|
||||
- `services/core/internal/http/gito_webhook.go`
|
||||
- `services/core/internal/http/gito_webhook_test.go`
|
||||
- `services/core/internal/gitosync/bridge.go`
|
||||
- `services/core/internal/gitosync/bridge_test.go`
|
||||
- `services/core/internal/gitosync/scanner.go`
|
||||
- `services/core/internal/gitosync/scanner_test.go`
|
||||
|
||||
### 테스트 환경 규칙
|
||||
|
||||
- test_env: `local`
|
||||
- Env rules: `agent-test/local/rules.md` present and read; local baseline is standard remote runner.
|
||||
- Matched profiles: `agent-test/local/core-smoke.md`, `agent-test/live-cycle-smoke.md`
|
||||
- Applied commands: current workspace precheck `cd services/core && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/scheduler ./internal/adapters/plane ./internal/authoring` passed.
|
||||
- Final verification source: remote runner commands from `core-smoke` plus live evidence steps from `live-cycle-smoke`.
|
||||
|
||||
### 테스트 커버리지 공백
|
||||
|
||||
- Signed HTTP handling and fake bridge enqueue are covered by `services/core/internal/http/gito_webhook_test.go` and `services/core/cmd/server/main_test.go`.
|
||||
- Real Forgejo -> Gito subscription target, Core 202 response, Core log, and duplicate live delivery are not covered by unit tests and must be captured on the standard remote runner.
|
||||
|
||||
### 심볼 참조
|
||||
|
||||
- none
|
||||
|
||||
### 분할 판단
|
||||
|
||||
- Split policy evaluated before choosing files.
|
||||
- Shared task group: `m-plane-origin-authoring-roundtrip-sync`
|
||||
- Sibling tasks: `08+07_gito_delivery` depends on archived `07+05,06_slug_reconcile`; `09+08_scan_enqueue`; `10+09_plane_todo`; `11+10_slot_finalize`.
|
||||
- Predecessor `07` is satisfied by `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`.
|
||||
- This plan is separate because live delivery setup/log evidence can fail independently of Plane projection or slot finalization.
|
||||
|
||||
### 범위 결정 근거
|
||||
|
||||
- Scope includes Gito subscription/Core webhook delivery evidence only.
|
||||
- It excludes Plane Todo projection and slot terminal state, which belong to dependent tasks 10 and 11.
|
||||
- It does not change Gito subscription secrets or print raw signatures/tokens.
|
||||
|
||||
### 빌드 등급
|
||||
|
||||
- `cloud-G07`: live external delivery, remote runner, service logs, and duplicate handling are central and cannot be fully proven by local unit tests.
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Forgejo push 또는 equivalent Gito branch.updated delivery를 발생시키고 Core `POST /api/integrations/gito/webhook` 202 및 duplicate result를 secret 없이 증거화한다.
|
||||
- [ ] `gito-delivery` 검증 기준의 Gito subscription target, Core webhook log, duplicate delivery 결과를 `CODE_REVIEW-cloud-G07.md`에 실제 출력으로 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
### [TEST-1] Gito Signed Delivery Evidence
|
||||
|
||||
#### 문제
|
||||
|
||||
- Milestone line 76 requires remote `develop` push마다 Forgejo -> Gito -> Core signed HTTP webhook delivery and duplicate handling evidence.
|
||||
- `ReceiveGitoWebhook` validates signature, event, delivery id, target repo/branch, duplicate keys, and calls the handler at `services/core/internal/http/gito_webhook.go:110`.
|
||||
- Server wiring enables the HTTP consumer only when config is complete at `services/core/cmd/server/main.go:169`.
|
||||
- SDD S13 requires secret-redacted live delivery evidence at `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md:129`.
|
||||
|
||||
#### 해결 방법
|
||||
|
||||
- Do not change source unless live evidence exposes a concrete defect.
|
||||
- On the standard remote runner, make sure Core runs the current target state with Gito webhook env configured, then trigger a branch.updated delivery by pushing to watched `develop` or using the existing Gito test-delivery path.
|
||||
- Capture only non-secret evidence: HTTP status, delivery id hash or redacted id, repo id/branch/revision, Core log lines, duplicate response.
|
||||
|
||||
#### 수정 파일 및 체크리스트
|
||||
|
||||
- [ ] `services/core/cmd/server/main.go`: inspect logs to confirm `gito http webhook consumer enabled`.
|
||||
- [ ] `services/core/internal/http/gito_webhook.go`: no planned change; only patch if live delivery contradicts existing handler tests.
|
||||
- [ ] `services/core/internal/gitosync/bridge.go`: no planned change; only patch if handler reaches bridge but enqueue contract fails.
|
||||
- [ ] `CODE_REVIEW-cloud-G07.md`: record commands, outputs, redactions, and any skipped/blocked live step.
|
||||
|
||||
#### 테스트 작성
|
||||
|
||||
- Skip new unit tests unless a live defect is found. Existing tests cover signed HTTP validation and fake bridge enqueue; this task's missing evidence is live delivery.
|
||||
|
||||
#### 중간 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode" && git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && cd services/core && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync'\'''
|
||||
```
|
||||
|
||||
Expected: command exits 0 and all listed packages report `ok`.
|
||||
|
||||
## 의존 관계 및 구현 순서
|
||||
|
||||
- `08+07_gito_delivery` must start after `07+05,06_slug_reconcile` complete log exists. It is satisfied by `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`.
|
||||
- Dependent task `09+08_scan_enqueue` must wait for this task's `complete.log`.
|
||||
|
||||
## 수정 파일 요약
|
||||
|
||||
| 파일 | 항목 |
|
||||
|------|------|
|
||||
| 없음 | TEST-1 evidence-only plan |
|
||||
| `CODE_REVIEW-cloud-G07.md` | TEST-1 검증 출력 기록 |
|
||||
|
||||
## 최종 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && docker compose logs --no-color --since=30m nomadcode-core | rg "gito http webhook consumer enabled|gito creation sync enqueued|gito missing-create sync enqueued|gito webhook handler failed|duplicate"'\'''
|
||||
```
|
||||
|
||||
Expected: output shows consumer enabled plus accepted/enqueued delivery evidence or an explicit duplicate result, with no secret values.
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync'\'''
|
||||
```
|
||||
|
||||
Expected: all listed packages pass from remote runner checkout.
|
||||
|
||||
모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/09+08_scan_enqueue plan=0 tag=TEST -->
|
||||
|
||||
# Code Review Reference - TEST
|
||||
|
||||
> **[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 SDD decision or selected Milestone `구현 잠금 > 결정 필요` item, fill `사용자 리뷰 요청` with linked evidence and stop with active files in place; code-review decides whether to write `USER_REVIEW.md`.
|
||||
> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation.
|
||||
> Finalization is review-agent-only.
|
||||
|
||||
## 개요
|
||||
|
||||
date=2026-06-21
|
||||
task=m-plane-origin-authoring-roundtrip-sync/09+08_scan_enqueue, plan=0, tag=TEST
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `scan-enqueue`: Gito wakeup fetches local develop, scans active Milestone index, and enqueues slug reconcile jobs
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S14`: task=`scan-enqueue`; evidence=`active reconcile enqueue evidence recorded`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Immediate predecessor required by directory name: `08+07_gito_delivery/complete.log`
|
||||
- Carryover from 07: same-slug retry and safe attribute update are complete.
|
||||
|
||||
## 이 파일을 읽는 리뷰 에이전트에게
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 종결 절차는 코드리뷰 에이전트 전용이다.
|
||||
|
||||
각 항목의 구현을 실제 소스 파일과 대조하고, `검증 결과`의 출력이 plan 계약과 일치하는지 확인하세요.
|
||||
|
||||
## 구현 항목별 완료 여부
|
||||
|
||||
| 항목 | 완료 여부 |
|
||||
|------|---------|
|
||||
| [TEST-1] Active Index Scan To Enqueue Evidence | [ ] |
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Predecessor `08+07_gito_delivery` complete log이 있는지 확인하고, 없으면 구현을 시작하지 않고 review stub에 dependency blocker로 기록한다.
|
||||
- [ ] Gito wakeup 후 scanner가 active Milestone 전체를 후보로 만들고 archive Milestone은 제외하는 unit/focused test output을 기록한다.
|
||||
- [ ] Remote Core log 또는 queue/DB evidence로 `roadmap_creation_sync` enqueue가 slug 단위로 발생했음을 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
## 코드리뷰 전용 체크리스트
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
|
||||
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
|
||||
|
||||
- [ ] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
|
||||
- [ ] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
|
||||
- [ ] active `CODE_REVIEW-*-G??.md`를 `code_review_cloud_G06_0.log`로 아카이브한다.
|
||||
- [ ] active `PLAN-*-G??.md`를 `plan_cloud_G06_0.log`로 아카이브한다.
|
||||
- [ ] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
|
||||
- [ ] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
|
||||
- [ ] PASS이면 active task 디렉터리 `agent-task/m-plane-origin-authoring-roundtrip-sync/09+08_scan_enqueue/`를 `agent-task/archive/YYYY/MM/m-plane-origin-authoring-roundtrip-sync/09+08_scan_enqueue/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
|
||||
- [ ] PASS이고 task group이 `m-plane-origin-authoring-roundtrip-sync`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
|
||||
- [ ] PASS split 작업이면 이동 후 빈 active parent `agent-task/m-plane-origin-authoring-roundtrip-sync/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다.
|
||||
- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-cloud-G06.md`와 `CODE_REVIEW-cloud-G06.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가 연결된 SDD/Milestone 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
|
||||
|
||||
## 계획 대비 변경 사항
|
||||
|
||||
_구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다._
|
||||
|
||||
## 주요 설계 결정
|
||||
|
||||
_구현 에이전트가 주요 설계 결정 사항을 기록한다._
|
||||
|
||||
## 사용자 리뷰 요청
|
||||
|
||||
_기본값은 `없음`이다. 구현 중 새 결정이 필요해 보여도 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 이 섹션은 선택된 SDD 결정 또는 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채운다. 외부 환경/secret/서비스 준비, 검증 증거 공백, 반복 실패, 일반 범위 조정은 사용자 리뷰 요청이 아니며 `검증 결과`, `계획 대비 변경 사항`, 또는 code-review의 일반 follow-up plan으로 처리한다._
|
||||
|
||||
- 상태: 없음
|
||||
- 사유 유형: 없음
|
||||
- 연결 대상: 없음
|
||||
- 결정 필요: 없음
|
||||
- 차단 근거: 없음
|
||||
- 실행한 검증/명령: 없음
|
||||
- 자동 후속 불가 이유: 없음
|
||||
- 재개 조건: 없음
|
||||
|
||||
## 리뷰어를 위한 체크포인트
|
||||
|
||||
- `08+07_gito_delivery` dependency가 충족됐는지 확인한다.
|
||||
- Active index가 changed file hint가 아니라 `git ls-tree` active Milestone index임을 evidence가 보여주는지 확인한다.
|
||||
- Archive Milestone이 sync target으로 처리되지 않았는지 확인한다.
|
||||
|
||||
## 검증 결과
|
||||
|
||||
_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._
|
||||
|
||||
필수 규칙:
|
||||
- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다.
|
||||
- 대체가 필요하면 `계획 대비 변경 사항`에 이유와 대체 명령을 기록한다.
|
||||
- `검증 결과`에는 실제 stdout/stderr를 붙여 넣는다.
|
||||
- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면 `사용자 리뷰 요청`에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다.
|
||||
- mobile/UI hang, timeout, 또는 2분 무진행은 blind retry를 중단하고 focused rerun 명령과 screenshot/window/UI-tree evidence path를 남기며, 불가능하면 정확한 사유를 남긴다.
|
||||
|
||||
### TEST-1 중간 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/gitosync ./cmd/server'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
### 최종 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/gitosync ./cmd/server ./internal/scheduler'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && docker compose logs --no-color --since=30m nomadcode-core | rg "gito creation sync enqueued|gito missing-create sync enqueued|roadmap_creation_sync|active milestone"'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> **[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`으로 복사 |
|
||||
| Spec Targets | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음; PASS 시 code-review가 `complete.log`의 `Spec 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 텍스트를 실제 내용으로 교체 |
|
||||
| 사용자 리뷰 요청 | 구현 에이전트가 채움 | 선택된 SDD 결정 또는 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채움; 구현 중 직접 질문은 금지; 환경/secret/서비스/검증 공백/일반 범위 조정은 사용자 리뷰 요청으로 쓰지 않음 |
|
||||
| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 |
|
||||
| 검증 결과 (섹션 제목 + 명령) | 스텁 생성 시 고정 | 실행 출력만 구현 에이전트가 채움; 명령 변경은 `계획 대비 변경 사항`에 기록 |
|
||||
| 코드리뷰 결과 | 리뷰 에이전트가 append | 스텁에 포함하지 않음 |
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/09+08_scan_enqueue plan=0 tag=TEST -->
|
||||
|
||||
# Plan - TEST
|
||||
|
||||
## 이 파일을 읽는 구현 에이전트에게
|
||||
|
||||
`CODE_REVIEW-cloud-G06.md`의 구현 에이전트 소유 섹션을 채우는 것까지가 구현이다. 검증을 실행하고 실제 출력과 증거 경로를 기록한 뒤 active 파일을 그대로 두고 리뷰 준비를 보고한다. 선택된 SDD/Milestone lock 결정이 막을 때만 review stub의 `사용자 리뷰 요청`을 채우며, 직접 사용자에게 묻거나 `USER_REVIEW.md`, `complete.log`, archive 로그를 만들지 않는다.
|
||||
|
||||
## 배경
|
||||
|
||||
`scan-enqueue`는 Gito wakeup이 단순 changed file hint가 아니라 local develop checkout fetch, active Milestone 전체 index scan, slug 단위 `roadmap_creation_sync` enqueue로 이어지는지 닫는 작업이다. SDD S14는 unit 또는 smoke evidence를 요구하고, milestone line 77은 archive Milestone 제외까지 요구한다.
|
||||
|
||||
## 사용자 리뷰 요청 흐름
|
||||
|
||||
사용자 리뷰 요청은 선택된 SDD 결정 또는 Milestone lock 결정이 있을 때만 active review stub의 `사용자 리뷰 요청` 섹션에 기록한다. 환경/secret/service 문제는 검증 결과와 follow-up으로 남긴다.
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Immediate predecessor required by directory name: `08+07_gito_delivery/complete.log`
|
||||
- Carryover from 07: same-slug retry and safe attribute update are complete.
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `scan-enqueue`: Gito wakeup fetches local develop, scans active Milestone index, and enqueues slug reconcile jobs
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S14`: task=`scan-enqueue`; evidence=`active reconcile enqueue evidence recorded`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## 분석 결과
|
||||
|
||||
### 읽은 파일
|
||||
|
||||
- `agent-test/local/rules.md`
|
||||
- `agent-test/local/core-smoke.md`
|
||||
- `agent-test/live-cycle-smoke.md`
|
||||
- `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- `services/core/internal/gitosync/scanner.go`
|
||||
- `services/core/internal/gitosync/scanner_test.go`
|
||||
- `services/core/internal/gitosync/bridge.go`
|
||||
- `services/core/internal/gitosync/bridge_test.go`
|
||||
- `services/core/internal/scheduler/river.go`
|
||||
- `services/core/internal/scheduler/roadmap_sync_jobs.go`
|
||||
- `services/core/cmd/server/main.go`
|
||||
- `services/core/cmd/server/main_test.go`
|
||||
|
||||
### 테스트 환경 규칙
|
||||
|
||||
- test_env: `local`
|
||||
- Env rules read: `agent-test/local/rules.md`
|
||||
- Profiles read: `agent-test/local/core-smoke.md`, `agent-test/live-cycle-smoke.md`
|
||||
- Current precheck passed: `cd services/core && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/scheduler ./internal/adapters/plane ./internal/authoring`
|
||||
- Final commands use standard remote runner and focused package tests.
|
||||
|
||||
### 테스트 커버리지 공백
|
||||
|
||||
- `scanner.go` unit tests cover fetch/rev-parse/`git ls-tree` active index and archive candidate exclusion.
|
||||
- `bridge.go` tests cover one job per scanned doc and missing-create job shape.
|
||||
- Remaining gap: live Core log or queue evidence that a real Gito delivery from task 08 enqueued `roadmap_creation_sync` jobs for active Milestones, regardless of changed file hints.
|
||||
|
||||
### 심볼 참조
|
||||
|
||||
- none
|
||||
|
||||
### 분할 판단
|
||||
|
||||
- Split policy evaluated before choosing files.
|
||||
- This task depends on `08+07_gito_delivery`, because live scan/enqueue evidence must start from an accepted Gito delivery.
|
||||
- Directory predecessor `08` is not yet satisfied until `agent-task/m-plane-origin-authoring-roundtrip-sync/08+07_gito_delivery/complete.log` or matching archive complete log exists.
|
||||
- It remains separate from `plane-todo` because queue creation can be proven before provider projection runs.
|
||||
|
||||
### 범위 결정 근거
|
||||
|
||||
- Scope includes active index scan, archive exclusion, and enqueue evidence.
|
||||
- Excludes Plane comment/body/status mutation and slot terminal state.
|
||||
- Do not broaden into roadmap Task completion updates.
|
||||
|
||||
### 빌드 등급
|
||||
|
||||
- `cloud-G06`: code tests are bounded, but accepted live delivery and queue/log evidence cross runtime service boundaries.
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Predecessor `08+07_gito_delivery` complete log이 있는지 확인하고, 없으면 구현을 시작하지 않고 review stub에 dependency blocker로 기록한다.
|
||||
- [ ] Gito wakeup 후 scanner가 active Milestone 전체를 후보로 만들고 archive Milestone은 제외하는 unit/focused test output을 기록한다.
|
||||
- [ ] Remote Core log 또는 queue/DB evidence로 `roadmap_creation_sync` enqueue가 slug 단위로 발생했음을 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
### [TEST-1] Active Index Scan To Enqueue Evidence
|
||||
|
||||
#### 문제
|
||||
|
||||
- Milestone line 77 requires Gito wakeup -> local develop fetch -> active Milestone index scan -> slug reconcile enqueue.
|
||||
- `BranchRevisionScanner.Scan` fetches and verifies remote revision at `services/core/internal/gitosync/scanner.go:113`, then indexes `agent-roadmap/phase` and `agent-roadmap/archive` via `git ls-tree` at `services/core/internal/gitosync/scanner.go:133`.
|
||||
- `Bridge.Handle` scans and enqueues each doc at `services/core/internal/gitosync/bridge.go:101`.
|
||||
- Missing identity docs become missing-create jobs at `services/core/internal/gitosync/bridge.go:136`.
|
||||
|
||||
#### 해결 방법
|
||||
|
||||
- Use focused unit tests to prove scanner and bridge behavior.
|
||||
- After task 08 delivery, collect Core log or queue evidence showing `EnqueueRoadmapCreationSync` was reached for the accepted delivery.
|
||||
- If the live queue does not reflect active Milestone scan, patch only the scanner/bridge/wiring path and add a focused regression test in the relevant package.
|
||||
|
||||
#### 수정 파일 및 체크리스트
|
||||
|
||||
- [ ] `services/core/internal/gitosync/scanner.go`: inspect or patch active index behavior only if live/unit evidence fails.
|
||||
- [ ] `services/core/internal/gitosync/bridge.go`: inspect or patch enqueue args only if queue evidence is wrong.
|
||||
- [ ] `services/core/cmd/server/main.go`: inspect or patch bridge wiring only if handler reaches HTTP but not bridge.
|
||||
- [ ] `CODE_REVIEW-cloud-G06.md`: record unit output and live enqueue/log evidence.
|
||||
|
||||
#### 테스트 작성
|
||||
|
||||
- Default skip: existing tests cover active index and bridge enqueue.
|
||||
- If a defect is found, add a regression test to `services/core/internal/gitosync/scanner_test.go`, `services/core/internal/gitosync/bridge_test.go`, or `services/core/cmd/server/main_test.go` matching the defect.
|
||||
|
||||
#### 중간 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/gitosync ./cmd/server'\'''
|
||||
```
|
||||
|
||||
Expected: packages pass.
|
||||
|
||||
## 의존 관계 및 구현 순서
|
||||
|
||||
- Wait for predecessor `08+07_gito_delivery` complete log.
|
||||
- Then run focused tests, collect queue/log evidence, and only patch if evidence fails.
|
||||
- Dependent task `10+09_plane_todo` waits for this task's `complete.log`.
|
||||
|
||||
## 수정 파일 요약
|
||||
|
||||
| 파일 | 항목 |
|
||||
|------|------|
|
||||
| `services/core/internal/gitosync/scanner.go` | TEST-1 optional defect fix |
|
||||
| `services/core/internal/gitosync/bridge.go` | TEST-1 optional defect fix |
|
||||
| `services/core/cmd/server/main.go` | TEST-1 optional wiring fix |
|
||||
| `CODE_REVIEW-cloud-G06.md` | TEST-1 evidence |
|
||||
|
||||
## 최종 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/gitosync ./cmd/server ./internal/scheduler'\'''
|
||||
```
|
||||
|
||||
Expected: all listed packages pass.
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && docker compose logs --no-color --since=30m nomadcode-core | rg "gito creation sync enqueued|gito missing-create sync enqueued|roadmap_creation_sync|active milestone"'\'''
|
||||
```
|
||||
|
||||
Expected: output shows slug-level creation sync enqueue after the accepted Gito delivery, with archive Milestones not listed as sync targets.
|
||||
|
||||
모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/10+09_plane_todo plan=0 tag=TEST -->
|
||||
|
||||
# Code Review Reference - TEST
|
||||
|
||||
> **[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 SDD decision or selected Milestone `구현 잠금 > 결정 필요` item, fill `사용자 리뷰 요청` with linked evidence and stop with active files in place.
|
||||
> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation.
|
||||
> Finalization is review-agent-only.
|
||||
|
||||
## 개요
|
||||
|
||||
date=2026-06-21
|
||||
task=m-plane-origin-authoring-roundtrip-sync/10+09_plane_todo, plan=0, tag=TEST
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `plane-todo`: preserve original comment, project Milestone body/title, and move Plane work item to Todo
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S15`: task=`plane-todo`; evidence=`original comment, body update, title update, Todo move recorded`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Immediate predecessor required by directory name: `09+08_scan_enqueue/complete.log`
|
||||
- Carryover: sync identity and slug retry behavior are ready for provider projection evidence.
|
||||
|
||||
## 이 파일을 읽는 리뷰 에이전트에게
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 종결 절차는 코드리뷰 에이전트 전용이다.
|
||||
|
||||
Plane API/UI 증거와 DB ledger가 같은 reconcile cycle을 가리키는지 확인하세요.
|
||||
|
||||
## 구현 항목별 완료 여부
|
||||
|
||||
| 항목 | 완료 여부 |
|
||||
|------|---------|
|
||||
| [TEST-1] Plane Projection And Ledger Evidence | [ ] |
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Predecessor `09+08_scan_enqueue` complete log이 있는지 확인하고, 없으면 구현을 시작하지 않고 review stub에 dependency blocker로 기록한다.
|
||||
- [ ] Plane projection unit tests와 adapter tests를 remote runner에서 실행하고 출력 기록한다.
|
||||
- [ ] Plane UI/API에서 original comment, `[milestone-id]` title, projected body, Todo state를 secret 없이 기록한다.
|
||||
- [ ] DB `roadmap_sync_steps`에서 `milestone_id_matched`, `original_comment_preserved`, `plane_body_updated`, `plane_todo_moved`에 해당하는 ledger evidence를 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
## 코드리뷰 전용 체크리스트
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
|
||||
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
|
||||
|
||||
- [ ] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
|
||||
- [ ] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
|
||||
- [ ] active `CODE_REVIEW-*-G??.md`를 `code_review_cloud_G07_0.log`로 아카이브한다.
|
||||
- [ ] active `PLAN-*-G??.md`를 `plan_cloud_G07_0.log`로 아카이브한다.
|
||||
- [ ] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
|
||||
- [ ] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
|
||||
- [ ] PASS이면 active task 디렉터리 `agent-task/m-plane-origin-authoring-roundtrip-sync/10+09_plane_todo/`를 `agent-task/archive/YYYY/MM/m-plane-origin-authoring-roundtrip-sync/10+09_plane_todo/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
|
||||
- [ ] PASS이고 task group이 `m-plane-origin-authoring-roundtrip-sync`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
|
||||
- [ ] PASS split 작업이면 이동 후 빈 active parent `agent-task/m-plane-origin-authoring-roundtrip-sync/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다.
|
||||
- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-cloud-G07.md`와 `CODE_REVIEW-cloud-G07.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가 연결된 SDD/Milestone 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
|
||||
|
||||
## 계획 대비 변경 사항
|
||||
|
||||
_구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다._
|
||||
|
||||
## 주요 설계 결정
|
||||
|
||||
_구현 에이전트가 주요 설계 결정 사항을 기록한다._
|
||||
|
||||
## 사용자 리뷰 요청
|
||||
|
||||
_기본값은 `없음`이다. 구현 중 새 결정이 필요해 보여도 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 이 섹션은 선택된 SDD 결정 또는 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채운다. 외부 환경/secret/서비스 준비, 검증 증거 공백, 반복 실패, 일반 범위 조정은 사용자 리뷰 요청이 아니며 `검증 결과`, `계획 대비 변경 사항`, 또는 code-review의 일반 follow-up plan으로 처리한다._
|
||||
|
||||
- 상태: 없음
|
||||
- 사유 유형: 없음
|
||||
- 연결 대상: 없음
|
||||
- 결정 필요: 없음
|
||||
- 차단 근거: 없음
|
||||
- 실행한 검증/명령: 없음
|
||||
- 자동 후속 불가 이유: 없음
|
||||
- 재개 조건: 없음
|
||||
|
||||
## 리뷰어를 위한 체크포인트
|
||||
|
||||
- Plane UI/API evidence와 DB `roadmap_sync_steps`가 같은 work item/milestone id를 가리키는지 확인한다.
|
||||
- `original_comment_preserved`, `plane_body_updated`, `plane_todo_moved`가 모두 기록됐는지 확인한다.
|
||||
- Secret/token/signature 원문이 포함되지 않았는지 확인한다.
|
||||
|
||||
## 검증 결과
|
||||
|
||||
_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._
|
||||
|
||||
필수 규칙:
|
||||
- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다.
|
||||
- 대체가 필요하면 `계획 대비 변경 사항`에 이유와 대체 명령을 기록한다.
|
||||
- `검증 결과`에는 실제 stdout/stderr를 붙여 넣는다.
|
||||
- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면 `사용자 리뷰 요청`에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다.
|
||||
- mobile/UI hang, timeout, 또는 2분 무진행은 blind retry를 중단하고 focused rerun 명령과 screenshot/window/UI-tree evidence path를 남기며, 불가능하면 정확한 사유를 남긴다.
|
||||
|
||||
### TEST-1 중간 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/adapters/plane'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
### 최종 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/adapters/plane'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && docker compose logs --no-color --since=30m nomadcode-core | rg "roadmap creation sync completed|plane_todo_moved|plane work item created|plane body"'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''docker exec code-server-postgres psql -U nomadcode -d nomad-core-dev -c "select i.roadmap_item_id, i.work_item_id, s.step, s.completed_at from roadmap_sync_identities i join roadmap_sync_steps s on s.roadmap_sync_identity_id = i.id where s.step in ('\''develop_matched'\'','\''original_comment_preserved'\'','\''plane_body_updated'\'','\''plane_todo_moved'\'') order by s.completed_at desc limit 20;"'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> **[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`으로 복사 |
|
||||
| Spec Targets | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음; PASS 시 code-review가 `complete.log`의 `Spec 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 텍스트를 실제 내용으로 교체 |
|
||||
| 사용자 리뷰 요청 | 구현 에이전트가 채움 | 선택된 SDD 결정 또는 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채움; 구현 중 직접 질문은 금지; 환경/secret/서비스/검증 공백/일반 범위 조정은 사용자 리뷰 요청으로 쓰지 않음 |
|
||||
| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 |
|
||||
| 검증 결과 (섹션 제목 + 명령) | 스텁 생성 시 고정 | 실행 출력만 구현 에이전트가 채움; 명령 변경은 `계획 대비 변경 사항`에 기록 |
|
||||
| 코드리뷰 결과 | 리뷰 에이전트가 append | 스텁에 포함하지 않음 |
|
||||
|
|
@ -0,0 +1,171 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/10+09_plane_todo plan=0 tag=TEST -->
|
||||
|
||||
# Plan - TEST
|
||||
|
||||
## 이 파일을 읽는 구현 에이전트에게
|
||||
|
||||
`CODE_REVIEW-cloud-G07.md`의 구현 에이전트 소유 섹션을 채우는 것까지가 구현이다. Plane API/UI, DB ledger, Core log 증거를 secret 없이 기록하고 active 파일을 그대로 둔 채 리뷰 준비를 보고한다. SDD/Milestone lock 결정 외에는 직접 사용자에게 묻지 않는다.
|
||||
|
||||
## 배경
|
||||
|
||||
`plane-todo`는 reconcile job이 Plane 원문 댓글을 보존하고, Milestone 본문/제목을 projection하며, Plane work item을 `Todo`로 이동했음을 확인하는 작업이다. SDD S15는 Plane UI/API와 `roadmap_sync_steps` 증거를 함께 요구한다.
|
||||
|
||||
## 사용자 리뷰 요청 흐름
|
||||
|
||||
선택된 SDD 결정 또는 Milestone lock 결정만 review stub의 `사용자 리뷰 요청`에 기록한다. Plane credential, server state, live evidence gap은 검증 결과와 follow-up으로 처리한다.
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Immediate predecessor required by directory name: `09+08_scan_enqueue/complete.log`
|
||||
- Carryover: sync identity and slug retry behavior are ready for provider projection evidence.
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `plane-todo`: preserve original comment, project Milestone body/title, and move Plane work item to Todo
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S15`: task=`plane-todo`; evidence=`original comment, body update, title update, Todo move recorded`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## 분석 결과
|
||||
|
||||
### 읽은 파일
|
||||
|
||||
- `agent-test/local/rules.md`
|
||||
- `agent-test/local/core-smoke.md`
|
||||
- `agent-test/live-cycle-smoke.md`
|
||||
- `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- `services/core/internal/roadmapsync/plane_projection.go`
|
||||
- `services/core/internal/roadmapsync/plane_projection_test.go`
|
||||
- `services/core/internal/roadmapsync/plane_format.go`
|
||||
- `services/core/internal/roadmapsync/plane_format_test.go`
|
||||
- `services/core/internal/roadmapsyncpipeline/service.go`
|
||||
- `services/core/internal/roadmapsyncpipeline/service_test.go`
|
||||
- `services/core/internal/adapters/plane/client.go`
|
||||
- `services/core/internal/adapters/plane/client_test.go`
|
||||
- `services/core/migrations/00007_create_roadmap_sync_steps.sql`
|
||||
- `services/core/queries/roadmap_sync_steps.sql`
|
||||
- `services/core/internal/storage/roadmap_sync_steps.go`
|
||||
|
||||
### 테스트 환경 규칙
|
||||
|
||||
- test_env: `local`
|
||||
- Env rules read: `agent-test/local/rules.md`
|
||||
- Profiles read: `agent-test/local/core-smoke.md`, `agent-test/live-cycle-smoke.md`
|
||||
- Current precheck passed: `cd services/core && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/scheduler ./internal/adapters/plane ./internal/authoring`
|
||||
- Final evidence must come from remote runner plus Plane UI/API and DB ledger.
|
||||
|
||||
### 테스트 커버리지 공백
|
||||
|
||||
- Unit tests cover provider call order, original comment preservation, body/status projection, Plane adapter PATCH/POST payloads, and ledger step marking.
|
||||
- Missing live evidence: actual Plane item has `[milestone-id]` title/body, original comment, Todo state, and DB has `develop_matched`, `original_comment_preserved`, `plane_body_updated`, `plane_todo_moved`.
|
||||
|
||||
### 심볼 참조
|
||||
|
||||
- none
|
||||
|
||||
### 분할 판단
|
||||
|
||||
- Split policy evaluated before choosing files.
|
||||
- This task depends on `09+08_scan_enqueue`, because projection evidence requires a reconcile job to be enqueued.
|
||||
- It is separate from `slot-finalize` because Plane projection can succeed while task/slot finalization can still fail.
|
||||
|
||||
### 범위 결정 근거
|
||||
|
||||
- Scope includes Plane provider projection and `roadmap_sync_steps` ledger evidence.
|
||||
- Excludes workspace slot terminal mapping except where needed to locate the task.
|
||||
- Excludes creating new roadmap tasks or Plane child tickets.
|
||||
|
||||
### 빌드 등급
|
||||
|
||||
- `cloud-G07`: live Plane API/UI state and DB ledger must be reconciled with Core logs; unit tests alone are insufficient.
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Predecessor `09+08_scan_enqueue` complete log이 있는지 확인하고, 없으면 구현을 시작하지 않고 review stub에 dependency blocker로 기록한다.
|
||||
- [ ] Plane projection unit tests와 adapter tests를 remote runner에서 실행하고 출력 기록한다.
|
||||
- [ ] Plane UI/API에서 original comment, `[milestone-id]` title, projected body, Todo state를 secret 없이 기록한다.
|
||||
- [ ] DB `roadmap_sync_steps`에서 `milestone_id_matched`, `original_comment_preserved`, `plane_body_updated`, `plane_todo_moved`에 해당하는 ledger evidence를 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
### [TEST-1] Plane Projection And Ledger Evidence
|
||||
|
||||
#### 문제
|
||||
|
||||
- Milestone line 78 requires original comment preservation, Milestone body projection, `[milestone-id]` title update, and Todo move.
|
||||
- `SyncCreation` validates projection input and builds provider calls at `services/core/internal/roadmapsyncpipeline/service.go:259`.
|
||||
- `runRemainingSteps` records step ledger marks after provider calls at `services/core/internal/roadmapsyncpipeline/service.go:429`.
|
||||
- DB allowed steps are defined in `services/core/internal/storage/roadmap_sync_steps.go` and migration `00007_create_roadmap_sync_steps.sql`.
|
||||
- SDD S15 requires Plane UI/API plus ledger evidence at `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md:131`.
|
||||
|
||||
#### 해결 방법
|
||||
|
||||
- Use remote runner tests to verify local contracts.
|
||||
- Use the live work item produced by predecessor tasks to inspect Plane state and DB ledger.
|
||||
- If ledger or Plane mutation is missing, patch only the projection/service/adapter layer and add a focused regression test.
|
||||
|
||||
#### 수정 파일 및 체크리스트
|
||||
|
||||
- [ ] `services/core/internal/roadmapsyncpipeline/service.go`: optional defect fix only if step execution/ledger evidence fails.
|
||||
- [ ] `services/core/internal/roadmapsync/plane_projection.go`: optional defect fix only if projection ordering/input guard fails.
|
||||
- [ ] `services/core/internal/adapters/plane/client.go`: optional defect fix only if live Plane API payload mapping is wrong.
|
||||
- [ ] `CODE_REVIEW-cloud-G07.md`: record Plane/DB/Core evidence with secret redaction.
|
||||
|
||||
#### 테스트 작성
|
||||
|
||||
- Skip new tests if live evidence matches existing unit coverage.
|
||||
- If a defect is found, add a regression test to `service_test.go`, `plane_projection_test.go`, or `client_test.go` depending on the failing layer.
|
||||
|
||||
#### 중간 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/adapters/plane'\'''
|
||||
```
|
||||
|
||||
Expected: packages pass.
|
||||
|
||||
## 의존 관계 및 구현 순서
|
||||
|
||||
- Wait for predecessor `09+08_scan_enqueue` complete log.
|
||||
- Run focused tests.
|
||||
- Collect Plane API/UI state and DB ledger evidence from the same live work item/reconcile cycle.
|
||||
- Dependent task `11+10_slot_finalize` waits for this task's `complete.log`.
|
||||
|
||||
## 수정 파일 요약
|
||||
|
||||
| 파일 | 항목 |
|
||||
|------|------|
|
||||
| `services/core/internal/roadmapsyncpipeline/service.go` | TEST-1 optional defect fix |
|
||||
| `services/core/internal/roadmapsync/plane_projection.go` | TEST-1 optional defect fix |
|
||||
| `services/core/internal/adapters/plane/client.go` | TEST-1 optional defect fix |
|
||||
| `CODE_REVIEW-cloud-G07.md` | TEST-1 evidence |
|
||||
|
||||
## 최종 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/adapters/plane'\'''
|
||||
```
|
||||
|
||||
Expected: all listed packages pass.
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && docker compose logs --no-color --since=30m nomadcode-core | rg "roadmap creation sync completed|plane_todo_moved|plane work item created|plane body"'\'''
|
||||
```
|
||||
|
||||
Expected: output links the reconcile action to projected/complete state without secrets.
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''docker exec code-server-postgres psql -U nomadcode -d nomad-core-dev -c "select i.roadmap_item_id, i.work_item_id, s.step, s.completed_at from roadmap_sync_identities i join roadmap_sync_steps s on s.roadmap_sync_identity_id = i.id where s.step in ('\''develop_matched'\'','\''original_comment_preserved'\'','\''plane_body_updated'\'','\''plane_todo_moved'\'') order by s.completed_at desc limit 20;"'\'''
|
||||
```
|
||||
|
||||
Expected: the live target milestone/work item has the four expected steps. Do not paste secret values.
|
||||
|
||||
모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/11+10_slot_finalize plan=0 tag=TEST -->
|
||||
|
||||
# Code Review Reference - TEST
|
||||
|
||||
> **[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 SDD decision or selected Milestone `구현 잠금 > 결정 필요` item, fill `사용자 리뷰 요청` with linked evidence and stop with active files in place.
|
||||
> Do not ask the user directly, present choices in chat, or call `request_user_input` during implementation.
|
||||
> Finalization is review-agent-only.
|
||||
|
||||
## 개요
|
||||
|
||||
date=2026-06-21
|
||||
task=m-plane-origin-authoring-roundtrip-sync/11+10_slot_finalize, plan=0, tag=TEST
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `slot-finalize`: projected/failed/timeout/queue timeout/push failed/identity missing map consistently to task metadata and workspace slot state
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S16`: task=`slot-finalize`; evidence=`terminal task metadata and slot state evidence recorded`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Immediate predecessor required by directory name: `10+09_plane_todo/complete.log`
|
||||
- Carryover: Plane projection path is expected to be verified before slot finalization evidence is collected.
|
||||
|
||||
## 이 파일을 읽는 리뷰 에이전트에게
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 종결 절차는 코드리뷰 에이전트 전용이다.
|
||||
|
||||
Task metadata와 workspace slot state가 같은 live cycle을 가리키는지 확인하세요.
|
||||
|
||||
## 구현 항목별 완료 여부
|
||||
|
||||
| 항목 | 완료 여부 |
|
||||
|------|---------|
|
||||
| [TEST-1] Slot Terminal State Evidence | [ ] |
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Predecessor `10+09_plane_todo` complete log이 있는지 확인하고, 없으면 구현을 시작하지 않고 review stub에 dependency blocker로 기록한다.
|
||||
- [ ] Scheduler/authoring focused tests를 remote runner에서 실행하고 projected, dirty, error, stale queue coverage를 기록한다.
|
||||
- [ ] Live task metadata에서 `authoring_run_state`, `authoring_run_updated_at`, `wait_type`, failure category 또는 success summary를 기록한다.
|
||||
- [ ] DB/API에서 workspace slot state가 success `available`, git recovery `dirty`, bridge/provider/identity error `error` 기준과 일치함을 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
## 코드리뷰 전용 체크리스트
|
||||
|
||||
> **[REVIEW AGENT ONLY]** 이 체크리스트는 코드리뷰 에이전트만 사용한다.
|
||||
> 구현 에이전트는 이 섹션을 수정하거나 체크하지 않는다.
|
||||
|
||||
- [ ] `코드리뷰 결과`에 `PASS`, `WARN`, `FAIL` 중 하나의 판정을 append한다.
|
||||
- [ ] 판정과 `차원별 평가`, Required/Suggested/Nit 분류가 서로 일치한다.
|
||||
- [ ] active `CODE_REVIEW-*-G??.md`를 `code_review_cloud_G06_0.log`로 아카이브한다.
|
||||
- [ ] active `PLAN-*-G??.md`를 `plan_cloud_G06_0.log`로 아카이브한다.
|
||||
- [ ] `.gitignore`의 Agent-Ops 관리 block이 `agent-task/**/*.md`와 `agent-task/**/*.log`를 unignore하고 `agent-roadmap/current.md`를 ignore하는지 확인한다.
|
||||
- [ ] PASS이면 `agent-ops/skills/common/code-review/templates/complete-log-template.md` 기준으로 `complete.log`를 작성하고 active `.md` 파일을 남기지 않는다.
|
||||
- [ ] PASS이면 active task 디렉터리 `agent-task/m-plane-origin-authoring-roundtrip-sync/11+10_slot_finalize/`를 `agent-task/archive/YYYY/MM/m-plane-origin-authoring-roundtrip-sync/11+10_slot_finalize/`로 이동하고 최종 archive 경로에서 이 체크리스트를 갱신한다.
|
||||
- [ ] PASS이고 task group이 `m-plane-origin-authoring-roundtrip-sync`이면 런타임이 읽을 완료 이벤트 메타데이터를 보고하고, roadmap 수정이나 `update-roadmap` 직접 호출을 하지 않는다.
|
||||
- [ ] PASS split 작업이면 이동 후 빈 active parent `agent-task/m-plane-origin-authoring-roundtrip-sync/`를 제거하거나, 남은 sibling/file이 있어 유지했다고 확인한다.
|
||||
- [ ] WARN/FAIL이고 user-review gate가 트리거되지 않았으면 다음 active `PLAN-cloud-G06.md`와 `CODE_REVIEW-cloud-G06.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가 연결된 SDD/Milestone 결정으로 완료/PASS 해소되면 `USER_REVIEW.md`를 해소 상태로 갱신하고 `complete.log`를 작성한 뒤 task directory를 archive로 이동한다.
|
||||
|
||||
## 계획 대비 변경 사항
|
||||
|
||||
_구현 에이전트가 계획과 다르게 구현한 부분을 이유와 함께 기록한다._
|
||||
|
||||
## 주요 설계 결정
|
||||
|
||||
_구현 에이전트가 주요 설계 결정 사항을 기록한다._
|
||||
|
||||
## 사용자 리뷰 요청
|
||||
|
||||
_기본값은 `없음`이다. 구현 중 새 결정이 필요해 보여도 직접 질문하거나 선택지를 제시하거나 `request_user_input`을 호출하지 않는다. 이 섹션은 선택된 SDD 결정 또는 선택된 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채운다. 외부 환경/secret/서비스 준비, 검증 증거 공백, 반복 실패, 일반 범위 조정은 사용자 리뷰 요청이 아니며 `검증 결과`, `계획 대비 변경 사항`, 또는 code-review의 일반 follow-up plan으로 처리한다._
|
||||
|
||||
- 상태: 없음
|
||||
- 사유 유형: 없음
|
||||
- 연결 대상: 없음
|
||||
- 결정 필요: 없음
|
||||
- 차단 근거: 없음
|
||||
- 실행한 검증/명령: 없음
|
||||
- 자동 후속 불가 이유: 없음
|
||||
- 재개 조건: 없음
|
||||
|
||||
## 리뷰어를 위한 체크포인트
|
||||
|
||||
- Success path가 `authoring_run_state=succeeded`와 slot `available`로 같이 닫혔는지 확인한다.
|
||||
- Dirty/error category tests와 live evidence가 서로 모순되지 않는지 확인한다.
|
||||
- Queue timeout/stale는 force-induced live negative가 없으면 focused test 근거로만 남겼는지 확인한다.
|
||||
|
||||
## 검증 결과
|
||||
|
||||
_구현 에이전트가 각 중간 검증 및 최종 검증 명령 실행 후 출력을 여기에 붙여 넣는다._
|
||||
|
||||
필수 규칙:
|
||||
- 검증 명령은 고정된 계약이다. 임의로 대체하지 않는다.
|
||||
- 대체가 필요하면 `계획 대비 변경 사항`에 이유와 대체 명령을 기록한다.
|
||||
- `검증 결과`에는 실제 stdout/stderr를 붙여 넣는다.
|
||||
- 사용자 리뷰 요청으로 명령을 끝까지 실행하지 못했다면 `사용자 리뷰 요청`에 실행한 명령, 실제 출력, 미실행 명령의 사유를 기록한다.
|
||||
- mobile/UI hang, timeout, 또는 2분 무진행은 blind retry를 중단하고 focused rerun 명령과 screenshot/window/UI-tree evidence path를 남기며, 불가능하면 정확한 사유를 남긴다.
|
||||
|
||||
### TEST-1 중간 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/scheduler ./internal/authoring'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
### 최종 검증
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/scheduler ./internal/authoring'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''docker exec code-server-postgres psql -U nomadcode -d nomad-core-dev -c "select t.id, t.status, t.external_provider, t.external_id, t.metadata->>'\''authoring_run_state'\'' as run_state, t.metadata->>'\''wait_type'\'' as wait_type, t.metadata->>'\''authoring_failure_category'\'' as failure_category from tasks t where t.source = '\''plane'\'' order by t.updated_at desc limit 10;"'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
```sh
|
||||
$ ssh toki@toki-labs.com 'zsh -lc '\''docker exec code-server-postgres psql -U nomadcode -d nomad-core-dev -c "select id, slot_index, state, path, updated_at from workspace_slots order by updated_at desc limit 10;"'\'''
|
||||
(output)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
> **[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`으로 복사 |
|
||||
| Spec Targets | follow-up plan에서 복사해 스텁 생성 시 고정 | 구현 에이전트가 수정하지 않음; PASS 시 code-review가 `complete.log`의 `Spec 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 텍스트를 실제 내용으로 교체 |
|
||||
| 사용자 리뷰 요청 | 구현 에이전트가 채움 | 선택된 SDD 결정 또는 Milestone `구현 잠금 > 결정 필요` 항목이 실구현을 차단할 때만 채움; 구현 중 직접 질문은 금지; 환경/secret/서비스/검증 공백/일반 범위 조정은 사용자 리뷰 요청으로 쓰지 않음 |
|
||||
| 리뷰어를 위한 체크포인트 | 스텁 생성 시 고정 | 계획에서 추출한 리뷰 포인트 |
|
||||
| 검증 결과 (섹션 제목 + 명령) | 스텁 생성 시 고정 | 실행 출력만 구현 에이전트가 채움; 명령 변경은 `계획 대비 변경 사항`에 기록 |
|
||||
| 코드리뷰 결과 | 리뷰 에이전트가 append | 스텁에 포함하지 않음 |
|
||||
|
|
@ -0,0 +1,173 @@
|
|||
<!-- task=m-plane-origin-authoring-roundtrip-sync/11+10_slot_finalize plan=0 tag=TEST -->
|
||||
|
||||
# Plan - TEST
|
||||
|
||||
## 이 파일을 읽는 구현 에이전트에게
|
||||
|
||||
`CODE_REVIEW-cloud-G06.md`의 구현 에이전트 소유 섹션을 채우는 것까지가 구현이다. task metadata와 workspace slot terminal state를 실제 출력으로 기록하고 active 파일을 그대로 둔 채 리뷰 준비를 보고한다. SDD/Milestone lock 결정 외에는 직접 사용자에게 묻지 않는다.
|
||||
|
||||
## 배경
|
||||
|
||||
`slot-finalize`는 projected, failed, timeout, queue timeout, push failed, identity missing 결과가 task metadata와 workspace slot state에 일관되게 반영되는지 닫는 작업이다. 성공은 `available`, 수동 git 복구가 필요한 상태는 `dirty`, bridge/provider 오류는 `error`로 수렴해야 한다.
|
||||
|
||||
## 사용자 리뷰 요청 흐름
|
||||
|
||||
선택된 SDD 결정 또는 Milestone lock 결정만 review stub의 `사용자 리뷰 요청`에 기록한다. External service, secret, device, evidence gap은 일반 검증/후속 문제로 남긴다.
|
||||
|
||||
## Archive Evidence Snapshot
|
||||
|
||||
- Prior dependency: `agent-task/archive/2026/06/m-plane-origin-authoring-roundtrip-sync/07+05,06_slug_reconcile/complete.log`
|
||||
- Immediate predecessor required by directory name: `10+09_plane_todo/complete.log`
|
||||
- Carryover: Plane projection path is expected to be verified before slot finalization evidence is collected.
|
||||
|
||||
## Roadmap Targets
|
||||
|
||||
- Milestone: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- Task ids:
|
||||
- `slot-finalize`: projected/failed/timeout/queue timeout/push failed/identity missing map consistently to task metadata and workspace slot state
|
||||
- Completion mode: check-on-pass
|
||||
|
||||
## Spec Targets
|
||||
|
||||
- SDD: `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- Acceptance scenarios:
|
||||
- `S16`: task=`slot-finalize`; evidence=`terminal task metadata and slot state evidence recorded`
|
||||
- Completion mode: spec-check-on-pass
|
||||
|
||||
## 분석 결과
|
||||
|
||||
### 읽은 파일
|
||||
|
||||
- `agent-test/local/rules.md`
|
||||
- `agent-test/local/core-smoke.md`
|
||||
- `agent-test/live-cycle-smoke.md`
|
||||
- `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/plane-origin-authoring-roundtrip-sync.md`
|
||||
- `agent-roadmap/sdd/agent-ops-mcp-control-plane/plane-origin-authoring-roundtrip-sync/SDD.md`
|
||||
- `services/core/internal/scheduler/jobs.go`
|
||||
- `services/core/internal/scheduler/jobs_test.go`
|
||||
- `services/core/internal/scheduler/roadmap_sync_jobs.go`
|
||||
- `services/core/internal/scheduler/river.go`
|
||||
- `services/core/internal/scheduler/river_test.go`
|
||||
- `services/core/internal/scheduler/slot_finalizer.go`
|
||||
- `services/core/internal/scheduler/stale.go`
|
||||
- `services/core/internal/scheduler/stale_test.go`
|
||||
- `services/core/internal/authoring/result.go`
|
||||
- `services/core/internal/authoring/result_test.go`
|
||||
- `services/core/migrations/00005_create_workspace_slots.sql`
|
||||
- `services/core/queries/workspace_slots.sql`
|
||||
|
||||
### 테스트 환경 규칙
|
||||
|
||||
- test_env: `local`
|
||||
- Env rules read: `agent-test/local/rules.md`
|
||||
- Profiles read: `agent-test/local/core-smoke.md`, `agent-test/live-cycle-smoke.md`
|
||||
- Current precheck passed: `cd services/core && go test -count=1 ./cmd/server ./internal/http ./internal/gitosync ./internal/roadmapsync ./internal/roadmapsyncpipeline ./internal/scheduler ./internal/adapters/plane ./internal/authoring`
|
||||
- Final commands use remote runner focused tests plus live task/slot DB evidence.
|
||||
|
||||
### 테스트 커버리지 공백
|
||||
|
||||
- Unit tests cover projected/complete finalizer -> `available`, push failure -> `dirty`, bridge/identity failure -> `error`, and stale queue helper behavior.
|
||||
- Remaining gap: same live cycle evidence showing task metadata `authoring_run_state=succeeded` and workspace slot state after Plane projection, plus failure categories if a live negative path is exercised.
|
||||
|
||||
### 심볼 참조
|
||||
|
||||
- none
|
||||
|
||||
### 분할 판단
|
||||
|
||||
- Split policy evaluated before choosing files.
|
||||
- This task depends on `10+09_plane_todo`, because successful slot release evidence should follow verified Plane projection.
|
||||
- It is separate because finalizer and workspace slot updates can fail after projection succeeds.
|
||||
|
||||
### 범위 결정 근거
|
||||
|
||||
- Scope includes scheduler finalizer, authoring result category mapping, stale helper, and live slot DB evidence.
|
||||
- Excludes Plane body/status projection internals already owned by task 10.
|
||||
- Excludes Plane `Todo -> In Progress` lifecycle and child-ticket execution.
|
||||
|
||||
### 빌드 등급
|
||||
|
||||
- `cloud-G06`: focused Go tests are bounded, but live task/slot state requires remote runner and DB evidence.
|
||||
|
||||
## 구현 체크리스트
|
||||
|
||||
- [ ] Predecessor `10+09_plane_todo` complete log이 있는지 확인하고, 없으면 구현을 시작하지 않고 review stub에 dependency blocker로 기록한다.
|
||||
- [ ] Scheduler/authoring focused tests를 remote runner에서 실행하고 projected, dirty, error, stale queue coverage를 기록한다.
|
||||
- [ ] Live task metadata에서 `authoring_run_state`, `authoring_run_updated_at`, `wait_type`, failure category 또는 success summary를 기록한다.
|
||||
- [ ] DB/API에서 workspace slot state가 success `available`, git recovery `dirty`, bridge/provider/identity error `error` 기준과 일치함을 기록한다.
|
||||
- [ ] CODE_REVIEW-*-G??.md의 구현 에이전트 소유 섹션을 실제 구현 내용과 검증 출력으로 채운다. 이 항목이 완료되기 전에는 구현이 완료된 것이 아니다.
|
||||
|
||||
### [TEST-1] Slot Terminal State Evidence
|
||||
|
||||
#### 문제
|
||||
|
||||
- Milestone line 79 requires projected/failed/timeout/queue timeout/push failed/identity missing to map consistently to task metadata and workspace slot state.
|
||||
- `RoadmapCreationSyncWorker` finalizes projected/complete tasks and updates the slot to available at `services/core/internal/scheduler/roadmap_sync_jobs.go:91`.
|
||||
- `applyTaskSlotTerminalState` skips missing slot metadata and writes slot state at `services/core/internal/scheduler/slot_finalizer.go`.
|
||||
- `SlotStateForAuthoringOutcome` maps success/dirty/error categories at `services/core/internal/authoring/result.go:112`.
|
||||
- Queue stale helper applies to queued authoring tasks at `services/core/internal/scheduler/stale.go:14`.
|
||||
|
||||
#### 해결 방법
|
||||
|
||||
- Use remote focused tests to prove unit-level mappings.
|
||||
- Use the live task from task 10 to record success metadata and slot `available`.
|
||||
- If live negative categories are naturally present, record them; otherwise rely on existing focused tests and state the live negative cases were not force-induced.
|
||||
- Patch only scheduler/authoring mapping if a mismatch is found, with a regression test.
|
||||
|
||||
#### 수정 파일 및 체크리스트
|
||||
|
||||
- [ ] `services/core/internal/scheduler/roadmap_sync_jobs.go`: optional defect fix if projected/complete finalization payload or available update is wrong.
|
||||
- [ ] `services/core/internal/scheduler/jobs.go`: optional defect fix if failure categories map incorrectly.
|
||||
- [ ] `services/core/internal/authoring/result.go`: optional defect fix if category-to-slot mapping is wrong.
|
||||
- [ ] `services/core/internal/scheduler/stale.go`: optional defect fix if queue timeout/stale classification is wrong.
|
||||
- [ ] `CODE_REVIEW-cloud-G06.md`: record remote tests, task metadata, and slot state evidence.
|
||||
|
||||
#### 테스트 작성
|
||||
|
||||
- Skip new tests if all existing focused tests pass and live success evidence matches.
|
||||
- If a defect is found, add a focused regression test in `river_test.go`, `jobs_test.go`, `result_test.go`, or `stale_test.go`.
|
||||
|
||||
#### 중간 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/scheduler ./internal/authoring'\'''
|
||||
```
|
||||
|
||||
Expected: packages pass.
|
||||
|
||||
## 의존 관계 및 구현 순서
|
||||
|
||||
- Wait for predecessor `10+09_plane_todo` complete log.
|
||||
- Run focused tests, then collect live task/slot state from the same cycle.
|
||||
|
||||
## 수정 파일 요약
|
||||
|
||||
| 파일 | 항목 |
|
||||
|------|------|
|
||||
| `services/core/internal/scheduler/roadmap_sync_jobs.go` | TEST-1 optional defect fix |
|
||||
| `services/core/internal/scheduler/jobs.go` | TEST-1 optional defect fix |
|
||||
| `services/core/internal/authoring/result.go` | TEST-1 optional defect fix |
|
||||
| `services/core/internal/scheduler/stale.go` | TEST-1 optional defect fix |
|
||||
| `CODE_REVIEW-cloud-G06.md` | TEST-1 evidence |
|
||||
|
||||
## 최종 검증
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''cd "$HOME/agent-work/nomadcode/services/core" && go test -count=1 ./internal/scheduler ./internal/authoring'\'''
|
||||
```
|
||||
|
||||
Expected: all listed packages pass.
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''docker exec code-server-postgres psql -U nomadcode -d nomad-core-dev -c "select t.id, t.status, t.external_provider, t.external_id, t.metadata->>'\''authoring_run_state'\'' as run_state, t.metadata->>'\''wait_type'\'' as wait_type, t.metadata->>'\''authoring_failure_category'\'' as failure_category from tasks t where t.source = '\''plane'\'' order by t.updated_at desc limit 10;"'\'''
|
||||
```
|
||||
|
||||
Expected: latest target task shows succeeded/completed metadata after projection or explicit failure category for a negative path.
|
||||
|
||||
```sh
|
||||
ssh toki@toki-labs.com 'zsh -lc '\''docker exec code-server-postgres psql -U nomadcode -d nomad-core-dev -c "select id, slot_index, state, path, updated_at from workspace_slots order by updated_at desc limit 10;"'\'''
|
||||
```
|
||||
|
||||
Expected: target slot state matches `available`, `dirty`, or `error` mapping described in the milestone, with no secrets printed.
|
||||
|
||||
모든 코드 변경 완료 후 반드시 `CODE_REVIEW-*-G??.md`의 구현 에이전트 소유 섹션을 채운다. 이 파일 작성이 구현의 마지막 단계다.
|
||||
Loading…
Reference in a new issue