Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 44 additions & 12 deletions BACKLOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ CC-001/CC-002 were consumed by PR #24 fix bundle inline, with no standalone entr
| CC-508 | ✅ closed 2026-07-25 | executor producer 的 parent-operation control plane:可追溯子 run、受控取消與單一終態;目前納入 gate/ship,task dispatch 保留為後續接入 | arch/gate | 2026-07-21 | pr:#447 | P2 | design |
| CC-509 | ✅ closed 2026-07-22 | detached gate launch liveness:對 sandbox parent-death 早期死亡 fail-loud,提供 supervisor readiness/identity evidence | arch/gate | 2026-07-22 | pr:#440 | P2 | hygiene |
| CC-510 | ✅ closed 2026-07-23 | Codex detached dispatch continuation:App Server callback、authenticated completion envelope 與 foreground fallback | arch/DX | 2026-07-23 | pr:#443 | P2 | design |
| CC-511 | ⚠️ partial 2026-07-24 | ship publish authorization:Phase A current-tree authoritative full-suite 已交付;Phase B review-closure evidence 仍待 CC-515/CC-517 | release/gate | 2026-07-23 | pr:#446 | P1 | design |
| CC-511 | ⚠️ partial 2026-07-24 | ship publish authorization:Phase A current-tree authoritative full-suite 與 CC-515 shared verifier foundation 已交付;Phase B review-closure evidence 仍待 CC-517 | release/gate | 2026-07-23 | pr:#446 | P1 | design |
| CC-512 | ✅ closed 2026-07-27 | Slices A/B/C 已交付:coordinate sources/CLI resolution、machine-owned assurance envelope/evidence capture、shared verifier/parity ratchets;targeted 不再是 tier | ops/gate | 2026-07-23 | pr:#451 | P1 | design |
| CC-513 | 🔵 active | canonical gate policy resolver:minimum tier、required reviewers、mode recommendation 與 downgrade audit | security/gate | 2026-07-23 | | P1 | design |
| CC-513 | ✅ closed 2026-07-28 | canonical gate policy resolver:minimum tier、required reviewers、mode recommendation 與 downgrade audit | security/gate | 2026-07-23 | pr:#452 | P1 | design |
| CC-514 | 🔵 active | orthogonal delivery assurance map、machine-derived tables 與 feature/docs/high-risk recipes | docs/process | 2026-07-23 | — | P2 | design |
| CC-515 | 🔵 active | gate artifact immutable subject、freshnessconsumer applicability shared verifier | arch/gate | 2026-07-23 | | P1 | design |
| CC-515 | ✅ closed 2026-07-29 | `gate_assurance_v3` immutable subject 與 artifact/subject/policy 三軸 shared verifier;downstream scope/closure producers 分屬 CC-518/CC-517 | arch/gate | 2026-07-23 | pr:#454 | P1 | design |
| CC-516 | ⏸ deferred | evidence-gated thin delivery wrapper 評估;只組合既有 primitives,不建立 workflow engine/FSM | ux/process | 2026-07-23 | — | P3 | spike |
| CC-517 | 🔵 active | maintainer `/ship`:primary review、structured remediation closure 與 conditional targeted confirmation | process/gate | 2026-07-23 | — | P1 | design |
| CC-518 | 🔵 active | gate scope manifest v1:immutable subject、changed paths、paired tests、signals 與 bounded expansion | ops/gate | 2026-07-23 | — | P1 | design |
| CC-519 | 🔵 active | selected-reviewer coverage/finding contract:declared coverage、stable IDs 與 actionable fix boundary | ops/gate | 2026-07-23 | — | P1 | design |
| CC-520 | 🔵 active | synthesis parity 與 remediation seed:findings union、root-cause grouping、coverage matrix 與 no-silent-drop | ops/gate | 2026-07-23 | — | P1 | design |
| CC-521 | 🔵 active | test-gap matrix、protocol recovery 與 live recall evaluation 分層 | ops/test | 2026-07-23 | — | P2 | design |
| CC-522 | 🔵 active | 任意 `--test-cmd` 的 opaque/structured capability negotiation、執行失敗分類與外部 evidence recovery | ops/test | 2026-07-27 | feedback:2026-07-27 | P1 | design |
| CC-523 | 🔵 active | `pmctl gate cancel` 必須終止 reviewer 派發前仍在執行的 foreground preflight 與其 process tree | arch/gate | 2026-07-27 | feedback:2026-07-27 | P1 | hygiene |
| CC-523 | ✅ closed 2026-07-28 | `pmctl gate cancel` 必須終止 reviewer 派發前仍在執行的 foreground preflight 與其 process tree | arch/gate | 2026-07-27 | pr:#453 | P1 | hygiene |
| CC-524 | 🔵 active | `pmctl artifacts show` 顯示 canonical absolute run root 並提供穩定 machine-readable locator | ux/ops | 2026-07-27 | feedback:2026-07-27 | P2 | hygiene |
| CC-525 | 🔵 active | copy-mode verifier fallback 的 generated provenance 必須指向實際 generator,並由 parity ratchet 防止再次漂移 | ops/test | 2026-07-28 | feedback:2026-07-28 | P3 | hygiene |
| CC-526 | 🔵 active | reviewer override file 的 symlink trust-boundary hardening 與相容性契約 | security/gate | 2026-07-28 | feedback:2026-07-28 | P2 | hygiene |
Expand Down Expand Up @@ -1603,20 +1603,21 @@ current-tree full PASS 加上適用 delivery policy 的 valid review authorizati
`tests/bin/run-tests.sh --verify-full` 驗證。direct 與 parallel ship path 共用同一
finish 邊界;fresh run、invalid supplied result、relative artifact resolution、suite
failure、tree dirtiness 與 post-suite HEAD drift 都有 fail-closed regression coverage。
本次僅完成 Phase A;Phase B 的 review authorization 與 closure artifact 不在此 PR
範圍,仍待 [[CC-515]]、[[CC-517]]。
本次僅完成 Phase A;[[CC-515]] shared verifier foundation 已於 pr:#454 交付,
Phase B 的 review authorization 與 closure artifact 不在此 PR 範圍,仍待
[[CC-517]]。

