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(core): align withdrawal controls with public contracts [V2,V6,M1]

Corey Olsond36562c63109
diff --git a/test/machine.test.js b/test/machine.test.js
index 8ff76525..61cb4eca 100644
--- a/test/machine.test.js
+++ b/test/machine.test.js
@@ -1287,7 +1287,7 @@ test('the lifecycle page and the help show the reservation: reserve, and reviewF
assert.match(page, /^\| reserve \| submitted \| submitted \| agent, coordinator \| .*reviewFree \(REVIEW_HELD\) \|$/m);
for (const verb of ['accept', 'reject']) assert.match(page, new RegExp(`^\\| ${verb} \\| submitted, verified \\| .*policyAllows \\(COORDINATOR_VERIFIES\\), familyAllows \\(O2_FAMILY_MATCH\\), reviewFree \\(REVIEW_HELD\\), criterionUnchanged`, 'm'));
assert.match(page, /^\| REVIEW_HELD \| no other agent holds its review under a live lease \| pullboard next --verify/m);
- assert.match(HELP.all, /^ {2}agent +claim, release, submit, reserve, accept, reject, escalate, refreeze \(when a live claim has a pending coordinator correction\)$/m);
+ assert.match(HELP.all, /^ {2}agent +claim, release, submit, reserve, accept, reject, reopen, escalate, refreeze \(when a live claim has a pending coordinator correction\)$/m);
assert.match(HELP.all, /pullboard next --verify +reserve the next submitted item you can check/);
});
diff --git a/test/reopen.test.js b/test/reopen.test.js
index 0446081f..2dd57391 100644
--- a/test/reopen.test.js
+++ b/test/reopen.test.js
@@ -769,7 +769,7 @@ test('a reviewer withdraws its own accept before landing and the builder gets th
}
const { box, reviewer, submitted } = withdrawalFixture(t);
box.git(box.repo, 'merge', '-q', '--no-edit', submitted.commit);
- const merged = box.run(box.repo, 'merged', '1', '--json');
+ const merged = box.run(box.repo, 'merged', '1', box.git(box.repo, 'rev-parse', 'HEAD'), '--json');
assert.equal(merged.code, 0, merged.err + merged.out);
for (const caller of [box.repo, reviewer]) {
const refused = box.run(caller, 'reopen', '1', '--withdraw-verdict', '--note', 'too late', '--json');
diff --git a/test/verdict-withdraw-engine.test.js b/test/verdict-withdraw-engine.test.js
index 76945798..2802b7df 100644
--- a/test/verdict-withdraw-engine.test.js
+++ b/test/verdict-withdraw-engine.test.js
@@ -51,7 +51,7 @@ test('withdrawal true is engine-fenced while false retains historical reopen mea
const withdraw = prepareEngineMove(boards[1], 'reopen', [1, { agentId: 'coordinator', note: 'recorded ruling missed', withdrawVerdict: true }],
{ id: 'withdraw-current', actor: 'coordinator' });
const before = exportBoard(boards[1]);
- assert.throws(() => applyRelayMove(boards[1], { ...withdraw, engine: VERDICT_WITHDRAW_ENGINE - 1 }, receipt), error => error.code === 'ENGINE_VERSION');
+ assert.throws(() => applyRelayMove(boards[1], { ...withdraw, engine: VERDICT_WITHDRAW_ENGINE - 1 }, receipt), error => error.code === 'RELAY_MOVE' && /introduced in engine/u.test(error.message));
assert.deepEqual(exportBoard(boards[1]), before, 'an impossible older tag refuses before any row or cursor changes');
const current = applyRelayMove(boards[2], withdraw, receipt);
assert.equal(current.error, undefined, JSON.stringify(current));