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(test): seed historical replay prefixes [E21,H16,N26]
Corey Olson80321f8d780e
diff --git a/test/flow-submit-size.test.js b/test/flow-submit-size.test.jsindex 14ca9292..e4d31d5b 100644--- a/test/flow-submit-size.test.js+++ b/test/flow-submit-size.test.js@@ -8,6 +8,9 @@ import { createE2eHelpers } from './e2e-helpers.js';import { applyEngineMove, applyRelayMove, prepareEngineMove } from '../src/engine.js';import { exportBoard, importBoard } from '../src/exchange.js';import { FLOW_SIZE_ENGINE } from '../src/flow-size-engine.js';+import { appliedSequence } from '../src/engine.js';+import { ENGINE_VERSION } from '../src/machine.js';+import { replayHistoricalSeatMove } from './pre-grant-seats.js';test('a native submit records its immutable changed-line base and head for flow buckets [R1,R2,V4]', { timeout: 60_000 }, t => {const helpers = createE2eHelpers();@@ -62,11 +65,13 @@ test('submission size replays identically and refuses unsupported or malformed mconst source = store.openBoard(join(box.dir, 'source.sqlite'));const copies = [];t.after(() => { for (const board of [source, ...copies]) store.closeBoard(board); });- store.register(source, { lane: 'coordinator', path: '/fixture/main' });- store.register(source, { lane: 'web', path: '/fixture/web' });+ // The older submit control needs joins and a claim that its writer could actually have recorded.+ const historicalEngine = FLOW_SIZE_ENGINE - 1;+ replayHistoricalSeatMove(source, historicalEngine, 'register', [{ lane: 'coordinator', path: '/fixture/main' }]);+ replayHistoricalSeatMove(source, historicalEngine, 'register', [{ lane: 'web', path: '/fixture/web' }]);const id = store.addItem(source, { by: 'coordinator', lane: 'web', title: 'Size replay' });- store.claim(source, id, { agentId: 'web-1', lane: 'web', leaseMs: 3_600_000,- freeze: () => ({ text: '{"rows":[]}', digest: 'f'.repeat(64) }) });+ replayHistoricalSeatMove(source, historicalEngine, 'claim', [id, { agentId: 'web-1', lane: 'web', leaseMs: 3_600_000,+ freeze: () => ({ text: '{"rows":[]}', digest: 'f'.repeat(64) }) }]);const document = exportBoard(source);for (let index = 0; index < 4; index += 1) {const board = store.openBoard(join(box.dir, `replica-${index}.sqlite`));@@ -77,7 +82,8 @@ test('submission size replays identically and refuses unsupported or malformed mconst options = { agentId: 'web-1', commit: size.head, tree: 'c'.repeat(40), submissionSize: size,submissionProof: { version: 1, files: [], full: false, deferred: true, reason: 'private replay fixture' } };const move = prepareEngineMove(source, 'submit', [id, options], { id: 'size-replay', actor: 'web-1' });- const receipt = { sequence: 1, at: '2026-10-25T06:00:00.000Z', kind: 'move',+ assert.equal(move.engine, ENGINE_VERSION, 'the modern measurement is produced by the current engine');+ const receipt = { sequence: appliedSequence(source) + 1, at: '2026-10-25T06:00:00.000Z', kind: 'move',sender: { kind: 'agent', userId: 'fixture', agent: 'web-1' } };const first = applyRelayMove(copies[0], move, receipt);assert.equal(first.error, undefined);@@ -93,7 +99,7 @@ test('submission size replays identically and refuses unsupported or malformed mconst forged = structuredClone(move);forged.id = `size-invalid-${index}`;Object.assign(forged.args[1].submissionSize, change);- assert.equal(applyRelayMove(copies[2], forged, { ...receipt, sequence: index + 1 }).error?.code, 'SUBMISSION_PROOF');+ assert.equal(applyRelayMove(copies[2], forged, { ...receipt, sequence: receipt.sequence + index }).error?.code, 'SUBMISSION_PROOF');assert.deepEqual(store.events(copies[2]), before);}const legacy = structuredClone(move);diff --git a/test/line-capacity.test.js b/test/line-capacity.test.jsindex 293016bc..6bbb5f80 100644--- a/test/line-capacity.test.js+++ b/test/line-capacity.test.js@@ -10,19 +10,25 @@ import { lineCapacitySnapshot } from '../src/line-capacity.js';import { LINE_CAPACITY_ENGINE } from '../src/line-capacity-engine.js';import { applyEngineMove, prepareEngineMove } from '../src/engine.js';import { exportBoard, importBoard } from '../src/exchange.js';+import { appliedSequence } from '../src/engine.js';+import { replayHistoricalSeatMove } from './pre-grant-seats.js';const HOUR = 3_600_000;const FREEZE = () => ({ text: 'private lifecycle bar', digest: 'private-lifecycle-bar' });/** Create one real board with explicit actor identities and an adjustable observation clock. */-function fixture(t) {+function fixture(t, historicalSeats = false) {const root = mkdtempSync(join(tmpdir(), 'pullboard-line-capacity-'));let at = Date.parse('2026-10-24T00:00:00Z');const clock = { now: () => new Date(at) };const board = store.openBoard(join(root, 'board.sqlite'), clock);t.after(() => { store.closeBoard(board); rmSync(root, { recursive: true, force: true }); });- store.register(board, { lane: 'coordinator', path: root });- const author = store.register(board, { lane: 'core', path: join(root, 'author'), route: 'strong', parent: 'A', session: 'a' });- const reviewer = store.register(board, { lane: 'core', path: join(root, 'reviewer'), route: 'strong', parent: 'R', session: 'r' });+ /** Keep current fixtures current; only the legacy-claim case receives actual pre-feature joins. */+ const register = who => historicalSeats+ ? replayHistoricalSeatMove(board, LINE_CAPACITY_ENGINE - 1, 'register', [who])+ : store.register(board, who);+ register({ lane: 'coordinator', path: root });+ const author = register({ lane: 'core', path: join(root, 'author'), route: 'strong', parent: 'A', session: 'a' });+ const reviewer = register({ lane: 'core', path: join(root, 'reviewer'), route: 'strong', parent: 'R', session: 'r' });/** Record normal private claims without asserting a gate execution. */function claim(id, agentId = author, options = {}) {return store.claim(board, id, { agentId, lane: 'core', leaseMs: HOUR, freeze: FREEZE, ...options });@@ -83,7 +89,7 @@ test('the offered oldest review respects the actual claim caller policy and auth});test('old recorded claims ignore new capacity while new claims retain the feature floor on replay [N2,H16]', t => {- const f = fixture(t); f.submit(); f.submit(); f.setting('wipPerReviewer', 1.5);+ const f = fixture(t, true); f.submit(); f.submit(); f.setting('wipPerReviewer', 1.5);const id = store.addItem(f.board, { by: 'coordinator', lane: 'core', title: 'old recorded claim' });const snapshot = exportBoard(f.board);const options = { agentId: f.reviewer, lane: 'core', leaseMs: HOUR, freeze: FREEZE };@@ -91,13 +97,14 @@ test('old recorded claims ignore new capacity while new claims retain the featurassert.equal(move.args[1].lineCapacity, true, 'newly prepared claims bind their new meaning explicitly');const legacy = structuredClone(move);delete legacy.args[1].lineCapacity;- assert.throws(() => applyEngineMove(f.board, { ...move, engine: LINE_CAPACITY_ENGINE - 1 }, { sequence: 1, at: f.board.clock.now().toISOString() }), { code: 'RELAY_MOVE' }, 'the true marker cannot be forged onto an older engine');- const old = applyEngineMove(f.board, { ...legacy, engine: LINE_CAPACITY_ENGINE - 1 }, { sequence: 1, at: f.board.clock.now().toISOString() });+ const sequence = appliedSequence(f.board) + 1;+ assert.throws(() => applyEngineMove(f.board, { ...move, engine: LINE_CAPACITY_ENGINE - 1 }, { sequence, at: f.board.clock.now().toISOString() }), { code: 'RELAY_MOVE' }, 'the true marker cannot be forged onto an older engine');+ const old = applyEngineMove(f.board, { ...legacy, engine: LINE_CAPACITY_ENGINE - 1 }, { sequence, at: f.board.clock.now().toISOString() });assert.equal(old.error, undefined, JSON.stringify(old.error));const replica = store.openBoard(join(f.root, 'replica.sqlite'), f.board.clock);t.after(() => store.closeBoard(replica));importBoard(replica, snapshot);- const current = applyEngineMove(replica, move, { sequence: 1, at: f.board.clock.now().toISOString() });+ const current = applyEngineMove(replica, move, { sequence, at: f.board.clock.now().toISOString() });assert.equal(current.error?.code, 'LINE_WIP_LIMIT');assert.equal(store.getItem(replica, id).item_status, 'open');});diff --git a/test/milestones.test.js b/test/milestones.test.jsindex 1765d98c..ed24d7ed 100644--- a/test/milestones.test.js+++ b/test/milestones.test.js@@ -62,7 +62,7 @@ function fixture(t) {t.after(() => store.closeBoard(board));store.ensureCoordinator(board, repo);const builder = store.register(board, { lane: 'web', path: join(dir, 'builder'), model: 'Fixture Model' });- const freeze = () => ({ text: 'Tracked work', digest: 'digest:tracked' });+ const freeze = item => ({ text: JSON.stringify({ title: item.item_title, criterion: item.item_criterion, rows: [] }), digest: 'digest:tracked' });/** File an item and take it to the named state: open, accepted or landed. */const item = (title, state) => {const id = store.addItem(board, { by: 'coordinator', lane: 'web', title, criterion: 'Tracked work', specIds: ['G1'] });diff --git a/test/pre-grant-seats.js b/test/pre-grant-seats.jsindex 99162950..99ce3d3b 100644--- a/test/pre-grant-seats.js+++ b/test/pre-grant-seats.js@@ -1,6 +1,29 @@/** Seats registered as history from before agent grants (#348), for replays of older engines [E21,H16]. */import * as store from '../src/board.js';import { AGENT_GRANT_ENGINE } from '../src/agent-grant-engine.js';+import assert from 'node:assert/strict';+import { applyEngineMove } from '../src/engine.js';+import { appliedSequence } from '../src/engine.js';++/** Replay a real historical join/claim prefix, retaining its receipts and cursor instead of erasing modern grant markers. */+export function replayHistoricalSeatMove(board, engine, operation, args) {+ assert.ok(Number.isSafeInteger(engine) && engine > 0 && engine < AGENT_GRANT_ENGINE);+ assert.ok(['register', 'claim'].includes(operation));+ const values = [...args];+ if (operation === 'claim') {+ const options = { ...values[1] };+ const frozen = options.freeze(store.getItem(board, values[0]));+ delete options.freeze;+ values[1] = { ...options, frozen, freezeError: null };+ }+ const sequence = appliedSequence(board) + 1;+ const move = { version: 1, engine, id: `historical-${operation}-${sequence}`,+ operation, args: JSON.parse(JSON.stringify(values)) };+ const outcome = applyEngineMove(board, move, { sequence, at: board.clock.now().toISOString() });+ assert.equal(outcome.error, undefined, `historical ${operation} must reach its real operation: ${JSON.stringify(outcome.error)}`);+ assert.equal(board.executionEngineVersion, undefined, 'historical replay restores the current execution context');+ return outcome.result;+}/*** Register each [lane, path] seat as an engine before AGENT_GRANT_ENGINE wrote it, and return the seat ids.diff --git a/test/review-queue-replay.test.js b/test/review-queue-replay.test.jsindex 55f9493c..61e8aaec 100644--- a/test/review-queue-replay.test.js+++ b/test/review-queue-replay.test.js@@ -6,6 +6,9 @@ import * as store from '../src/board.js';import { exportBoard, importBoard } from '../src/exchange.js';import { applyEngineMove, prepareEngineMove } from '../src/engine.js';import { ENGINE_VERSION } from '../src/machine.js';+import { AGENT_GRANT_ENGINE } from '../src/agent-grant-engine.js';+import { appliedSequence } from '../src/engine.js';+import { replayHistoricalSeatMove } from './pre-grant-seats.js';const CLAIM_AT = '2026-10-08T12:00:00.000Z';const RENEW_AT = '2026-10-08T12:00:30.000Z';@@ -21,11 +24,15 @@ const REVIEW_SKIPPED = {};/** Create one seed board and two independent in-memory replicas with different ambient clocks. */-function memoryCopies(t) {+function memoryCopies(t, historicalSeats = false) {const source = store.openBoard(':memory:', { now: () => new Date('2026-10-08T10:00:00.000Z') });- store.register(source, { lane: 'coordinator', path: '/fixture' });- store.register(source, { lane: 'web', path: '/fixture/web-1' });- store.register(source, { lane: 'web', path: '/fixture/web-2' });+ /** Engine-1 claim history starts with real engine-1 joins, not a newer seat's activated grant. */+ const register = who => historicalSeats+ ? replayHistoricalSeatMove(source, 1, 'register', [who])+ : store.register(source, who);+ register({ lane: 'coordinator', path: '/fixture' });+ register({ lane: 'web', path: '/fixture/web-1' });+ register({ lane: 'web', path: '/fixture/web-2' });const item = store.addItem(source, { by: 'coordinator', lane: 'web', title: 'Review queue fixture' });const snapshot = exportBoard(source);const copies = ['one', 'two'].map((name, index) => {@@ -59,17 +66,25 @@ function eventRows(board) {}test('review-skip semantics seal after released engine 1, accept legacy claims and refuse future engines before mutation [Q1,V15,H16]', (t) => {- const { copies: [one], item } = memoryCopies(t);+ const { copies: [one], item } = memoryCopies(t, true);const fresh = claimMove(one, item, 'web-1', 'new-engine');assert.ok(fresh.engine >= 2, 'released engine 1 cannot silently ignore the new claim snapshot');assert.equal(fresh.engine, ENGINE_VERSION);const legacy = { ...claimMove(one, item, 'web-1', 'legacy-engine', null), engine: 1 };- const accepted = applyEngineMove(one, legacy, { sequence: 1, at: CLAIM_AT });+ const sequence = appliedSequence(one) + 1;+ const accepted = applyEngineMove(one, legacy, { sequence, at: CLAIM_AT });assert.equal(Boolean(accepted.error), false, 'legacy engine-1 claims remain executable');assert.equal(accepted.events[0].event_kind, 'claim');assert.equal(Object.hasOwn(JSON.parse(accepted.events[0].event_detail), 'reviewSkipped'), false);+ const { copies: [modern], item: modernItem } = memoryCopies(t);+ const modernBefore = exportBoard(modern);+ const forgedOld = { ...claimMove(modern, modernItem, 'web-1', 'modern-seat-old-claim', null), engine: 1 };+ assert.throws(() => applyEngineMove(modern, forgedOld, { sequence: 1, at: CLAIM_AT }),+ error => error.code === 'RELAY_MOVE' && error.message.includes(`engine ${AGENT_GRANT_ENGINE}`),+ 'a current-engine join still requires its grant floor; historical setup must not weaken this control');+ assert.deepEqual(exportBoard(modern), modernBefore, 'a forged old claim leaves a modern board unchanged');const before = exportBoard(one);- assert.throws(() => applyEngineMove(one, { ...fresh, engine: ENGINE_VERSION + 1 }, { sequence: 2, at: RENEW_AT }), (error) => {+ assert.throws(() => applyEngineMove(one, { ...fresh, engine: ENGINE_VERSION + 1 }, { sequence: sequence + 1, at: RENEW_AT }), (error) => {assert.equal(error.code, 'ENGINE_VERSION');assert.match(error.message, new RegExp(`engine version ${ENGINE_VERSION + 1}.*engine version ${ENGINE_VERSION}`));assert.match(error.message, /upgrade pullboard/);diff --git a/test/submit-invariants.test.js b/test/submit-invariants.test.jsindex 9a873f38..eb7d4fbc 100644--- a/test/submit-invariants.test.js+++ b/test/submit-invariants.test.js@@ -16,6 +16,7 @@ import { SUBMISSION_PROOF_ENGINE, landingFileTimes, submitInvariantProposals } fimport { ENGINE_VERSION } from '../src/machine.js';import { landingFailures } from '../src/land.js';import { createE2eHelpers } from './e2e-helpers.js';+import { replayHistoricalSeatMove } from './pre-grant-seats.js';const e2e = createE2eHelpers();after(e2e.cleanup);@@ -166,10 +167,13 @@ test('a landing escape is proposed as a submit invariant [C7,V4]', async () => {// Historical submits with no selection remain unknown, even if their human note mentions a fallback.onBoard(box, board => {const legacy = store.addItem(board, { by: 'coordinator', lane: 'web', title: 'legacy submit' });- store.claim(board, legacy, { agentId: 'web-1', lane: 'web', leaseMs: 3600000,- freeze: () => ({ text: '{"rows":[]}', digest: 'f'.repeat(64) }) });+ // The existing CLI builder has a modern grant; a genuine old submit needs its own historical join/claim.+ const historicalEngine = SUBMISSION_PROOF_ENGINE - 1;+ const author = replayHistoricalSeatMove(board, historicalEngine, 'register', [{ lane: 'web', path: '/fixture/legacy-proofless-author' }]);+ replayHistoricalSeatMove(board, historicalEngine, 'claim', [legacy, { agentId: author, lane: 'web', leaseMs: 3600000,+ freeze: () => ({ text: '{"rows":[]}', digest: 'f'.repeat(64) }) }]);const legacyReceipt = applyEngineMove(board, { version: 1, engine: SUBMISSION_PROOF_ENGINE - 1,- id: 'legacy-unknown-selection', operation: 'submit', args: [legacy, { agentId: 'web-1',+ id: 'legacy-unknown-selection', operation: 'submit', args: [legacy, { agentId: author,commit: 'd'.repeat(40), tree: 'e'.repeat(40), note: 'full suite deferred to the landing gate' }] },{ sequence: appliedSequence(board) + 1, at: new Date().toISOString() });assert.equal(legacyReceipt.error, undefined, 'a proofless previous-engine receipt remains legacy unknown');@@ -207,11 +211,12 @@ test('submission selection replays on two replicas and legacy history remains unconst source = store.openBoard(join(box.dir, 'source.sqlite'));const copies = [];t.after(() => { for (const board of [source, ...copies]) store.closeBoard(board); });- store.register(source, { lane: 'coordinator', path: '/fixture/main' });- store.register(source, { lane: 'web', path: '/fixture/web' });+ // Engine 12's proofless positive control must start from the joins and claim it could have written.+ replayHistoricalSeatMove(source, 12, 'register', [{ lane: 'coordinator', path: '/fixture/main' }]);+ replayHistoricalSeatMove(source, 12, 'register', [{ lane: 'web', path: '/fixture/web' }]);const id = store.addItem(source, { by: 'coordinator', lane: 'web', title: 'selection replica' });- store.claim(source, id, { agentId: 'web-1', lane: 'web', leaseMs: 3600000,- freeze: () => ({ text: '{"rows":[]}', digest: 'f'.repeat(64) }) });+ replayHistoricalSeatMove(source, 12, 'claim', [id, { agentId: 'web-1', lane: 'web', leaseMs: 3600000,+ freeze: () => ({ text: '{"rows":[]}', digest: 'f'.repeat(64) }) }]);const document = exportBoard(source);for (let index = 0; index < 4; index += 1) {const board = store.openBoard(join(box.dir, `replica-${index}.sqlite`));@@ -220,7 +225,7 @@ test('submission selection replays on two replicas and legacy history remains unconst options = { agentId: 'web-1', commit: 'a'.repeat(40), tree: 'b'.repeat(40),submissionProof: { version: 1, files: ['test/a.test.js'], full: false, deferred: true, reason: '' } };const move = prepareEngineMove(source, 'submit', [id, options], { id: 'selection-replay', actor: 'web-1' });- const receipt = { sequence: 1, at: '2026-10-17T00:00:00.000Z', kind: 'move',+ const receipt = { sequence: appliedSequence(source) + 1, at: '2026-10-17T00:00:00.000Z', kind: 'move',sender: { kind: 'agent', userId: 'fixture', agent: 'web-1' } };const first = applyRelayMove(copies[0], move, receipt);assert.equal(first.error, undefined);@@ -258,10 +263,12 @@ test('a landing escape is proposed as a submit invariant only when modern submitconst legacyTarget = store.openBoard(join(box.dir, 'legacy37-replica.sqlite'));const replica = store.openBoard(join(box.dir, 'modern-second-replica.sqlite'));t.after(() => {store.closeBoard(source);store.closeBoard(target);store.closeBoard(legacyTarget);store.closeBoard(replica);});- store.register(source, {lane:'coordinator',path:'/fixture/main'});- store.register(source, {lane:'web',path:'/fixture/web'});+ const historicalEngine = SUBMISSION_PROOF_ENGINE - 1;+ replayHistoricalSeatMove(source,historicalEngine,'register',[{lane:'coordinator',path:'/fixture/main'}]);+ replayHistoricalSeatMove(source,historicalEngine,'register',[{lane:'web',path:'/fixture/web'}]);const id=store.addItem(source,{by:'coordinator',lane:'web',title:'modern missing selection'});- store.claim(source,id,{agentId:'web-1',lane:'web',leaseMs:3600000,freeze:()=>({text:'{"rows":[]}',digest:'f'.repeat(64)})});+ replayHistoricalSeatMove(source,historicalEngine,'claim',[id,{agentId:'web-1',lane:'web',leaseMs:3600000,freeze:()=>({text:'{"rows":[]}',digest:'f'.repeat(64)})}]);+ const sourcePrefix = appliedSequence(source);importBoard(target,exportBoard(source));importBoard(legacyTarget,exportBoard(source));importBoard(replica,exportBoard(source));@@ -276,13 +283,13 @@ test('a landing escape is proposed as a submit invariant only when modern submitassert.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: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'}});+ const legacyResult = applyRelayMove(legacyTarget,legacyMove,{sequence:sourcePrefix+1,at:'2026-10-17T00:00:00.000Z',kind:'move',sender:{kind:'agent',userId:'fixture',agent:'web-1'}});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,'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 ordered = {sequence:1,at:'2026-10-17T00:00:00.000Z',kind:'move',sender:{kind:'agent',userId:'fixture',agent:'web-1'}};+ const ordered = {sequence:sourcePrefix+1,at:'2026-10-17T00:00:00.000Z',kind:'move',sender:{kind:'agent',userId:'fixture',agent:'web-1'}};const result=applyRelayMove(target,move,ordered);const event=store.events(target).findLast(e=>e.event_kind==='submit');const detail=event ? JSON.parse(event.event_detail) : null;@@ -290,7 +297,7 @@ test('a landing escape is proposed as a submit invariant only when modern submitassert.equal(result.error?.code,'SUBMISSION_PROOF','a current engine submit must record a selection instead of silently becoming unknown history');assert.equal(store.getItem(target,id).item_status,'claimed');assert.equal(store.events(target).length,count);- assert.equal(appliedSequence(target), 1, 'a typed refusal still consumes its authenticated relay position');+ assert.equal(appliedSequence(target), sourcePrefix + 1, 'a typed refusal still consumes its authenticated relay position');assert.deepEqual(engineReceipt(target, move.id)?.outcome, result, 'the refusal is retained as the move receipt');assert.deepEqual(applyRelayMove(target, move, ordered), result, 'redelivery returns the same durable refusal');assert.equal(appliedSequence(target), 1, 'redelivery does not advance twice');@@ -308,7 +315,7 @@ test('a landing escape is proposed as a submit invariant only when modern submit'the current producer refuses a missing receipt before sealing a move');assert.equal(store.getItem(source, id).item_status, 'claimed');assert.equal(store.events(source).length, sourceEvents, 'local refusal writes no item event');- assert.equal(appliedSequence(source), 0, 'local refusal writes no relay position');+ assert.equal(appliedSequence(source), sourcePrefix, 'local refusal writes no relay position beyond the historical prefix');assert.equal(engineReceipt(source, 'producer-missing-selection'), null, 'local preparation writes no receipt');});