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(board): assert named busy refusal during review race [C7,V15,P4]

Corey Olson45f290703fef
diff --git a/test/machine.test.js b/test/machine.test.js
index b62ea5da..62aa5b79 100644
--- a/test/machine.test.js
+++ b/test/machine.test.js
@@ -1258,7 +1258,7 @@ test('next --verify looks and reserves in one transaction, so no other verifier
store.reserveReview(rival, id, { agentId: third, leaseMs: 60_000, policy: 'any' });
rivalSaw = 'reserved';
} catch (error) {
- rivalSaw = error.message;
+ rivalSaw = error;
}
}
return new Date(Date.now() + 60_000);
@@ -1269,7 +1269,7 @@ test('next --verify looks and reserves in one transaction, so no other verifier
const found = store.reserveNextReview(looking, { agentId: 'web-2', lane: 'web', leaseMs: 60_000, policy: 'any' });
assert.equal(found.item?.item_review_by, 'web-2');
assert.ok(rivalSaw !== null, 'the look read the clock, so the rival had its chance mid-look');
- assert.match(rivalSaw, /locked/, 'the rival could not write while the look held the board');
+ assert.equal(rivalSaw.code, 'BOARD_BUSY', 'the rival could not write while the look held the board');
} finally {
for (const board of others) store.closeBoard(board);
lab.done();