**Done-when**: 任一官方 ship publish path 都只能在(1)current tree authoritative
full-suite PASS 有效;(2)review authorization 對目前 delivery policy 有效;
(3)branch、HEAD、tree 與 evidence subject 匹配後 push/開 PR。Phase A 可先獨立
ship;Phase B 在 [[CC-515]]、[[CC-517]] 完成後收斂。
ship;Phase B 在 [[CC-517]] 完成後收斂。

**Non-goals**: 不把 full suite 搬進 generic gate;不要求所有 final tree 都 full
re-gate;不建立第二套 test-result schema;不把 publish authorization 等同 merge
authorization。

**Dependencies**: Phase A 複用 [[CC-449]]/[[CC-491]],可立即實作;Phase B 依賴
[[CC-515]][[CC-517]]。
**Dependencies**: Phase A 複用 [[CC-449]]/[[CC-491]],可立即實作;Phase B
[[CC-515]] verifier dependency 已滿足,剩餘依賴為 [[CC-517]]。

**Cross-link**: [[CC-512]]、[[CC-513]]、`docs/test-runner-contract.md`。

Expand Down Expand Up @@ -1747,7 +1748,7 @@ current-tree authoritative full suite為97 passed、0 failed、0 skipped。

---

## CC-513 — canonical gate policy resolver 🔵 active
## CC-513 — canonical gate policy resolver ✅ 2026-07-28

**Problem**: sensitive-path regex、brief `architecture_impact`、tier detection、
reviewer defaults、mode suggestions 與 CLI overrides 分散在不同 branches/文件。
Expand Down Expand Up @@ -1795,6 +1796,15 @@ maintainer policy 可獨立測試,full 不再隱含或強制 parallel。

**Cross-link**: [[CC-065]]、[[CC-512]]、[[CC-515]]、[[CC-517]]、[[CC-518]]。

**Outcome**: Shipped the canonical gate-policy resolver and versioned policy
registries. Generic and maintainer consumers now resolve minimum tier, required
reviewer coverage, recommended mode, explicit user-mode provenance, matched
signals, and bounded downgrade approval once; the machine-owned assurance
envelope carries and verifies that result across foreground, detached, wait,
and ship paths. Explicit sequential/parallel choice remains user-owned.

**See**: pr:#452

---

## CC-514 — orthogonal delivery assurance map 與 recipes 🔵 active
Expand Down Expand Up @@ -1851,7 +1861,7 @@ lint 阻止 tier/mode/full-suite 順序重新漂移。

---

## CC-515 — immutable subject、freshness 與 applicability verifier 🔵 active
## CC-515 — immutable subject、freshness 與 applicability verifier ✅ 2026-07-29

**Problem**: preflight tests 已有 repo/base/head/tree evidence,但 final gate artifact
主要依賴 prose `Final:`。外部 consumer 無法分辨 artifact 本身壞掉、subject 已過期,
Expand Down Expand Up @@ -1889,6 +1899,20 @@ manifest 與 remediation closure 共同依賴,屬 P1 evidence foundation。
並以 stable repo subject 驗證 artifact;沒有 consumer 再以 `Final: GO` 當作 freshness
或 publish authorization。

