Repository navigation
Integrate post-release sandbox hash verification - #11
Conversation
After a successful release, the chart response carries the canonical outputHash preimage as base64; the agent recomputes the sha256 in the TrueForge sandbox with one pinned command, and Gate A asserts the full proof chain on persisted events: exactly one exec after the chart response, the exact command, exit code 0, digest equal to the receipt outputHash (recomputed independently by the gate), the digest restated by the model, and zero sandbox activity in every non-release session. The verifier's frozen-spec check now requires sandbox enabled; docs state the boundary honestly (post-release only, host-local seam, no hardened-isolation claim). AI-assisted (Claude Code); reviewed and understood by the author.
…clean AI-assisted (Claude Code); reviewed and understood by the author.
|
/review |
PR Summary by QodoVerify released payload hashes in the post-release sandbox
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
There was a problem hiding this comment.
🟢 Approval recommended
The sandbox proof material, pinned prompt/manifest expectations, and Gate A persisted-event assertions are consistent end-to-end and are backed by targeted unit tests for both the vault response and the gate logic.
Pull request overview
This PR integrates a single, pinned TrueForge sandbox exec as a post-release verification step to independently recompute the released payload’s SHA-256 from vault-supplied canonical bytes and prove it matches the release receipt’s outputHash, with Gate A enforcing the full evidence chain on persisted events.
Changes:
- Add
sandboxProof.canonicalPayloadBase64torender_safe_chartresponses so the agent can recompute the release hash from canonical bytes. - Enable sandbox in the agent manifest/pinned prompt and update live-verifier manifest expectations accordingly.
- Extend Gate A to (1) require the post-release sandbox hash proof in allow sessions and (2) require zero sandbox activity in non-release sessions; add/adjust tests and documentation.
File summaries
| File | Description |
|---|---|
| src/verify/live.ts | Updates expected inline agent manifest checks to require sandbox enabled. |
| src/verify/live.test.ts | Refactors manifest rejection test cases; adds “disabled sandbox” rejection case. |
| src/server/handlers.ts | Adds sandboxProof.canonicalPayloadBase64 to chart responses from released rows. |
| src/server/handlers.test.ts | Verifies sandbox proof bytes canonicalize to released rows and hash to receipt outputHash. |
| src/agent/prompt.ts | Pins the exact single sandbox exec command and post-exec statement requirement. |
| src/agent/manifest.ts | Enables sandbox in the agent manifest and updates manifest documentation comments. |
| src/agent/agent.test.ts | Updates tests to assert sandbox enabled and prompt pins the sandbox step/command. |
| scripts/gate-a.ts | Wires in new sandbox proof and sandbox-activity assertions into Gate A. |
| scripts/gate-a-actions.ts | Implements persisted-event checks for the sandbox hash proof chain + no-sandbox-in-nonrelease sessions. |
| scripts/gate-a-actions.test.ts | Adds unit tests covering the sandbox proof chain and non-release sandbox activity detection. |
| README.md | Documents the post-release sandbox hash recomputation and Gate A’s persisted-event assertion. |
| docs/THREAT_MODEL.md | Updates trust boundaries and enforcement list to include sandbox as untrusted post-release compute. |
| docs/RUNS.md | Adds integrated-build run evidence and clarifies tally across pre-/post-sandbox attempts. |
| docs/LIMITATIONS.md | Updates limitations to describe post-release-only sandbox use and non-isolation claims. |
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code Review by Qodo
1.
|
There was a problem hiding this comment.
🔵 Needs a closer look
It changes security-sensitive posture (enabling agent sandbox code execution, exposing released bytes, and altering the verifier's fail-closed spec check), which warrants final human review despite being well-tested and internally consistent.
Review details
- Files reviewed: 14/14 changed files
- Comments generated: 1
- Review effort level: Balanced
… hash The post-exec statement check now requires the word 'equals' and rejects negation words, so 'does not equal <hash>' can no longer satisfy the gate; verified the affirmation wording is stable across all five banked integrated runs. Also drops an 'isolated' word from a handler comment that contradicted the documented no-isolation-claim stance. AI-assisted (Claude Code); reviewed and understood by the author.
…model Review pass: exec stdout must now be exactly '<digest> -', the sandbox.created event must sit between the exec call and its response, only one assistant message may follow the exec, and the affirmation must OPEN that message so a leading clause cannot poison it. The exact-full- sentence match proposed in review was relaxed to an anchored prefix plus a negation/hedge scan: the pinned model appends a variable trailing clause, and the exact match false-failed four of the five banked integrated runs (all five pass with the anchored form, verified against the banked bundles). Docs reworded to say detected-not-blocked consistently. AI-assisted (Claude Code); reviewed and understood by the author.
Integrates the TrueForge sandbox as a single post-release verification step, with the full gate suite re-proven live and five new consecutive clean runs published.
What it does
After a successful, human-approved release, the vault's
render_safe_chartresponse now carriessandboxProof.canonicalPayloadBase64— the exact canonical bytes behind the receipt'soutputHash. The agent runs exactly one pinned sandbox command (printf '%s' '<b64>' | base64 --decode | sha256sum) and states that the recomputed digest equals the receipt's outputHash.Gate A asserts the whole chain on persisted events: exactly one exec, positioned after the chart response, running the exact pinned command; exit code 0; the digest witnessed in the exec output; the digest independently recomputed by the gate from the persisted command bytes and required to equal the receipt outputHash; the model restating it afterwards; and zero sandbox activity in every session that never releases (deny, missing-purpose, exception).
Why the release path is unchanged
release_resultstays the only approval-gated tool; sandbox execs pause nothing.Honest claims (docs updated)
Evidence
verify-receiptPASS — published indocs/RUNS.mdwith session/turn/receipt IDs.