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(next): skipIds is engine 69, older replays unchanged [N2,B13]
Corey Olson5f4008f7dc60
diff --git a/docs/formats.md b/docs/formats.mdindex 5acb533f..a0584508 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` | `65` | `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` | `69` | `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 -->Relay transport capability `apiVersion: 2` is independent of these versions and@@ -184,6 +184,8 @@ Engine 64 (`LOCAL_LANDING_ENGINE`) lets a landing batch reach the state `trunk`:Engine 65 (`CI_FLAKE_ENGINE`) records flake observations imported from CI with `pullboard flakes import <folder>`. Such an observation has kind `ci`, a `ci` record (provider, run id, the failed attempt and its rerun attempt, job, runner and Node version) and a `load` of null, because a hosted runner reports no host load. A failed attempt whose rerun at the same commit passes the test is a flake; one whose TAP names no test by file stays unclassified. Observations of the other kinds replay as at engine 61.+Engine 69 (`REVIEW_SKIP_ENGINE`) lets `reserveNextReview` carry `skipIds`: the submitted items the reviewer's own agent session built, which `pullboard next --verify` never offers it. A move with a non-empty `skipIds` needs engine 69, so an older reader refuses it instead of reserving a different item; moves without `skipIds`, and every move recorded before engine 69, replay as before.+The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.A linked board requires at least engine 48 after issuing any agent token or machine credential, includingrevoked or expired ones; before engine 48 these minimums were 3 and 6. The minimum survives reopening the auth database;diff --git a/src/board.js b/src/board.jsindex bfa99b41..2d9d4c3d 100644--- a/src/board.js+++ b/src/board.js@@ -44,6 +44,7 @@ import {storeTriggers,} from './machine.js';import { LOCAL_LANDING_ENGINE } from './land-engine.js';+import { REVIEW_SKIP_ENGINE } from './review-skip-engine.js';import { Refused } from './refused.js';import { refuseMaskedExit } from './check-mask.js';import {@@ -2312,7 +2313,9 @@ export function nextFor(board, { agentId, lane, verify = false, policy = 'any',if (verify) {const family = board.db.prepare('SELECT agent_family FROM agent WHERE agent_id = ?').get(agentId)?.agent_family ?? null;const hasDifferentFamily = (entry) => Boolean(family && entry.item_builder_family && family !== entry.item_builder_family);- const unrelated = items.filter((entry) => entry.item_status === 'submitted' && entry.item_built_by !== agentId && !skipIds.includes(entry.item_id));+ // An older engine ignores skipIds, so a recorded move replays as it was first applied (#973).+ const skipped = (board.executionEngineVersion ?? ENGINE_VERSION) >= REVIEW_SKIP_ENGINE ? skipIds : [];+ const unrelated = items.filter((entry) => entry.item_status === 'submitted' && entry.item_built_by !== agentId && !skipped.includes(entry.item_id));const standingRefusal = unrelated.map((entry) => standingProblem(board, agentId, entry.item_built_by, entry.item_id)).find(Boolean);let reviewable = unrelated.filter((entry) => !standingProblem(board, agentId, entry.item_built_by, entry.item_id));if (policy === COORDINATOR && agentId !== COORDINATOR) reviewable = reviewable.filter((entry) => entry.item_lane === COORDINATOR);diff --git a/src/engine.js b/src/engine.jsindex 00ebb41a..94313904 100644--- a/src/engine.js+++ b/src/engine.js@@ -55,6 +55,7 @@ import {carriesFlakeDiagnostics,} from './flake-engine.js';import { LOCAL_LANDING_ENGINE } from './land-engine.js';+import { REVIEW_SKIP_ENGINE } from './review-skip-engine.js';const ITEM_ID_FIRST_ARGUMENT = new Set(['acceptCheck', 'editItem', 'escalate', 'recordAttempt', 'claim', 'release', 'submit', 'reserveReview', 'verify', 'merged', 'withdraw', 'refreeze', 'reopen', 'appendFact']);@@ -84,6 +85,7 @@ function minimumOperationEngine(operation, args, board) {if (['proposeSentinel', 'decideSentinel', 'beginSentinelRun', 'finishSentinelRun'].includes(operation) || typeof args[1]?.cause === 'string' && args[1].cause.startsWith('sentinel:')) return BOARD_SENTINEL_ENGINE;if (['declareJob', 'recordJobRun'].includes(operation)) return RECURRING_JOB_ENGINE;if (operation === 'recordHealthFindings') return HEALTH_SENTINEL_ENGINE;+ if (operation === 'reserveNextReview' && Array.isArray(args[0]?.skipIds) && args[0].skipIds.length) return REVIEW_SKIP_ENGINE;const options = args[1];if (carriesConflict(operation, args)) return board && store.itemById(board, args[0])?.item_status === 'submitted' ? SUBMITTED_CONFLICT_ENGINE : CONFLICT_ENGINE;if (operation === 'submit' && options?.submissionProof !== undefineddiff --git a/src/review-skip-engine.js b/src/review-skip-engine.jsnew file mode 100644index 00000000..205b70b3--- /dev/null+++ b/src/review-skip-engine.js@@ -0,0 +1,2 @@+/** Next --verify never offers a review the reviewer's own session built; a move that carries skipIds needs this engine (#973). */+export const REVIEW_SKIP_ENGINE = 69;diff --git a/test/next-order.test.js b/test/next-order.test.jsindex 4653a551..00142705 100644--- a/test/next-order.test.js+++ b/test/next-order.test.js@@ -511,3 +511,23 @@ test('next --verify skips an item whose builder seat shares the reviewer\'s sesstry { assert.equal(store.getItem(after, own).item_review_by, null, 'the session\'s own item is never reserved'); }finally { store.closeBoard(after); }});++test('a reserve-next move with skipIds needs engine 69 and older engines replay it as before [N2,B13]', () => {+ /** Apply one reserve-next move, stamped with `engine`, to a board holding two submissions; report the outcome. */+ const replay = (engine, withSkip) => {+ const { board, builder, reviewer } = boardFixture();+ const own = submitted(board, builder, 'own session item', 'strong', 1);+ const other = submitted(board, builder, 'other session item', 'strong', 2);+ const request = { agentId: reviewer, lane: 'review', leaseMs: HOUR, policy: 'any', ...(withSkip ? { skipIds: [own] } : {}) };+ const move = prepareEngineMove(board, 'reserveNextReview', [request]);+ const outcome = applyEngineMove(board, engine === undefined ? move : { ...move, engine }, { sequence: 1, at: '2026-10-21T01:00:00Z' });+ store.closeBoard(board);+ return { move, outcome, own, other };+ };+ const current = replay(undefined, true);+ assert.ok(current.move.engine >= 69, 'a skipIds move is stamped with at least engine 69');+ assert.equal(current.outcome.result.item.item_id, current.other, 'engine 69 honours skipIds');+ assert.throws(() => replay(68, true), { code: 'RELAY_MOVE' }, 'a skipIds move below engine 69 is refused, not replayed differently');+ const plain = replay(68, false);+ assert.equal(plain.outcome.result.item.item_id, plain.own, 'a move without skipIds replays at engine 68 as it always did');+});