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.

fix(withdrawal): compose mixed engine floors [V2,V6,H16]

Corey Olson8d7edab41401
diff --git a/src/engine.js b/src/engine.js
index 2e4946b2..94a1d3fa 100644
--- a/src/engine.js
+++ b/src/engine.js
@@ -112,7 +112,8 @@ function minimumOperationEngine(operation, args, board, at) {
const outside = ['intakeOutside', 'approveOutside'].includes(operation) || operation === 'verify' && args[1]?.sandbox !== undefined
|| board && ['claim', 'submit', 'verify', 'merged'].includes(operation) && Boolean(outsideSource(board, args[0]));
const capacity = operation === 'claim' && args[1]?.lineCapacity === true;
- return Math.max(outside ? OUTSIDE_INTAKE_ENGINE : 1, capacity ? LINE_CAPACITY_ENGINE : 1, minimumExistingOperationEngine(operation, args, board, at));
+ return Math.max(outside ? OUTSIDE_INTAKE_ENGINE : 1, capacity ? LINE_CAPACITY_ENGINE : 1,
+ operation === 'reopen' && args[1]?.withdrawVerdict === true ? VERDICT_WITHDRAW_ENGINE : 1, minimumExistingOperationEngine(operation, args, board, at));
}
/** Preserve each pre-existing move's required feature level when composing outside metadata. */
diff --git a/test/verdict-withdraw-engine.test.js b/test/verdict-withdraw-engine.test.js
index 51604546..ec60d6cd 100644
--- a/test/verdict-withdraw-engine.test.js
+++ b/test/verdict-withdraw-engine.test.js
@@ -57,6 +57,10 @@ test('withdrawal true is engine-fenced while false retains historical reopen mea
const before = exportBoard(boards[1]);
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 mixed = { ...withdraw, args: [1, { ...withdraw.args[1], cause: 'conflict:src/example.js' }], engine: VERDICT_WITHDRAW_ENGINE - 1 };
+ assert.throws(() => applyRelayMove(boards[1], mixed, receipt), error => error.code === 'RELAY_MOVE');
+ assert.deepEqual(exportBoard(boards[1]), before, 'an older mixed cause+withdrawal tag also refuses before row or cursor changes');
+
const current = applyRelayMove(boards[2], withdraw, receipt);
assert.equal(current.error, undefined, JSON.stringify(current));
assert.equal(store.getItem(boards[2], 1).item_status, 'open');