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
fix(core): link proof stamps from timing receipts [C7,H16]
Corey Olson4a7cb1b80643
diff --git a/docs/formats.md b/docs/formats.mdindex 6864ce47..92a10c41 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. 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. 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/commands/show.js b/src/commands/show.jsindex 0baf158a..91195bfc 100644--- a/src/commands/show.js+++ b/src/commands/show.js@@ -68,7 +68,10 @@ export function run(io, { first, values }) {const runtime = receipt.environment ? `Node ${receipt.environment.node} ${receipt.environment.platform}/${receipt.environment.arch}` : 'runtime unknown';const counts = Object.values(receipt.counts).some(value => value === null) ? 'test counts unknown': `${receipt.counts.passed} pass, ${receipt.counts.failed} fail, ${receipt.counts.skipped} skip`;- io.say(`receipt ${receipt.id}: ${receipt.kind}, ${receipt.commit?.slice(0, 12) ?? 'commit unknown'}, ${runtime}, runner ${receipt.runner ?? 'unknown'}, seat ${receipt.seat}, parent ${receipt.parentSession ?? 'unknown'}, exit ${receipt.exitCode ?? 'unknown'}, ${counts}, ${receipt.durationMs}ms${receipt.sourceClean ? '' : ', source unproven'}`);+ io.say(`receipt ${receipt.id}: ${receipt.kind}, item #${receipt.item}`);+ io.say(` commit ${receipt.commit ?? 'unknown'}; tree ${receipt.tree ?? 'unknown'}; frozen ${receipt.frozenDigest ?? 'unknown'}`);+ io.say(` ${runtime}; runner ${receipt.runner ?? 'unknown'}; seat ${receipt.seat}; parent ${receipt.parentSession ?? 'unknown'}`);+ io.say(` exit ${receipt.exitCode ?? 'unknown'}; ${counts}; ${receipt.durationMs}ms${receipt.sourceClean ? '' : '; source unproven'}`);}sayCheckBaseline(io, item);sayBrief(io, item.item_brief);diff --git a/src/gate-receipt.js b/src/gate-receipt.jsindex 9a85fa64..52ad84f8 100644--- a/src/gate-receipt.js+++ b/src/gate-receipt.js@@ -1,7 +1,8 @@/*** Gate receipts (#836): where a gated run's time went. Every run that takes a gate slot (submit, a named check, a* doctrine hold) reports separate phases and the kind of slot it got, and appends one line to the board's receipt log- * so `pullboard stats` can show a day of waits beside run times. Measuring only; no slot behaviour lives here.+ * so `pullboard stats` can show a day of waits beside run times. Native proof runs add proofReceiptIds linking that+ * same timing receipt to their immutable gate receipts and board-stamped show chain. Measuring only; no slot behaviour lives here.*/import { appendFileSync } from 'node:fs';import { existsSync } from 'node:fs';diff --git a/src/gate.js b/src/gate.jsindex 05ba1712..36289bc8 100644--- a/src/gate.js+++ b/src/gate.js@@ -402,6 +402,10 @@ function leaveProofReceipt(root, command, run, before, context, lease) {if (!receipt) return null;mkdirSync(store, { recursive: true, mode: 0o700 });writeFileSync(join(store, `${receipt.id}.json`), receiptBody(receipt), { flag: 'wx', mode: 0o600 });+ if (lease) {+ lease.proofReceiptIds ??= [];+ lease.proofReceiptIds.push(receipt.id);+ }return receipt.id;} catch { return null; /* A missing receipt is refused by the CLI before it records a verdict. */ }}@@ -601,7 +605,8 @@ async function withOneGateSlot(root, action, { landing = false, itemCheck = fals/** Hand the run its receipt tracker and slot, then record its receipt once the slot is released (#836). */const timed = lease => Object.assign(lease, { tracker, receiptKind, slot: slotOf(lease, { browserFree: browserFreeChecksEnabled() }) });const record = lease => {- const receipt = lease.receipt ?? receiptOf(tracker, { kind: receiptKind, slot: lease.slot });+ const timing = lease.receipt ?? receiptOf(tracker, { kind: receiptKind, slot: lease.slot });+ const receipt = { ...timing, ...(lease.proofReceiptIds?.length ? { proofReceiptIds: [...lease.proofReceiptIds] } : {}) };recordReceipt(root, receipt);onReceipt?.(receipt);};@@ -732,6 +737,10 @@ function leaveRunReceipt(root, config, run, { before, kind }) {if (!receipt) return null;mkdirSync(store, { recursive: true, mode: 0o700 });writeFileSync(join(store, `${receipt.id}.json`), receiptBody(receipt), { flag: 'wx', mode: 0o600 });+ if (lease) {+ lease.proofReceiptIds ??= [];+ lease.proofReceiptIds.push(receipt.id);+ }return receipt.id;} catch { return null; }}