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
feat(engine): version item holds [H16,M1]
Corey Olsonfb5e500eb22b
diff --git a/docs/formats.md b/docs/formats.mdindex f51a35e1..c3a29297 100644--- a/docs/formats.md+++ b/docs/formats.md@@ -76,10 +76,10 @@ 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` | `6` | `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` | `7` | `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. Engine 6 adds ordered item holds through `holdItem` and `releaseItemHold`, and board-scoped machine credentials. It permits machine execution only for one exact, earlier authenticated phone request, including its payload digest. Older request receipts retain their recorded engine semantics. Upgrade every linked device before using the new moves.+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. Older request receipts retain their recorded engine semantics. Upgrade every linked device before using the new moves.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, includingdiff --git a/src/machine.js b/src/machine.jsindex a829c0bd..1668361b 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 = 6;+export const ENGINE_VERSION = 7;/** @typedef {'agent' | 'coordinator' | 'clock'} Role */diff --git a/test/engine.test.js b/test/engine.test.jsindex b30e4266..d54c66fb 100644--- a/test/engine.test.js+++ b/test/engine.test.js@@ -301,6 +301,50 @@ test('released engine 3 stops a background completion before changing rows or it}});+test('an engine 6 client meets an item hold and is told to upgrade [H16,M1]', async t => {+ const { directory, copies, item } = engineCopies(t);+ const archive = execFileSync('git', ['archive', 'v0.8.3'], { cwd: resolve(import.meta.dirname, '..'), maxBuffer: 32 * 1024 * 1024 });+ execFileSync('tar', ['-x', '-C', directory], { input: archive });+ const released = await import(pathToFileURL(join(directory, 'src/engine.js')).href);+ const releasedMachine = await import(pathToFileURL(join(directory, 'src/machine.js')).href);+ assert.equal(releasedMachine.ENGINE_VERSION, 6, 'exercise the actual 0.8.3 client');+ assert.equal(released.ENGINE_OPERATIONS.includes('holdItem'), false);+ assert.equal(released.ENGINE_OPERATIONS.includes('releaseItemHold'), false);+ assert.ok(ENGINE_OPERATIONS.includes('holdItem'));++ const board = copies[0];+ const oldMove = released.prepareEngineMove(board, 'claim', [item, {+ agentId: 'web-1', lane: 'web', leaseMs: 2 * HOUR, head: 'a'.repeat(40),+ freeze: () => ({ text: '{"rows":[]}', digest: 'f'.repeat(64) }),+ }], { id: 'engine-6-understood-claim' });+ assert.equal(oldMove.engine, 6);+ const sender = { kind: 'agent', userId: 'fixture-user', agent: 'web-1' };+ const oldOutcome = released.applyRelayMove(board, oldMove, { sequence: 1, at: CLAIM_AT, kind: 'move', sender });+ assert.equal(Boolean(oldOutcome.error), false, 'the old client still applies an operation it understands');+ assert.equal(appliedSequence(board), 1);++ const hold = prepareEngineMove(board, 'holdItem', [item, {+ agentId: 'coordinator', reason: 'review the release',+ }], { id: 'engine-7-item-hold', actor: 'coordinator' });+ assert.equal(hold.engine, ENGINE_VERSION);+ const before = exportBoard(board);+ let refusal;+ let refusalOutcome;+ try {+ refusalOutcome = released.applyRelayMove(board, hold, {+ sequence: 2, at: CLAIM_AT, kind: 'move', sender: { kind: 'agent', userId: 'fixture-user', agent: 'coordinator' },+ });+ } catch (error) {+ refusal = error;+ }+ const refusalCode = refusal?.code ?? refusalOutcome?.error?.code;+ const refusalMessage = refusal?.message ?? refusalOutcome?.error?.message ?? '';+ assert.equal(refusalCode, 'ENGINE_VERSION');+ assert.match(refusalMessage, /engine version 7.*engine version 6.*upgrade pullboard/i);+ assert.deepEqual(exportBoard(board), before, 'the old client refuses before changing item rows or replay receipts');+ assert.equal(appliedSequence(board), 1, 'the hold refusal does not advance the old client cursor');+});+test('a relay refusal receipt failure rolls back its log and cursor together [H2,H16]', t => {const { copies, item } = engineCopies(t);const board = copies[0];