**Outcome**:Shipped `gate_assurance_v3`、immutable Git subject、linked preflight
digest,以及 `pmctl gate verify` 的 artifact/subject/policy 三軸 assessment;
gate wait 與 ship finish 都改用同一 shared verifier。Copy/replay、linked worktree、
different repo、base/head/tree drift、fixed ref、digest 與 policy insufficiency
都有直接回歸。Evidence link contract 對 scope manifest/closure 明確支援
`unavailable|verified`,verified link 會驗 basename、digest 與 subject fingerprint。

本票擁有的 verifier foundation 已完整交付。`gate_scope_manifest_v1` 的內容與 producer
仍由 [[CC-518]] 負責;`remediation_closure_v1` 的 lifecycle 與 producer 仍由
[[CC-517]] 負責。兩者是依賴 CC-515 的 downstream evidence,不是 CC-515 的未完成
範圍。

**See**: pr:#454

**Non-goals**: 不以 gate artifact 取代 test result;不把 policy applicable 等同
merge authorization;不要求 worktree path 永久固定。

Expand Down Expand Up @@ -2228,7 +2252,7 @@ protocol recovery contract保持正交。P1。

---

## CC-523 — gate cancel 終止 pre-review foreground producer work 🔵 active
## CC-523 — gate cancel 終止 pre-review foreground producer work ✅ 2026-07-28

**Framing**: 本票是 [[CC-508]] parent-operation cancellation 契約的 regression
closure,不重做 operation control plane、`pmctl dispatch cancel` 或 gate workflow。
Expand Down Expand Up @@ -2291,6 +2315,14 @@ timeout 預設。
dispatch cancellation 與 [[CC-509]] supervisor identity/liveness evidence。P1,
應先於下一次依賴 foreground gate cancellation 的 maintainer delivery 處理。

**Outcome**: Gate parent operations now persist verified producer process
identity before pre-review work. Cancellation stops and reaps the foreground
preflight or detached supervisor process tree before terminalizing the
operation, preserves indeterminate on unverifiable termination, and prevents
late reviewer dispatch or terminal overwrite.

**See**: pr:#453

---

