Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
docs(core): state proof replay trust boundary [C7,H16]
Corey Olsond6bdf3788f8f
diff --git a/docs/formats.md b/docs/formats.mdindex 92a10c41..82483fcd 100644--- a/docs/formats.md+++ b/docs/formats.md@@ -512,7 +512,7 @@ Engine 54 replaces the automatic strong-to-strong ceiling escalation with one co## Native proof provenance-Engine 92 adds `recordProofRun` and the append-only `proof-run` item event. The gate writes a version-two receipt in the existing gate receipt store after execution. The ordered move reads that file itself and binds its recorded seat to the authenticated actor; caller-written provenance is refused. Replay carries the canonical receipt rather than reading the originating machine's filesystem. The existing `gate-receipts.jsonl` timing receipt links its executed phases through `proofReceiptIds`; there is no agent-written provenance log. Version-one gate receipts retain their separate flake and quarantine meaning.+Engine 92 adds `recordProofRun` and the append-only `proof-run` item event. The gate writes a version-two receipt in the existing gate receipt store after execution. The ordered move reads that file itself and binds its recorded seat to the authenticated actor; caller-written provenance is refused. Replay carries the canonical receipt rather than reading the originating machine's filesystem. Like the existing gate-run protocol, this trusts authenticated ordered replay and trusted recovery inputs; it is not independent cryptographic attestation of a machine owner or an imported history. The existing `gate-receipts.jsonl` timing receipt links its executed phases through `proofReceiptIds`; there is no agent-written provenance log. Version-one gate receipts retain their separate flake and quarantine meaning.`pullboard show <id> --json` adds `proofReceipts`, in event order. Each entry identifies its native receipt, command kind, item, commit, tree, frozen digest, actual executor environment (`node`, `platform`, `arch`), runner, seat, recorded parent session, exit code, explicit pass/fail/skip counts, duration in milliseconds and source cleanliness. Unavailable identities or counters stay `null`; a legacy seat's identity is not recorded-parent assurance. This records the single runtime actually used, without adding runtime configuration or requiring execution on multiple versions. Plain `show` prints the same receipt chain. A missing receipt prevents publication of an executed command's outcome. At engine 92, shouts longer than 400 Unicode code points are refused with `SHOUT_TOO_LONG`, pointing callers to receipts and `show`; older moves replay under their original limit.diff --git a/src/proof-receipts.js b/src/proof-receipts.jsindex ee205d01..7692e651 100644--- a/src/proof-receipts.js+++ b/src/proof-receipts.js@@ -36,6 +36,8 @@ export function proofReceipts(board, itemId) {export function proofRunReceipt(board, request) {const { agentId, itemId } = request;if (!listAgents(board).some(agent => agent.agent_id === agentId)) throw new Refused('NOT_JOINED', 'join before recording a proof run');+ // Only the engine establishes this in-process replay context after origin sealing, as for legacy gate runs.+ // A replica cannot read the origin's receipt file; normal direct calls always require that file.const run = board.executionEngineVersion === undefined ? boundProofReceipt(board, request) : receiptFields(request.receipt);if (!run || run.version !== 2 || run.proof.item !== itemId) throw new Refused('PROOF_RUN_UNBOUND', 'the native receipt must name this item; run its check and read pullboard show <id>');if (run.proof.seat !== agentId) throw new Refused('PROOF_RUN_ACTOR', 'the native receipt belongs to another seat; use the receipts from your own check');diff --git a/test/proof-provenance.test.js b/test/proof-provenance.test.jsindex 0d53f4a0..0df9dd90 100644--- a/test/proof-provenance.test.js+++ b/test/proof-provenance.test.js@@ -72,6 +72,8 @@ test('proof receipts bind the native actor and replay without the origin filesysfailures: [], load: null, at: '2026-10-23T00:00:00.000Z',proof: { item, frozenDigest: null, seat: 'web-1', environment: null, runner: null, exitCode: 7,counts: { passed: null, failed: null, skipped: null }, durationMs: 37, sourceClean: false } };+ assert.throws(() => store.recordProofRun(board, { agentId: 'web-1', itemId: item, receipt }),+ error => error.code === 'PROOF_RUN_UNBOUND', 'caller-written fields without a native file never establish a direct proof');mkdirSync(boardReceiptStore(board));writeFileSync(join(boardReceiptStore(board), `${receipt.id}.json`), receiptBody(receipt));assert.throws(() => store.recordProofRun(board, { agentId: 'web-2', itemId: item, receiptId: receipt.id }),