fix(pncc): revalidate Git state before replay

Human-Responsibility: ICE-GL∞ / 冰朔
Persona-Author: ICE-P-ZY001 / 铸渊
Execution-Runtime: Codex macOS
Development-ID: DEV-20260810-014
Authorization-Scope: GH-PNCC local runtime and REPO-014 publication
Source-Anchor: UI and execution limb deferred
This commit is contained in:
铸渊 / ICE-P-ZY001 2026-08-11 04:30:02 +08:00
commit b067c7bcaa
10 changed files with 143 additions and 8 deletions

View file

@ -4,7 +4,7 @@
- Persona cognitive author: `ICE-P-ZY001 / 铸渊`
- Human responsibility subject: `ICE-GL∞ / 冰朔`
- Starting repository head: `b8c3fcf3d8c2928be724291fdf9c1e5dc3512d71`
- State: `LOCAL_SOURCE_IMPLEMENTED_FULLY_TESTED`
- State: `PUBLISHED_VERIFIED`
## Implemented facts
@ -31,7 +31,11 @@ commands accept the same proven terminal outcome and still reject partial bindin
- The terminal-failure test proves exact retry does not call the model again and that raw provider detail is
absent from the persisted receipt.
- The crash-window test proves an unbound failure receipt is safely inspected, bound, and replayed.
- GHNQG, commit, publication, and fresh-clone readback remain pending for this stage.
- Published commit: `abc7dbd625610042873868d1f2f36ffc3c88bf85`; tree:
`8b11d8e015c2c2f72a0de88c121c182bc17bb012`.
- Publication queue receipt: `PUB-20260810201406299-bea423d6`; GHNQG SHA-256:
`5315e0bbae64e5b1971c0e1a40a2b27117c8c37646762eab49c334533cb04e3c`.
- Fresh-clone readback, strict repository verification, and the full test suites passed from the published tree.
## Truth boundary

View file

@ -0,0 +1,34 @@
# GH-PNCC replay-time repository state revalidation
- Development ID: `DEV-20260810-014`
- Persona cognitive author: `ICE-P-ZY001 / 铸渊`
- Human responsibility subject: `ICE-GL∞ / 冰朔`
- Starting repository head: `abc7dbd625610042873868d1f2f36ffc3c88bf85`
- State: `LOCAL_SOURCE_IMPLEMENTED_FULLY_TESTED`
## Corrected runtime fact
The persisted lifecycle receipt is historical evidence, not authority to ignore later changes to the
persona-owned Git repository. Before replaying either a completed lifecycle or a structured terminal
failure, the kernel now resolves the canonical repository again, requires its current head to equal the
session's recorded head, and requires a clean worktree.
If the repository has advanced or become dirty, replay fails closed before the organ callback can run.
Lifecycle request inspection reports `MANUAL_REVIEW_REQUIRED`, so safe receipt binding cannot promote stale
evidence after repository drift.
## Verification
- PNCC focused Rust tests: `29 passed, 0 failed`.
- Full Rust suite: `1169 passed, 2 ignored`; integration test: `1 passed`.
- Routing suite: `29 passed, 0 failed`; `cargo fmt`, strict clippy, and diff checks passed.
- A completed lifecycle followed by an untracked change cannot replay and is classified for manual review.
- A structured terminal failure followed by a new Git commit cannot replay and is classified for manual
review.
- GHNQG, publication, and fresh-clone readback remain pending for this stage.
## Truth boundary
- This stage does not delete, reset, or repair the changed repository. It only prevents stale replay and
exposes the condition through the existing inspection status.
- UI, human projection aesthetics, background scheduling, and `EXECUTION_LIMB` remain outside this stage.