Skip to content

fix(state-checkpoint): authenticate procedural history snapshots - #599

Merged
seonghobae merged 6 commits into
mainfrom
feat/procedural-history-authority-20260911
Sep 10, 2026
Merged

fix(state-checkpoint): authenticate procedural history snapshots#599
seonghobae merged 6 commits into
mainfrom
feat/procedural-history-authority-20260911

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Purpose

Before the next #584 Policy / Approval CAS slice can consume durable procedural evaluation history as authority, State / Checkpoint must expose a provenance-preserving verified snapshot boundary. Protected #597 verifies retained bytes when reading, but its public ProceduralEvaluationHistorySnapshot is structurally cloneable and currently has no assertion proving that a downstream approval consumer received a snapshot emitted by the verified repository rather than a caller-forged lookalike.

Test-first reality target

Test-only exact 0a98737be64b15163ca41b46d12f94c0084f910e requires assertProceduralEvaluationHistorySnapshot() to accept a repository-verified snapshot while rejecting both structuredClone(snapshot) and null. The function does not exist on the protected base, so this exact is intentionally RED until the minimal State / Checkpoint provenance repair is implemented.

Current repair lineage

18ae9d8535b702dc9582cbb9e8f821f8426ae496 adds the minimal provenance reader/assertion and 6952cec5a56eb4cd85183b559707dd7baf375cc7 completes the focused exercise. On that exact, application CI 34498162685 produced a real repository-owned RED after typecheck: the public-API documentation gate rejected assertProceduralEvaluationHistorySnapshot because its callable JSDoc lacked an @returns contract. 1f735460749bbefe247a893471a7899c8a87c467 repairs only that public contract and re-earned application CI, reviewer-ci, central Security Scan, and patch-validator-image GREEN on the exact head.

Current-head review then found a separate code-currentness gap: this new public State / Checkpoint boundary was absent from CHANGELOG.md ## Unreleased, despite the protected procedural implementation plan requiring source-boundary changes to be recorded there before merge. 7674355ffa36dad588ab23db81d2752965792ceb added the entry; review of its diff caught two unrelated text drifts introduced while replacing the large changelog, so 77a66b8b7bce7dd33272e2ae5c2ce00c7e3484da restores those bytes. The protected-main→current CHANGELOG diff is now exactly one added #599 entry. No predecessor GREEN transfers to this new exact head.

Boundary

This PR is a foundation repair only. It must not create Policy / Approval decisions, graph publication, activation authority, another State / Checkpoint store, Workflow / Task truth, Keyverse custody/discovery, provider routing, quarantine/security or outbound authority. The process-local admission proves repository-verified provenance at read time; it does not prove currentness after a later durable append. ADR-0017 remains Proposed and activationAuthorized:false remains invariant.

Related: #584, #597, #598.

@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread test/procedural-evaluation-history-authority.test.mjs Fixed
Comment thread test/procedural-evaluation-history-authority.test.mjs Fixed
Comment thread test/procedural-evaluation-history-authority.test.mjs Fixed

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head review after the application-CI repair: the source/test delta now passes the four exact-head gates, and the JSDoc return-contract failure is causally repaired. One repository-owned documentation finding remains before this runtime API can be called code-current: #599 adds a new State / Checkpoint public authority boundary, but the PR still has no CHANGELOG.md ## Unreleased entry. The protected procedural implementation plan explicitly requires behavior/source-boundary changes to be recorded under Unreleased before merge. Keep this Draft until that delta is added and the new exact head re-earns all gates; do not transfer predecessor GREEN. ADR-0017 remains Proposed and this boundary must remain provenance-only, not Policy / Approval or activation authority.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current-head review at 77a66b8b7bce7dd33272e2ae5c2ce00c7e3484da: no additional valid source/test/DDD finding remains in the three-file delta. The real public-API documentation RED is causally repaired, the new State / Checkpoint read-authority boundary is recorded under CHANGELOG.md ## Unreleased, and the unrelated changelog byte drift from the large-file edit was restored so the changelog diff is one #599 entry only. All inline bot threads are resolved. The WeakSet admission proves process-local provenance of a repository-verified read result only; it does not prove currentness after a later durable append and cannot mint Policy / Approval, graph publication or activation authority. ADR-0017 remains Proposed and activationAuthorized:false remains invariant. No self-approval.

@seonghobae
seonghobae marked this pull request as ready for review September 10, 2026 16:17
@seonghobae
seonghobae merged commit 69fce6c into main Sep 10, 2026
17 of 18 checks passed
@seonghobae
seonghobae deleted the feat/procedural-history-authority-20260911 branch September 10, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant