nomadcode/agent-test/plane-dev.md

124 lines
8.6 KiB
Markdown

# Plane Dev Test Fixtures
이 문서는 dev Plane 연동 테스트에서 반복 사용하는 non-secret 식별자를 기록한다.
API token, webhook secret, password 같은 secret 원문은 이 파일에 쓰지 않는다.
## NomadCode Project
- Plane base URL: `https://plane.toki-labs.com`
- Workspace slug: `general`
- Workspace id: `dadf050e-cd1e-4590-bc33-672511630841`
- Project id: `a6beb42f-7a8a-410c-b50f-ea3ca94828f3`
- Project identifier: `NOMAD`
## State IDs
- Backlog: `62d4c50c-0cea-4a76-a0ed-ec97498b2d5f`
- Todo: `45ba7449-f684-4381-af6d-5854747c5e8d`
- In Progress: `c6ac1a6b-74d5-47fb-8b36-646d2bf0284d`
- User Review: `dc4fb920-f763-4ae3-9569-3c5e2d500391`
- Done: `ea2e5b48-8bf1-4723-b749-de7723be41e9`
- Cancelled: `f29c06c2-d70c-4b56-a83c-fccc4db60ae4`
## Users
- AGENT assignee user id: `5d116a77-d3df-4f54-80bf-eca61e0118c4`
## Webhook Dispatch Env (non-secret)
webhook dispatch trigger gate에 주입하는 non-secret env. secret(`PLANE_WEBHOOK_SECRET`, `PLANE_TOKEN`)은 여기에 쓰지 않는다.
- `PLANE_WORKSPACE_SLUG`: `general` (webhook payload는 workspace UUID만 주므로 ref tenant slug는 이 값으로 주입한다)
- `PLANE_WORKSPACE_ID`: `dadf050e-cd1e-4590-bc33-672511630841` (optional guard; payload workspace id와 다르면 dispatch 없이 ignored)
- `PLANE_CREATION_BACKLOG_STATE_ID` (alias `PLANE_BACKLOG_STATE_ID`): `62d4c50c-0cea-4a76-a0ed-ec97498b2d5f`
- `PLANE_AGENT_ASSIGNEE_ID`: `5d116a77-d3df-4f54-80bf-eca61e0118c4`
- `PLANE_SELF_ACTOR_ID`: NomadCode self actor id가 정해지면 채운다. 비어 있으면 self-mutation guard는 no-op이다.
## Webhook Smoke Baseline
- Webhook URL: `http://toki-labs.com:18010/api/integrations/plane/webhook`
- Dev profile Core endpoint on the remote host: `http://127.0.0.1:18011/api/integrations/plane/webhook`
- Webhook secret storage: SOPS encrypted `secrets/nomadcode.dev.sops.yaml` key `PLANE_WEBHOOK_SECRET`
- 2026-06-14 webhook-only smoke used existing Backlog items `NOMAD-10` and `NOMAD-11` by assigning AGENT.
- 2026-06-15 live smoke used new Backlog item `93b677f5-7913-4111-ae05-916033ae533b` (WEBHOOK_SMOKE-test-1781525263). Webhook delivery succeeded (202 Accepted) and triggered authoring run with Core Task ID `e3c92411-4056-4b76-a879-66f7904125d0`.
## Dev Full-Cycle Baseline
2026-07-03 dev profile에서 Plane-origin milestone 생성 roundtrip을 확인했다. 이 섹션은 non-secret evidence만 기록한다.
검증용 Plane work item과 생성 milestone은 같은 날 cleanup되었으며, Plane item은 404이고 git milestone 파일은 cleanup commit `4c5d56f` 이후 `origin/develop`에 남아 있지 않다.
### Primary automatic proof (cleaned up)
- Plane work item: `982c14b6-b57f-4de9-8773-bcf00fe1d25a`
- Created title marker: `LIVE-SYNC post-allowlist auto smoke 1783057173`
- Core task: `89e40ba4-efbd-4254-b873-48e54e33ade0`
- git `origin/develop`: `42b0d1a8a5790a6fb93f84cf04925d06a0290ce7`
- commit summary: `42b0d1a docs(roadmap): post allowlist smoke 마일스톤을 추가한다`
- added milestone path: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/post-allowlist-automatic-plane-git-gito-plane-smoke-1783057173.md`
- Forgejo provider delivery: `c77f67fe-3e18-484e-b292-9813e1c741e4`, hook task `is_succeed=t`, Gito callback status `202`
- Gito event: `event-de33bb1fc267c84a`, type `branch.updated`, repo `nomadcode`, branch `develop`
- Plane final state before cleanup: `Todo` (`45ba7449-f684-4381-af6d-5854747c5e8d`)
- cleanup commit: `4c5d56f revert(roadmap): remove Plane live smoke milestones`
### Diagnostic run (cleaned up)
- Plane work item: `67706758-9555-456b-b051-547fa6b4f093`
- git `origin/develop`: `738f4b8d202e9254f7c4c8fe91bb6f5e729100f0`
- This run exposed a dev Forgejo allowlist issue before the automatic provider delivery path was fixed.
- The run was completed after Gito callback redelivery, so it is evidence for Core/Gito/Plane projection recovery but not primary proof of automatic Forgejo -> Gito delivery.
- cleanup commit: `4c5d56f revert(roadmap): remove Plane live smoke milestones`
## Dev Git-Origin Baseline
2026-07-03 dev profile에서 Git-origin active Milestone missing-create roundtrip을 확인했다. 이 섹션은 non-secret evidence만 기록한다.
검증용 Plane work item과 disposable Milestone은 같은 날 cleanup되었으며, Plane item은 404이고 git milestone 파일은 cleanup commit `448d6d0` 이후 `origin/develop` active tree에 남아 있지 않다.
### Git-origin proof (cleaned up)
- Disposable milestone slug: `agent-origin-live-smoke-20260703T093822Z`
- Added milestone path: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/agent-origin-live-smoke-20260703T093822Z.md`
- Initial git `origin/develop`: `77c902d4c80e92c520575becb95a1abe36219a26`
- Initial Gito event: `event-0d8d8406b3b0b325`, changed file `added`
- Plane work item created by Core: `bea3ed89-928a-4091-88d0-bbd5907ec464`
- Identity backfill git `origin/develop`: `e21644ee65d46449d3ec7f4f5fbd71697297812d`
- Core evidence: `gito missing-create sync enqueued`, `provider identity backfilled to develop`, `gito self-authored backfill revision observed`, `gito creation sync enqueued`, `roadmap creation sync completed`
- Plane final state before cleanup: `Todo` (`45ba7449-f684-4381-af6d-5854747c5e8d`)
- cleanup commit: `448d6d0 smoke cleanup: remove disposable agent-origin milestone agent-origin-live-smoke-20260703T093822Z`
- cleanup Gito event: `event-103224a7fa11b012`, changed file `deleted`
### Git-origin environment findings
- First backfill attempt failed at `git commit` with `Author identity unknown`. Fix: configure non-secret `user.name` and `user.email` in the dev `GITO_DEVELOP_REPO_PATH` checkout before Git-origin smoke.
- Second backfill attempt failed at `git push` with `could not read Username for 'https://git.toki-labs.com'`. Fix: ensure the Core dev container can read the configured git credential store mount, then recreate the `nomadcode-core-dev` compose service.
- After both env fixes, redelivering by a small follow-up milestone edit resumed the existing missing-create identity instead of creating a duplicate Plane work item.
### User-visible Git-origin proof (cleaned up after user confirmation)
- Disposable milestone slug: `agent-origin-live-leave-20260703T104229Z`
- Added milestone path: `agent-roadmap/phase/agent-ops-mcp-control-plane/milestones/agent-origin-live-leave-20260703T104229Z.md`
- Initial git `origin/develop`: `a808912f4c73b64bf18388925a38a5a41ab8a3ce`
- Initial Gito event: `event-e06e64248f856bda`, changed file `added`
- Plane work item created by Core: `78584703-23e1-4ff3-9019-b6f1f5fc580e`
- Identity backfill git `origin/develop`: `c1db9de07bb26da7e5b8850fce330f48eada323a`
- Plane final state: `Todo` (`45ba7449-f684-4381-af6d-5854747c5e8d`)
- Cleanup status: user confirmed inspection, then Plane item deleted (`GET 404`) and active Milestone removed from `origin/develop`.
- cleanup commit: `b964287 smoke cleanup: remove user-visible agent-origin milestone agent-origin-live-leave-20260703T104229Z`
- cleanup Gito event: `event-434583e35d1b7249`, changed file `deleted`
## Agent Usage Notes
- 새 full-cycle test item은 `Backlog` state와 AGENT assignee로 만든다.
- 제목/본문에는 timestamp marker를 넣어 git commit, milestone slug, Plane item을 쉽게 대조할 수 있게 한다.
- 요청 범위는 roadmap milestone 문서처럼 작은 산출물로 제한하고, 기능 코드 구현이나 contract 변경을 요구하지 않는다.
- full-cycle 통과 판정은 `agent-test/live-cycle-smoke.md`의 dev profile 자동 경로 체크리스트를 따른다.
- `Todo` 이동 확인 전에는 Plane item이 완료됐다고 보고하지 않는다.
- Git-origin smoke는 provider identity가 없는 disposable active Milestone으로 시작하고, Plane 생성 후 Core-authored identity backfill commit과 self-loop projection까지 확인한다.
- raw API token, webhook secret, provider credential, private key는 이 문서나 최종 응답에 기록하지 않는다.
## Webhook Payload Fixtures
`services/core/internal/http/testdata/` 아래 fixture로 payload shape를 고정한다. 모든 fixture는 PII/secret redaction 상태이며 work item id는 placeholder다.
- `plane_webhook_issue_assignees_updated.json`: live dev Plane assignee-update 로그 기반 redacted 샘플 (`event=issue`, `action=updated`, `activity.field=assignees`).
- `plane_webhook_issue_created.json`: create 후보. live create 로그를 따로 확보하지 않아 관찰된 issue envelope 기반 synthetic candidate다 (`event=issue`, `action=created`, Backlog state).
- `plane_webhook_issue_state_updated.json`: state-change 후보. synthetic candidate다 (`event=issue`, `action=updated`, `activity.field=state`, Backlog -> Todo).