Skip to content

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.

test: retain stable check engines and rank snapshots [N2,B13]

Corey Olsonbf28e22cf3e4
diff --git a/test/check-baseline.test.js b/test/check-baseline.test.js
index e3982660..12917b67 100644
--- a/test/check-baseline.test.js
+++ b/test/check-baseline.test.js
@@ -9,6 +9,7 @@ import { openBoard, closeBoard, getItem } from '../src/board.js';
import { checkBaseline, prepareCheckBaseline } from '../src/check-baseline.js';
import { exportBoard, importBoard } from '../src/exchange.js';
import { applyEngineMove, prepareEngineMove } from '../src/engine.js';
+import { ENGINE_VERSION } from '../src/machine.js';
import { CHECK_ACCEPT_ENGINE, acceptCheck, checkDigest } from '../src/check-accept.js';
import { refusePersonMove } from '../src/mcp.js';
import { AGENT_SHELL_MARKERS, SSH_SHELL_MARKERS } from '../src/person.js';
@@ -542,7 +543,8 @@ test('[V2,V4,B26,P6] a check green on main holds the item until the person accep
assert.throws(() => refusePersonMove('check_accept'), { code: 'HUMAN_REQUIRED' }, 'MCP refuses a check acceptance as a person move');
const digest = checkDigest(green);
const move = withBoard(file, (board) => prepareEngineMove(board, 'acceptCheck', [item.item_id, { agentId: 'person', channel: 'terminal', digest }], { id: 'agent-relay-accept' }));
- assert.equal(move.engine, CHECK_ACCEPT_ENGINE);
+ assert.equal(CHECK_ACCEPT_ENGINE, 24, 'acceptCheck keeps its stable minimum engine');
+ assert.equal(move.engine, ENGINE_VERSION, 'new envelopes use the current engine');
assert.equal(relaySenderProblem(move, { kind: 'agent', userId: 'user-1', agent: 'web-1' }, 'move')?.code, 'RELAY_PERSON_ONLY', 'the relay refuses an agent sending the person’s acceptance');
withBoard(file, (board) => {
assert.throws(() => acceptCheck(board, item.item_id, { agentId: 'web-1', channel: 'terminal', digest }), { code: 'CHECK_ACCEPT_PERSON_ONLY' });
diff --git a/test/next-order.test.js b/test/next-order.test.js
index 259d7b00..8aa06827 100644
--- a/test/next-order.test.js
+++ b/test/next-order.test.js
@@ -265,6 +265,10 @@ test('an unranked item follows the ranked ones [N2,B13]', (t) => {
store.orderMilestoneItems(board, 'release', { agentId: 'coordinator', items: [ranked] });
assert.equal(store.nextFor(board, { agentId: builder, lane: 'core' }).item.item_id, ranked);
assert.equal(store.nextFor(board, { agentId: builder, lane: 'core', priority: [oldest] }).item.item_id, ranked, 'an automatic rework tie-break does not overtake an explicit coordinator rank');
+ const replica = store.openBoard(':memory:');
+ t.after(() => store.closeBoard(replica));
+ importBoard(replica, exportBoard(board));
+ assert.equal(store.nextFor(replica, { agentId: builder, lane: 'core' }).item.item_id, ranked, 'a board snapshot retains the explicit rank');
const ordered = [oldest, middle, ranked].map(id => store.getItem(board, id)).sort(store.buildOrder(board));
assert.deepEqual(ordered.map(item => item.item_id), [ranked, oldest, middle], 'unranked items retain age order after explicit ranks');
store.editMilestoneItems(board, 'release', { agentId: 'coordinator', remove: [ranked] });