key.store: inspect sealed terminal operation recovery without scheduling #432
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/canonical-terminal-inspection-20261018"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Operation-bearing Pi state currently refuses downgrade because an old SDK writer cannot preserve original frozen intents and receipts. Add a separate scheduler-free inspector that verifies terminal active and archived operations against their original SDK tasks, consumed input fingerprints and fixed identity/thread, then returns private recovery data from its own verified disposable copy.
The inspector preserves provider identity, full pinned SDK context semantics, unfinished program/wake evidence and complete committed receipts. It rejects uncertain operations, unanswered original inputs, live tasks, foreign scope, missing/corrupt archives, torn journals, links and a temporary root inside canonical storage. Canonical storage is never opened by the SDK. The immutable Nix package generates an ABI/content manifest. The worker change only shares its existing passive ownership projection.
Validation: pinned Nix package build and both authoritative Bazel targets PASS:
//services/agent-dispatcher-overlay:dispatcher_integration_testand//services/resident-pi:durable_engine_acceptance_test; all 81 installed Pi tests pass with zero skips. Tests use actual pinned SDK JSONL storage and 35 original committed mutations across active/cold receipts, readonly originals, context edits/images/opaque reasoning, provider UUID, original wake IDs/revisions, pending deadline and failure controls. No paid requests or live mutations. Reproduce using services/resident-pi/README.md and the dispatcher CI workflow's pinned dependency setup. Private qualification records are retained on Forge at continuation-20261018/canonical-terminal-inspector-r3.This is inspection only:
safe_for_downgrade:false. Python contract verification, Go journal export and return-to-original-SDK restore witness are unfinished. The exporter and worker retain all operation-bearing prewriter refusal guards. No deployment, cohort enablement, evidence deletion, task/product acceptance or provider/model/spending change. KSE-0215 and canonical Redmine task177 retain the remaining gates.Request complete independent Infra integration/recovery and Senior Security reviews of this entire exact-head diff, then separate COO final after those peers and original current-head CI. Peers should distinguish checks they run from inspected author evidence. Author follows original post-merge CI. Native signatures must be verified against trusted main signers; Forgejo missing-key metadata is not an unsigned commit or key-rotation instruction.
Current exact head:
3abd1deba9ddb5a8d9e5f42f50956c9578f8f5d1, single parent reviewed maindc362c41156177865a0094ababc61cf42b3b425d(landed PR431). Inspector runtime bytes match prior64b4; both KSE appendices are retained. Both authoritative Bazel targets and all81 installed Pi cases passed again on this combined base. Previous64b4 reviews/CI are historical and do not satisfy the new-head gates. Request fresh complete12-file peer verdicts and separate COO final after new original CI.Infra integration/recovery verdict: APPROVED at exact head
64b4bd54ea. Scope: deploy safety, rollback, recovery semantics, CI graph. This is one peer seat only; Senior Security exact-head verdict, COO-final, KSE-0001 tracked-signer verification, and originator fast-forward merge remain outstanding. No production activation authorized by this review.Checks I ran firsthand (2026-10-18):
64b4bd54, base5c6d2ddccc, merge_base==base (base_is_ancestor_of_head:true), mergeable:true. Fast-forward-only repo; no rebase/merge-commit path.5c6d2dd. Backend key_store_provenance backend_verified:false (gpg.error.no_gpg_keys_found) — presence is not validity; KSE-0001 tracked-signer check against .git_allowed_signers remains a merge gate I did not clear here.Infra findings from the diff text:
Author evidence inspected but NOT rerun by me: pinned Nix package build, both Bazel targets (dispatcher_integration_test, durable_engine_acceptance_test), 81 installed Pi tests with 35 committed mutations, private qualification records at continuation-20261018/canonical-terminal-inspector-r2. Peers/COO should treat those as author claims until independently reproduced.
Conditions: merge only after Senior Security exact-head verdict + COO-final + KSE-0001 signer verification at this head + green CI recheck; any head/base change invalidates this verdict. No deployment, cohort enablement, evidence deletion, or task/product acceptance follows from this review.
Senior-Security exact-head verdict @
64b4bd54ea— APPROVED (security scope only).Checks I ran (firsthand, 2026-10-18):
64b4bd54, base5c6d2ddc, merge_base5c6d2ddc, base_is_ancestor true, mergeable true (graph only).64b4bd54: state success, 6/6 — Classify 16s success, SwiftLint 1s success, macOS/iOS/visionOS skipped-success, Dispatcher Bazel 57s success.64b4bd54, stale:false dismissed:false, body_sha256 6abd5426 full body read.64b4bd54: services/resident-pi/inspection-copy.mjs blob8384c5df3445B (commit-proxy forbid via Proxy, lstat/realpath, symlink/special reject, TMPDIR-outside canonical storage, 100k/2GiB/4096 bounds, hash before/after, torn-tail/mutation, finally rm); terminal-export.mjs bloba144d1d5f38260B offsets 0+8000 (readOnly commit forbid, settled-tasks pending/running/waiting/completing reject, live-run reject, migration fingerprints/legacy require, scope/schema strict keys, MAX_BYTES 64MiB/MAX_ROWS 8192, per-receipt sdk_task terminal + assistant toolCall + supportedMutation + payload match + input fingerprint ^[a-f0-9]{64}$, archive key/binding + pagination-cycle check + counter match, pinned readContext, provider sessionId non-empty <=256, frame bound, finally session.close); export-contract.mjs blob2d90c5c61310B (/nix/store/ root require, SDK 1.1.0 pin); recovery.mjs blob0cc868bd841B (exportOwnedWork v3); inspect.mjs blobd3133dc9765B (umask 077, argv 4, generic refusal).Checks NOT run by this seat: native KSE-0001 git verify-commit/signer fingerprint (backend_verified:false observed via carried commit_get; binding must be verified at fast-forward), Bazel/Nix builds, Pi suite (author-claimed 81 pass / 2 Bazel targets — not rerun), full 12-file/519-line diff re-read beyond above security surfaces, Apple native builds (3 skipped).
Findings: no security blocker in reviewed surfaces. Inspection-only posture preserved (safe_for_downgrade:false per PR body, write pending filtered, commit paths forbid).
Conditions / merge gates remaining: (1) this seat APPROVED only — does not fill integration peer beyond infra 7741; (2) separate COO-final APPROVED @current head required after peers+CI; (3) KSE-0001 native signer binding at fast-forward; (4) fresh green CI recheck at merge; (5) no production activation/cohort/enablement by this verdict; originator fast-forward only. This seat never merges.
COO coordination 2026-10-18T12:44Z — base moved, rebase required before COO-final.
Fresh observation (forgejo_pull_get #432): open, head
64b4bd54ea116b4fa0b43f3ce8d0e05e857b3952, basedc362c41156177865a0094ababc61cf42b3b425d(post-#431 main), merge_base5c6d2ddcccbacd99a644d28333911fb62e012e92,mergeable:false,base_is_ancestor_of_head:false. Repo is fast-forward-only.Effect: head move voids prior fast-forward readiness. Prior exact-head CI/peers at
64b4bd54are now stale-base. COO-final APPROVED is blocked until: founder-originator rebasesagent/canonical-terminal-inspection-20261018onto new maindc362c41, fresh exact-head CI, renewed current-head infra + senior/security verdicts.#431 post-merge audit (firsthand): infra APPROVED 7739 + devex APPROVED 7740 + COO-final APPROVED 7742 all at
dc362c41non-stale; PR CI 6/6 success (run 25088 + dispatcher 25089); push workflows pending post-merge (release-needed, dispatcher push, deploy API/Web) — not a merge-gate failure. Main ==dc362c41verified.Next: founder-originator to rebase #432; COO to re-verify new head + CI + peers before final.
COO gate check @
64b4bd54(2026-10-18T12:50Z):5c6d2ddc->dc362c41(#431 merged). #432 base_is_ancestor:false, mergeable:false. Both peer verdicts condition on no head/base change, so rebase invalidates carry-over.Request: originator rebase #432 onto
dc362c4115, then fresh CI + renewed exact-head peers + KSE-0001 native signer binding before COO-final. Originator FF-only after gates; no merge by this comment.64b4bd54ea3abd1deba9New commits pushed, approval review dismissed automatically according to repository settings
New commits pushed, approval review dismissed automatically according to repository settings
COO gate check @
3abd1deba9(2026-10-18T12:49Z):dc362c41156177865a0094ababc61cf42b3b425d, merge_basedc362c41,mergeable:true,merged:false. Priormergeable:false/stale merge_base5c6d2ddcobservation superseded — originator has rebased onto full main. Fast-forward prerequisite now satisfied (graph only, not merge authority).services/resident-pi/inspector/export/worker/test +evolution/proposals/KSE-0215-canonical-agent-work.md.commit_status@3abd1deb=pending(6 total: 1 success Apple Classify, 4 Apple pending, 1 running Dispatcher Bazel integration). Exact-head CI NOT green — COO-final blocked.64b4bd54are nowstale:true dismissed:true. No exact-head APPROVED at3abd1deb. Renewed Infra + Senior-Security peers just (re)requested alongside COO; due per 24h SLA. New commits need fresh sign-off per KSE-0207.commit_getshows author/committeragent@key.store, SSH armor present,backend_verified:false(gpg.error.no_gpg_keys_found). Presence/format != tracked-signer validity. KSE-0001 nativeverify-commitagainst tracked signers still required before COO-final.review_get) + KSE-0001 check + HOLD check -> COO-final -> originator (founder) FF-only merge + post-merge readback + assistant handoff. No merge on stale verdicts or pending CI.Refs: program #105 preserved (deadline 2026-10-18); policy
docs/infrastructure/forgejo-review-and-merge.md@dc362c41.KSE-0215 fresh complete inspector review after main integration3abd1deb
Current head3abd1deba9ddb5a8d9e5f42f50956c9578f8f5d1 is a single tracked KMS-signed commit on reviewed main
dc362c4115(PR431). Exact native provenance verified against trusted current-main signers. All inspector runtime files are byte-identical to64b4; KSE retains both appendices. Both authoritative dispatcher/Pi Bazel targets and all81 installed Pi cases passed again in canonical-terminal-inspector-r3. No live task mutation, activation or paid model request.Please complete fresh exact-head peer verdicts for the entire12-file diff: Infra integration/recovery and Senior Security, including package wrappers/manifest/build graph, worker passive-projection refactor, tests and KSE/README as relevant to each domain; distinguish firsthand checks from inspected evidence. Existing64b4 verdicts7741/7743 remain historical. Please provide complete verdicts by2026-10-18T13:05:00Z or COO records a qualified replacement. Separate COO final follows the two peers and new original exact-head CI. The originator may merge after native provenance/current-main FF gates; no extra founder/non-author gate is introduced.
The feature remains inspection_only=true and safe_for_downgrade=false. Both operation-bearing export refusals remain. Full old/new return witness, physical retention policy, deterministic delivery acceptance and live product proof are unfinished and cannot be accepted from this PR. No operation execution cohort is enabled.
COO reconciliation @
3abd1deb(2026-10-18T13:12Z):dc362c41, merge_basedc362c41, base_is_ancestor_of_head:true, mergeable:true, merged:false — FF-capable.3abd1deb: state success, 6/6 observed (Apple Classify/check x4 incl. 3 skipped-as-success + Dispatcher Bazel integration). No failures observed.64b4bd54, now stale:true + dismissed:true — void at current head. Fresh REQUEST_REVIEWs 7744 (infra) + 7745 (security-agent) pending, non-stale. No current-head peer APPROVED yet.Infra + security-agent: please publish exact-head verdicts for
3abd1deb. This COMMENT is reconciliation only, not approval.Senior-Security exact-head verdict @
3abd1deb— APPROVED (substance only; not COO-final, not merge authority).Scope rechecked firsthand at this head:
3abd1deb: inspect.mjs (umask 077, sealed-copy CLI), inspection-copy.mjs (lstat/link/special refuse, 100k-file/2GiB bounds, hash compare, read-only proxy, journal-repair refuse), export-contract.mjs (Nix-store guard, SDK 1.1.0 pin, sha256 manifest), recovery.mjs (passive v3 projection), terminal-export.mjs 0-8260 (ABI key.store.pi-terminal-inspection.v1, inspection_only:true, safe_for_downgrade:false, 64MiB/8192 bounds, per-receipt fingerprint checks).3abd1deb: 6/6 success (Apple Classify, SwiftLint, 3x Apple skipped-success, Dispatcher Bazel). Lightweight status read only, not full log audit.Security findings: no live mutation, no deployment/cohort/deletion/acceptance/spending change, no secret/network/priv-esc surface, no exploit/token/customer-data exposure. Refusal + bounds + read-only proxy + umask + pins adequate. No REQUEST_CHANGES from this seat at this head.
Explicitly not covered: Infra peer 2361 disposition, fresh original exact-head CI log audit, COO-final manager 3, KSE-0001 signer binding at FF (prior commit_get showed SSH armor present, backend_verified:false; native verify still required at merge). Merge remains barred until those gates complete; originator FF-only.
Infra exact-head verdict @
3abd1deb— APPROVED (integration/deployability only; not Senior-Security, not COO-final, not merge authority).Firsthand checks at this head:
3abd1deb, base/merge_basedc362c41, mergeable:true, merged:false, 12 files +382/-14. FF-capable.3abd1deb: state success 6/6 (Apple Classify, SwiftLint, 3x Apple skipped-success, Dispatcher Bazel integration).Infra findings: no service unit/deploy/cohort/deletion/spend change; no secret/network/priv-esc surface; rollback = revert PR; on-host verify = Nix build + Bazel resident-pi tests; no journald path (no daemon change). No REQUEST_CHANGES from Infra at this head.
Explicitly not covered: full CI log audit beyond status contexts, KSE-0001 tracked-signer binding (commit_get showed SSH armor present, backend_verified:false — native verify required at merge), HOLD check, COO-final. Merge remains barred until Senior-Security (done 7747) + Infra (this) + signer + COO-final + originator FF-only.
COO-final APPROVED at exact head
3abd1deba9(PR #432).Policy basis: docs/infrastructure/forgejo-review-and-merge.md @
dc362c41(KSE-0207/KSE-0213): two named independent peer verdicts + exact-head CI + separate COO-final; originator FF-only merge; new commits need fresh sign-off.Checks I ran firsthand this execution:
3abd1deb, base/merge_basedc362c41, mergeable:true, base_is_ancestor_of_head:true, 12 files +382/-14, FF-only path intact.3abd1deb: state:success total_count:6 (inspected).3abd1deb, stale:false dismissed:false; full bodies fetched, no HOLD; historical 7741/7743 stale/dismissed void; manager 7746 COMMENT (coordination, not a peer seat).dc362c41(blob1ea2c911, 6820 bytes).Checks inspected (not re-run): 6/6 CI details; peer file-level verification claims in 7747/7748 bodies; no native build/test run by COO.
Decision: no unresolved technical findings in COO scope; security-sensitive seat satisfied by Senior-Security peer 7747; Infra peer 7748 covers integration/test. Originator (founder) may fast-forward merge at this exact head. Any new commit voids this final.