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(core): preserve ordered release refusals [V1,H16]

Corey Olson596bc648022c
diff --git a/src/board.js b/src/board.js
index d5eb0bcc..6a7738d8 100644
--- a/src/board.js
+++ b/src/board.js
@@ -1087,7 +1087,13 @@ export function reviewHolder(board, item) {
*/
export function reviewReleaseNoteProblem(board, itemId, agentId, note) {
if ((board.executionEngineVersion ?? ENGINE_VERSION) < 5) return null;
- const item = getItem(board, itemId);
+ let item;
+ try { item = getItem(board, itemId); }
+ catch (error) {
+ // Missing items keep their native, ordered refusal; this preflight only validates review notes.
+ if (error instanceof Refused && error.code === 'NO_ITEM') return null;
+ throw error;
+ }
if (item.item_status !== 'submitted' || reviewHolder(board, item) !== agentId) return null;
const reason = typeof note === 'string' ? note.trim() : '';
if (!reason || /[\r\n\u2028\u2029]/u.test(reason)) {
diff --git a/test/engine.test.js b/test/engine.test.js
index 8170426f..b30e4266 100644
--- a/test/engine.test.js
+++ b/test/engine.test.js
@@ -281,8 +281,10 @@ test('released engine 3 stops a background completion before changing rows or it
for (const board of copies) {
store.editItem(board, item, { agentId: 'coordinator', check: expected.command, checkBaseline: { ...expected, result: 'pending' } });
checkpointSequence(board, 7);
- const move = prepareEngineMove(board, 'completeCheckBaseline', [item, { agentId: 'coordinator', expected, baseline }]);
- assert.equal(move.engine, 4);
+ const currentMove = prepareEngineMove(board, 'completeCheckBaseline', [item, { agentId: 'coordinator', expected, baseline }]);
+ assert.equal(currentMove.engine, ENGINE_VERSION);
+ assert.ok(ENGINE_VERSION >= 4, 'the current engine supports background completions');
+ const move = { ...currentMove, engine: 4 }; // Keep the actual v4-versus-released-v3 compatibility boundary.
const before = exportBoard(board);
assert.throws(() => released.applyRelayMove(board, move, { sequence: 8, at: CLAIM_AT, kind: 'move', sender }), error => {
assert.equal(error.code, 'ENGINE_VERSION');