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: preserve retained submit evidence at engine 38 [C7,V4]
Corey Olson4617b1b354d0
diff --git a/docs/formats.md b/docs/formats.mdindex ced004ad..ecae0204 100644--- a/docs/formats.md+++ b/docs/formats.md@@ -113,7 +113,7 @@ The board file is in the repository's Git common directory at `.git/pullboard/bo| `row grammar` | `1` | `SPEC_GRAMMAR_VERSION` in `src/spec.js`; optional `<!-- pullboard-grammar N -->` line in either file (absence means the current grammar) | Both files share the version. A declared version must match; an incompatible grammar change requires a coordinated version bump and compatible files. No automatic conversion occurs. || `board schema` | `2` | `SCHEMA_VERSION` in `src/board.js`, persisted as `PRAGMA user_version` | Create missing tables and indexes, add missing columns in place with declared defaults, restore missing or changed triggers, and remove stale machine triggers without replacing rows. || `event log` | `1` | `EVENT_LOG_VERSION` in `src/board.js`, persisted in `board_meta` as `event_log_version` | Older event-log versions upgrade in place; newer versions are refused with `EVENT_LOG_VERSION`. Preserve event rows when the board schema changes. |-| `move engine` | `34` | `ENGINE_VERSION` in `src/machine.js`, carried as `engine` in every sealed executable move | Bump when a move's meaning changes, independently of the event log and sealed envelope. A newer engine is refused with `ENGINE_VERSION`, naming both versions and asking you to upgrade Pullboard. |+| `move engine` | `38` | `ENGINE_VERSION` in `src/machine.js`, carried as `engine` in every sealed executable move | Bump when a move's meaning changes, independently of the event log and sealed envelope. A newer engine is refused with `ENGINE_VERSION`, naming both versions and asking you to upgrade Pullboard. |<!-- format-versions:end -->Pullboard 0.6.1 released engine 1. Engine 2 records a fresh explicit-build claim's skipped-review snapshot. Pullboard 0.8.1 released engine 3, including lane-sensitive graft refusals and authenticated relay senders. Engine 4 adds captured background-baseline completions through `completeCheckBaseline`; released engine-3 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Engine 5 requires a one-line reason when releasing a review and gives that reviewer a one-hour cooldown for the current submission. Each sealed move replays under its recorded engine version: engines 1 through 4 retain the original release event and review-reservation behavior. Engine 5 retains support for older moves, including engine-4 baseline completions. Pullboard 0.8.3 released engine 6, adding board-scoped machine credentials and permitting machine execution only for one exact, earlier authenticated phone request, including its payload digest. Engine 7 adds ordered item holds through `holdItem` and `releaseItemHold`; engine-6 clients stop with `ENGINE_VERSION` before interpreting either operation or advancing their replay cursor. Engine 8, shared by the 0.8.5 move changes, retains merged-item exception notes, selects the next review in roadmap order, and adds coordinator-only `reopen` for a submission returned without a verdict; engine-7 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Recorded engines 1 through 7 retain their original tier-first review selection. Engine 8 also adds durable refusal recovery for blocked relay positions; each explicit skip publishes the readable prefix even when another unsupported record follows. Engine 8 also permits coordinator criterion/check edits on a live claim as pending corrections; the holder cannot renew or submit until a refreeze adopts the correction while preserving the claim. Older request receipts retain their recorded engine semantics. Upgrade every linked device before using the new moves. Each release shares one engine bump across its changed moves. Engine 8 also retains declared model labels on registration and records each registered agent move's model snapshot; engines 1 through 7 retain their original registration and event details without these model fields. Pullboard 0.8.8 released engine 9, which allows resubmitting the same rejected commit after a corrected criterion is refrozen, but only when the rejection names a different frozen digest. Engine 8 retains its HEAD_NOT_NEW refusal and prior submit-event detail. Engine-9 submit events add `criterionDigest`, and engine-8 boards replay with the original refusal and event history.@@ -134,7 +134,7 @@ Engine 24 adds the person's `acceptCheck`: an item's current check, named by itsEngine 30 lets a reject and a reopen carry a cause key (`cause`: `test:<file>::<title>`, `refusal:<CODE>`, `row:<id>` or `doctrine:<id>`) and lets the person record a never-again fact with `cause` and `neverAgain: true`, for `pullboard rigor`. Only a move that carries one of these needs engine 30; engine-29 and older moves replay unchanged, and clients on an older engine refuse an engine-30 move with `RELAY_MOVE` before changing their board or cursor. Engine 20 is the implied-items engine above; engine numbers 21 through 29 are allocated to other changes.-Engine 34 records submission test selections and normalized landing evidence. A `submit` carrying `submissionProof` or a `recordLandingBatch` carrying `invariantEvidence` requires engine 34; earlier engines refuse these envelopes before applying them, and a missing or malformed proof is refused with `SUBMISSION_PROOF` on a modern submit before its item or events change. Moves recorded under engines 33 and earlier replay without inferred coverage. Recorded invariant evidence is append-only when a landing batch is adopted. Engine slots 25 through 33 are allocated to earlier train changes; preserve their semantics when composing this item.+Engine 38 records submission test selections and normalized landing evidence. A `submit` carrying `submissionProof` or a `recordLandingBatch` carrying `invariantEvidence` requires engine 38; earlier engines refuse these envelopes before applying them, and a missing or malformed proof is refused with `SUBMISSION_PROOF` on a modern submit before its item or events change. Moves recorded under engines 37 and earlier replay without inferred coverage. Recorded invariant evidence is append-only when a landing batch is adopted; adopting or finishing a batch already carrying that evidence requires engine 38, even when the incoming move omits the evidence field. Engine slots 25 through 37 are allocated to earlier train changes; preserve their semantics when composing this item.The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.A linked board requires at least engine 3 after issuing any agent token, including@@ -332,7 +332,7 @@ The `event` table is a SQLite schema object governed by `SCHEMA_VERSION`; its ap| `claim` | builder | `leaseUntil`, `digest` || `renew` | builder | `leaseUntil`, `digest` || `release` | builder | — |-| `submit` | builder | `commit`, `tree`, `policyCommit`, engine-9 `criterionDigest`, engine-34 `submissionProof` |+| `submit` | builder | `commit`, `tree`, `policyCommit`, engine-9 `criterionDigest`, engine-38 `submissionProof` || `reserve` | reviewer | `until` || `accept` | reviewer | `reason`, `commit`, engine-20 `implies`, engine-33 `review` || `reject` | reviewer | `reason`, `commit`, engine-20 `implies`, engine-33 `review` |diff --git a/src/engine.js b/src/engine.jsindex b40f9573..fbdae882 100644--- a/src/engine.js+++ b/src/engine.js@@ -35,6 +35,7 @@ function minimumOperationEngine(operation, args, board) {if (board && ['recordLandingBatch', 'finishLandingBatch'].includes(operation)) {const id = operation === 'recordLandingBatch' ? args[0]?.batch?.id : args[0]?.id;const prior = id && store.landingBatches(board).find(batch => batch.id === id);+ if (prior?.invariantEvidence) return SUBMISSION_PROOF_ENGINE;if (prior && ['items', 'candidates'].some(key => Array.isArray(prior[key]) && prior[key].some(entry => entry && Object.hasOwn(entry, 'reviewedCommit')))) return VERDICT_REVIEW_ENGINE;}if (operation === 'verify' && options && Object.hasOwn(options, 'review')) return VERDICT_REVIEW_ENGINE;diff --git a/src/machine.js b/src/machine.jsindex a7300c38..5f79f7a1 100644--- a/src/machine.js+++ b/src/machine.js@@ -10,7 +10,7 @@*//** Executable move semantics, carried by every sealed move and retained during replay [H16]. */-export const ENGINE_VERSION = 34;+export const ENGINE_VERSION = 38;/** The engine at which a reject, reopen or person fact can carry a cause key (#713); older moves replay unchanged [D1,H16]. */export const CAUSE_ENGINE = 30;@@ -151,7 +151,7 @@ export const GUARDS = [{ id: 'noteGiven', refuse: 'NOTE_REQUIRED', rule: 'the move carries a note: what failed, what was tried, or why', next: '--note "..." or --note-file <file>', source: 'board' },{ id: 'causeWellFormed', refuse: 'BAD_CAUSE', rule: 'a cause, when given, is test:<file>::<title>, refusal:<CODE>, row:<id> or doctrine:<id>', next: 'fix --cause, or leave it out', source: 'board' },{ id: 'notMerged', refuse: 'ALREADY_MERGED', rule: 'the item has no recorded merge receipt', next: 'a merged item cannot be reopened', source: 'board' },- { id: 'submissionProofValid', refuse: 'SUBMISSION_PROOF', rule: 'recorded test selection names literal project files and its full-fallback policy', next: 'rerun submit with the current CLI', source: 'board', when: 'engine 34 or later; absent legacy selection remains unknown' },+ { id: 'submissionProofValid', refuse: 'SUBMISSION_PROOF', rule: 'recorded test selection names literal project files and its full-fallback policy', next: 'rerun submit with the current CLI', source: 'board', when: 'engine 38 or later; absent legacy selection remains unknown' },{ id: 'landingFailureRecorded', refuse: 'LANDING_FAILURE_REQUIRED', rule: 'a verified item note names the failing test and landing merge commit', next: 'cite the recorded batch, or name the test and merge commit in a manual note', source: 'board' },];diff --git a/src/submit-invariants.js b/src/submit-invariants.jsindex b120f574..5092f455 100644--- a/src/submit-invariants.js+++ b/src/submit-invariants.js@@ -3,7 +3,7 @@ import { Refused } from './refused.js';import { isAbsolute } from 'node:path';import { relative } from 'node:path';-export const SUBMISSION_PROOF_ENGINE = 34;+export const SUBMISSION_PROOF_ENGINE = 38;const BUDGET_MS = 60_000;const COMMIT = /^[a-f0-9]{40,64}$/u;@@ -136,7 +136,7 @@ export function validateLandingBatch(batch, revision) {}}-/** Preserve earlier normalized gate and diagnostic receipts when an engine-34 batch is adopted. */+/** Preserve earlier normalized gate and diagnostic receipts when an engine-38 batch is adopted. */export function preserveInvariantEvidence(previous, evidence, engine) {if (previous?.invariantEvidence && engine >= SUBMISSION_PROOF_ENGINE) {for (const kind of ['gates', 'diagnostics']) {diff --git a/test/agent-model-engine.test.js b/test/agent-model-engine.test.jsindex 5907aefc..be454129 100644--- a/test/agent-model-engine.test.js+++ b/test/agent-model-engine.test.js@@ -10,8 +10,8 @@ import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';import { tmpdir } from 'node:os';import { join } from 'node:path';-test('model declarations and event snapshots retain engines 1 through 34 semantics [O8,O3,H16]', (t) => {- assert.equal(ENGINE_VERSION, 34, 'the next writer preserves every historical model snapshot through main engine 33');+test('model declarations and event snapshots retain engines 1 through 38 semantics [O8,O3,H16]', (t) => {+ assert.equal(ENGINE_VERSION, 38, 'the next writer preserves every historical model snapshot through main engine 33');for (const version of Array.from({ length: ENGINE_VERSION }, (_, index) => index + 1)) {const board = store.openBoard(':memory:');t.after(() => store.closeBoard(board));diff --git a/test/pending-refreeze.test.js b/test/pending-refreeze.test.jsindex ef73ed35..5e1a1a87 100644--- a/test/pending-refreeze.test.js+++ b/test/pending-refreeze.test.js@@ -261,7 +261,7 @@ async function checkDependencyLegacyClients(cleanup, directory, snapshot, target}test('dependency edits replay the same on every engine [B3,V2,H16]', async (t) => {- assert.equal(ENGINE_VERSION, 34, 'the next writer retains all recorded dependency-edit behavior');+ assert.equal(ENGINE_VERSION, 38, 'the next writer retains all recorded dependency-edit behavior');const directory = mkdtempSync(join(tmpdir(), 'pullboard-dependency-engines-'));const cleanup = [];t.after(() => {diff --git a/test/submit-invariants.test.js b/test/submit-invariants.test.jsindex 02302f52..7fcf28b2 100644--- a/test/submit-invariants.test.js+++ b/test/submit-invariants.test.js@@ -221,7 +221,7 @@ test('a landing escape is proposed as a submit invariant only when modern submitconst box = e2e.sandbox();const source = store.openBoard(join(box.dir, 'modern-source.sqlite'));const target = store.openBoard(join(box.dir, 'modern-replica.sqlite'));- const legacyTarget = store.openBoard(join(box.dir, 'legacy33-replica.sqlite'));+ const legacyTarget = store.openBoard(join(box.dir, 'legacy37-replica.sqlite'));t.after(() => {store.closeBoard(source);store.closeBoard(target);store.closeBoard(legacyTarget);});store.register(source, {lane:'coordinator',path:'/fixture/main'});store.register(source, {lane:'web',path:'/fixture/web'});@@ -236,16 +236,16 @@ test('a landing escape is proposed as a submit invariant only when modern submit{id:'modern-missing-selection',actor:'web-1'});// Forge the missing wire field after valid preparation so the receiver assertion remains independent.delete move.args[1].submissionProof;- assert.equal(SUBMISSION_PROOF_ENGINE,34,'submission receipts keep their stable first engine');+ assert.equal(SUBMISSION_PROOF_ENGINE,38,'submission receipts keep their stable first engine');assert.equal(move.engine,ENGINE_VERSION,'the new envelope uses the current engine, separately from the minimum');assert.equal(Object.hasOwn(move.args[1],'submissionProof'),false);- const legacyMove = {...move,engine:33,id:'legacy33-missing-selection'};+ const legacyMove = {...move,engine:SUBMISSION_PROOF_ENGINE - 1,id:'legacy37-missing-selection'};const legacyResult = applyRelayMove(legacyTarget,legacyMove,{sequence:1,at:'2026-10-17T00:00:00.000Z',kind:'move',sender:{kind:'agent',userId:'fixture',agent:'web-1'}});- assert.equal(legacyResult.error,undefined,'authentic engine33 proofless legacy still replays');+ assert.equal(legacyResult.error,undefined,'controlled engine37 proofless legacy still replays');assert.equal(store.getItem(legacyTarget,id).item_status,'submitted');const legacyEvent = store.events(legacyTarget).findLast(e=>e.event_kind==='submit');- assert.equal(Object.hasOwn(JSON.parse(legacyEvent.event_detail),'submissionProof'),false,'legacy33 stays unknown without invented coverage');- console.log('review696 legacy33 control '+JSON.stringify({engine:33,status:store.getItem(legacyTarget,id).item_status,recordedSelection:false}));+ assert.equal(Object.hasOwn(JSON.parse(legacyEvent.event_detail),'submissionProof'),false,'legacy37 stays unknown without invented coverage');+ console.log('review696 legacy37 control '+JSON.stringify({engine:SUBMISSION_PROOF_ENGINE - 1,status:store.getItem(legacyTarget,id).item_status,recordedSelection:false}));const result=applyRelayMove(target,move,{sequence:1,at:'2026-10-17T00:00:00.000Z',kind:'move',sender:{kind:'agent',userId:'fixture',agent:'web-1'}});const event=store.events(target).findLast(e=>e.event_kind==='submit');const detail=event ? JSON.parse(event.event_detail) : null;@@ -261,12 +261,12 @@ test('a landing escape is proposed as a submit invariant only when modern submit});-// Controlled version-33 envelopes must not erase evidence already recorded under version 34.+// Controlled version-37 envelopes must not erase evidence already recorded under version 38.for (const operation of ['recordLandingBatch', 'finishLandingBatch']) {test(`a landing escape is proposed as a submit invariant: retained landing receipts require their original engine for ${operation} [C7,V4,H16]`, t => {const box = e2e.sandbox();const current = store.openBoard(join(box.dir, 'retained-current.sqlite'));- const legacy = store.openBoard(join(box.dir, 'retained-legacy33.sqlite'));+ const legacy = store.openBoard(join(box.dir, 'retained-legacy37.sqlite'));t.after(() => { store.closeBoard(current); store.closeBoard(legacy); });for (const board of [current, legacy]) store.register(board, { lane: 'coordinator', path: '/fixture/main' });const batch = { version: 1, id: 'retained-receipt', base: 'a'.repeat(40), tip: 'b'.repeat(40),@@ -279,12 +279,12 @@ for (const operation of ['recordLandingBatch', 'finishLandingBatch']) {const args = operation === 'recordLandingBatch'? [{ agentId: 'coordinator', batch: { ...batch, state: 'blocked' }, revision: previous.revision }]: [{ agentId: 'coordinator', id: batch.id, tip: batch.tip }];- const move = { ...prepareEngineMove(current, operation, args, { id: `older-retained-${operation}` }), engine: 33 };+ const move = { ...prepareEngineMove(current, operation, args, { id: `older-retained-${operation}` }), engine: SUBMISSION_PROOF_ENGINE - 1 };// A reached legacy control starts without modern evidence, rather than deleting real history.- const seeded = applyEngineMove(legacy, { version: 1, engine: 33, id: 'legacy-only-batch',+ const seeded = applyEngineMove(legacy, { version: 1, engine: SUBMISSION_PROOF_ENGINE - 1, id: 'legacy-only-batch',operation: 'recordLandingBatch', args: [{ agentId: 'coordinator', batch }] },{ sequence: 1, at: '2026-10-17T00:00:00.000Z' });- assert.equal(seeded.error, undefined, 'a controlled engine-33 batch still replays without invented evidence');+ assert.equal(seeded.error, undefined, 'a controlled engine-37 batch still replays without invented evidence');const legacyResult = applyEngineMove(legacy, { ...move, id: `legacy-only-${operation}` },{ sequence: 2, at: '2026-10-17T00:00:01.000Z' });assert.equal(legacyResult.error, undefined, 'the older operation still works on its own legacy batch');@@ -296,7 +296,7 @@ for (const operation of ['recordLandingBatch', 'finishLandingBatch']) {catch (error) { thrown = error; }const code = thrown?.code ?? result?.error?.code ?? null;const after = store.landingBatches(current)[0];- console.log('review696 retained receipt boundary ' + JSON.stringify({ operation, engine: 33, code,+ console.log('review696 retained receipt boundary ' + JSON.stringify({ operation, engine: SUBMISSION_PROOF_ENGINE - 1, code,beforeEvidence: true, afterEvidence: Object.hasOwn(after, 'invariantEvidence'),newEvents: store.events(current).length - eventCount, legacyReached: true }));assert.equal(code, 'RELAY_MOVE', 'an older writer cannot adopt or finish a snapshot carrying a modern receipt');diff --git a/test/team-engine.test.js b/test/team-engine.test.jsindex 104b1245..0fb135e9 100644--- a/test/team-engine.test.js+++ b/test/team-engine.test.js@@ -6,6 +6,7 @@ import { join } from 'node:path';import { pathToFileURL } from 'node:url';import { test } from 'node:test';import * as store from '../src/board.js';+import { submitFixture } from './board-submit-fixture.js';import { exportBoard, importBoard } from '../src/exchange.js';import { applyEngineMove, appliedSequence, engineReceipt, prepareEngineMove } from '../src/engine.js';import { VERDICT_REVIEW_ENGINE } from '../src/machine.js';@@ -27,7 +28,7 @@ function submitted(t) {const id = store.addItem(board, { by: 'coordinator', lane: 'web', title: 'Sealed review fixture' });store.claim(board, id, { agentId: 'web-1', lane: 'web', leaseMs: 3_600_000, head: BASE,freeze: () => ({ text: JSON.stringify({ rows: [], policy: { version: 1, commit: BASE, verify: { policy: 'any', family: 'off' } } }), digest: DIGEST }) });- store.submit(board, id, { agentId: 'web-1', commit: COMMIT, tree: TRUNK, files: ['web/feature.js'], policyCommit: BASE });+ submitFixture(board, id, { agentId: 'web-1', commit: COMMIT, tree: TRUNK, files: ['web/feature.js'], policyCommit: BASE });return board;}