## CC-524 — artifacts show canonical absolute run root 🔵 active
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ Versions follow [Semantic Versioning](https://semver.org/).

### Added

- **Immutable gate subject and shared three-axis verification (CC-515).**
Current gate producers emit `gate_assurance_v3` with a stable Git
common-directory repository key, provenance-only observed root, base/head
refs and commits, tree fingerprint, subject kind/dirty policy, timestamps,
and digest-bound evidence links. `pmctl gate verify` now reports
`artifact_valid`, `subject_current`, and `policy_applicable` independently
with reason codes and optional JSON output. Named consumers require all
three axes; default inspection remains compatible with historical
artifact-validity checks. Gate wait and ship finish use the same verifier,
so stale or policy-insufficient GO text cannot authorize continuation.

- **Parent-operation control plane for indirect dispatch (CC-508).** Producers
that launch detached children — `pmctl gate run` and `pmctl ship` — now create
a durable parent operation record (`core/schema/operation.schema.json`, owned
Expand Down
39 changes: 39 additions & 0 deletions DECISIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,45 @@ H2 標題格式:## YYYY-MM-DD: <短描述>
與 BACKLOG closure 對應的 entry,內文首行寫:Closes: BACKLOG.md#<PREFIX>-NNN
-->

## 2026-07-28: gate-assurance-v3-separates-validity-freshness-applicability

Relates: CC-515

**Context**: `gate_assurance_v2` 可以驗證 result/sidecar digest、resolved
coordinates、policy snapshot 與 protected dispatch records,但 repository root
同時被當作 provenance 和 identity。Consumer 因此無法區分 artifact 被竄改、artifact
仍完整但 base/head/tree 已漂移,或 evidence 完整但不符合目前 consumer policy。
`gate wait` 與 `ship finish` 也各自保留 continuation 判定,容易再次退回只讀
`Final: GO`。

**Decision**: Producer 升級為 `gate_assurance_v3`,加入 `gate_subject_v1`:
repository key 由 Git common-directory identity 與 optional remote identity
組成,observed root 只作 provenance;subject 同時綁定 base/head ref+commit、tree
fingerprint、`committed_head|working_tree|fixed_ref`、對應 dirty policy,以及
created/finished observation。Evidence 區塊以 digest 和 subject fingerprint 連結
preflight,並為尚未有 producer 的 scope manifest/closure 明示 `unavailable`。
Protected attestation 升級並綁定完整 subject digest。

Shared verifier 固定輸出 `artifact_valid`、`subject_current`、
`policy_applicable` 三軸與 reason codes。預設 inspect 只維持舊 artifact-validity exit
相容性;指定 consumer 時三軸都必須 pass。`gate wait` 和 `ship finish` 只消費此
shared assessment。不同 linked worktree 的 physical path 不造成 stale;copy/replay
可保持 artifact valid,但不攜帶 canonical dispatch authorization。

**Alternatives considered**: (a) 把 freshness 混進 artifact validity——否決,
base advance 或 working-tree drift 不會改寫歷史 artifact,不能標成 forged。
(b) 只強化 `ship finish`——否決,會讓 wait、publish 與未來 consumer 各自重做
identity/freshness 邏輯。(c) 用 observed absolute root 當唯一 repository
identity——否決,linked worktree 和搬移後的同一 Git subject 會誤判。

**Constraints introduced**: 新 consumer 不得從 `Final: GO` 推論 freshness 或
policy applicability;不得把 physical worktree path 單獨當失效條件。v1/v2 artifact
保留 inspection 相容性,但不能提供 immutable-subject/applicability authorization。
Policy applicable 不等於 merge authorization;current-tree tests、closure 與 merge
授權仍由各自 consumer contract 決定。

---

## 2026-07-27: targeted-review-is-a-pass-kind-not-a-tier

Relates: CC-512, CC-513, CC-515, CC-517, CC-519
Expand Down
4 changes: 2 additions & 2 deletions MILESTONES.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@
| 票 | 摘要 | 狀態 |
|----|------|------|
| CC-512 | Slices A/B/C:coordinate sources/CLI resolution、machine-owned assurance envelope/evidence capture、shared verifier/parity ratchets;targeted 不再是 tier | ✅ pr:#451 |
| CC-513 | canonical resolver:minimum tier、required reviewers、mode recommendation/user-choice provenance、generic vs maintainer policy 與 tier/coverage downgrade audit | 🔵 |
| CC-515 | immutable subject;artifact validity、subject freshness、policy applicability 三軸 shared verifier | 🔵 |
| CC-513 | canonical resolver:minimum tier、required reviewers、mode recommendation/user-choice provenance、generic vs maintainer policy 與 tier/coverage downgrade audit | ✅ pr:#452 |
| CC-515 | immutable subject三軸 shared verifier 與 downstream evidence link contract;scope/closure producers 分屬 CC-518/CC-517 | ✅ pr:#454 |

### Phase 8 — existing gate structured evidence

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ router and [`cli/commands.tsv`](cli/commands.tsv).
- `validate brief` — Validate a dispatch brief. [experimental; JSON: false; mutating: false]
- `decision add` — Append a structured decision. [experimental; JSON: true; mutating: true]
- `gate run` — Start the pull-request gate. [experimental; JSON: false; mutating: true]
- `gate verify` — Verify a gate result artifact. [experimental; JSON: false; mutating: false]
- `gate verify` — Assess artifact validity, subject freshness, and consumer applicability. [experimental; JSON: true; mutating: false]
- `gate wait` — Wait for a detached gate run. [experimental; JSON: false; mutating: true]
- `gate cancel` — Stop the verified gate producer process tree, then cancel only its recorded child runs; partial termination stays indeterminate. [experimental; JSON: false; mutating: true]
- `gate reconcile` — Reconcile a gate operation from trusted child terminal claims. [experimental; JSON: false; mutating: true]
Expand Down
2 changes: 1 addition & 1 deletion cli/commands.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ safe bash Run a shell command through guard policy. pmctl safe bash --role <role
validate brief Validate a dispatch brief. pmctl validate brief <path> [options] experimental false false --schema pmctl validate brief /tmp/brief.md
decision add Append a structured decision. pmctl decision add --date <date> --title <title> --path <path> [options] experimental true true --date, --title, --path, --closes, --tags, --evidence, --json pmctl decision add --date 2026-01-01 --title "Example" --path DECISIONS.md
gate run Start the pull-request gate. pmctl gate run [options] experimental false true --executor, --test-cmd, --cd pmctl gate run --executor codex
gate verify Verify a gate result artifact. pmctl gate verify <result-file> experimental false false none pmctl gate verify .gate-results/result.json
gate verify Assess artifact validity, subject freshness, and consumer applicability. pmctl gate verify <result-file> [--cd <repo>] [--consumer embedded|generic|maintainer|publish] [--json] experimental true false --cd,--consumer,--json pmctl gate verify .gate-results/result.md --cd . --json
gate wait Wait for a detached gate run. pmctl gate wait <gate-id> [options] experimental false true --cd, --timeout pmctl gate wait gate-123 --cd .
gate cancel Stop the verified gate producer process tree, then cancel only its recorded child runs; partial termination stays indeterminate. pmctl gate cancel <operation-id> --cd <dir> [--grace <seconds>] experimental false true --cd, --grace pmctl gate cancel op-20260724T000000Z-abcdef --cd .
gate reconcile Reconcile a gate operation from trusted child terminal claims. pmctl gate reconcile <operation-id> --cd <dir> experimental false true --cd pmctl gate reconcile op-20260724T000000Z-abcdef --cd .
Expand Down
Loading