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.

chore(merge): integrate accepted conflict reopening [B3,D1]

Corey Olson5f7a0b5df8a1
diff --cc docs/formats.md
index 6b3e8f5d,0e50627b..2cc7b87f
--- a/docs/formats.md
+++ b/docs/formats.md
@@@ -142,10 -140,12 +140,14 @@@ Engine 38 records submission test selec
Engine 45 gives a milestone a target and a shipment. An `editMilestone` move may carry `target`, an ISO date or date-time with an explicit zone (the CLI and `prepareEngineMove` turn a typed local time into UTC before the move is sealed, so every replica stores the same instant; a bare local time in an envelope is refused with `MILESTONE_TARGET`), or `none` to clear it. A `shipMilestone` move records the milestone as shipped at main's commit and moves every local item that has not landed and is not withdrawn into the next unshipped milestone, or `--next`, writing a `milestone_moved` event on each moved item; repo-qualified references stay in place and are listed as not moved across boards. A shipped milestone refuses new items with `MILESTONE_SHIPPED`. Either makes the move an engine-45 move, and an older engine refuses it with `RELAY_MOVE` before changing its board or cursor. The coordinator assigned engine 45 to this milestone feature; each other feature retains its separately allocated engine minimum. Engine 30 carries the cause-key behavior above; engine 33 retains the checked-review behavior described above.
+ Engine 50 automatically advances a rejected item one route after two REJECT verdicts on the current route. A release is not a rejection; a manual escalation or an actual route edit starts a new count. The existing escalation event records both rejection receipts. The strong route remains the ceiling. Moves below engine 50 retain their earlier behavior and do not automatically escalate. Upgrade linked boards before using automatic rejection escalation.
+
+ Engine 51 writes #649's withdraw-and-remove milestone behavior. A withdraw move is followed by one ordered `editMilestoneItems` removal for each local milestone that lists the item; previous withdraw records retain their original replay, and an older client refuses the new engine before applying any move. `WITHDRAW_MILESTONE_ENGINE` is 51; `MILESTONE_SHIP_ENGINE` remains 45, so milestone targets and shipment keep their engine-45 meaning. The roadmap projects remaining-to-ship work before verified items and omits withdrawn items from its list and total while reporting them separately.
+
Engine 42 adds ordered `recordHealthFindings` observations. A scan retains its board event revision, emits new and resolved sentinel notices once, and records `health-failure` receipts under their refusal cause keys. Rigor counts repeated health episodes without inventing a changed code commit. Older engines refuse this operation before replay; earlier move meanings and feature minima stay unchanged.
+Engine 52 reopens an accepted item that conflicts with the trunk for a main merge. A `reopen` move may carry `conflict: {files, trunk}`: the files that conflict, and the full trunk commit they conflict with. The CLI takes one exact path per `--conflict <file>` flag and splits or trims nothing inside it, so a path with spaces or commas is named as Git reports it in `git merge-tree --write-tree --name-only -z`; `files` holds those exact paths, nonempty and without NUL. The CLI fills `trunk` from Git and refuses `NOT_CONFLICTING` when the accepted commit merges cleanly, or `CONFLICT_FILES` when a named file is not one Git reports as conflicting. The board refuses `NOT_ACCEPTED` unless the item is verified with an accept at its commit, and `BAD_CONFLICT` for a malformed conflict. A conflict needs no note and no landing failure; the event records `supersedes`, the accept it sets aside, `conflict`, and `cause: "refusal:MERGE_CONFLICT"`, never `landingFailure`, so rigor counts it as a merge conflict and never as a failing test. The item reads `needs main merge` until its next verdict, and the re-review checks the frozen check at the new head. A `reopen` move carrying `conflict` requires engine 52, and older engines refuse it with `RELAY_MOVE` before changing their board or cursor; a board replaying an older engine refuses it with `ENGINE_VERSION`. Moves recorded under engines 51 and earlier replay unchanged. The unlanded feature’s previous allocations were 36 and 47; it moved to 52 after the trunk reached engine 50 and milestone withdrawal was allocated engine 51, preserving every landed feature’s engine.
+
The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.
A linked board requires at least engine 48 after issuing any agent token or machine credential, including
revoked or expired ones; before engine 48 these minimums were 3 and 6. The minimum survives reopening the auth database;
diff --cc src/machine.js
index b42465ea,96bc9886..9d29f219
--- a/src/machine.js
+++ b/src/machine.js
@@@ -15,7 -18,11 +18,12 @@@ export const WITHDRAW_MILESTONE_ENGINE
export const AUTO_ESCALATE_ENGINE = 50;
/** Executable move semantics, carried by every sealed move and retained during replay [H16]. */
- export const ENGINE_VERSION = Math.max(AUTO_ESCALATE_ENGINE, RIGOR_NOTICE_ENGINE, 52);
+ export const ENGINE_VERSION = Math.max(
+ AUTO_ESCALATE_ENGINE,
+ RIGOR_NOTICE_ENGINE,
+ WITHDRAW_MILESTONE_ENGINE,
++ 52,
+ );
/**
* The engine whose relay moves carry seat provenance and verifier standing (#579). It is its own
diff --cc test/agent-model-engine.test.js
index e89be0b9,bee61d90..ed20e6cd
--- a/test/agent-model-engine.test.js
+++ b/test/agent-model-engine.test.js
@@@ -5,26 -4,32 +4,35 @@@ import { test } from 'node:test'
import * as store from '../src/board.js';
import { applyEngineMove, prepareEngineMove } from '../src/engine.js';
import { exportBoard, importBoard } from '../src/exchange.js';
- import { AUTO_ESCALATE_ENGINE } from '../src/machine.js';
- import { ENGINE_VERSION } from '../src/machine.js';
- import { VERIFIER_STANDING_ENGINE } from '../src/machine.js';
+ import {
+ AUTO_ESCALATE_ENGINE,
+ ENGINE_VERSION,
+ VERIFIER_STANDING_ENGINE,
+ } from '../src/machine.js';
+ import {
+ MILESTONE_SHIP_ENGINE,
+ WITHDRAW_MILESTONE_ENGINE,
+ } from '../src/milestones.js';
import { RIGOR_NOTICE_ENGINE } from '../src/rigor-source.js';
import { HEALTH_SENTINEL_ENGINE } from '../src/health-receipts.js';
+import { CONFLICT_ENGINE } from '../src/trunk-conflict.js';
import { configProblems, defaults, loadConfig } from '../src/config.js';
import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
test('model declarations and event snapshots retain all supported engine semantics [O8,O3,H16]', (t) => {
- assert.ok(ENGINE_VERSION >= AUTO_ESCALATE_ENGINE, 'the current writer retains automatic-escalation semantics');
- assert.ok(ENGINE_VERSION >= 45, 'the current writer retains engine-45 milestone semantics');
+ assert.equal(AUTO_ESCALATE_ENGINE, 50, 'automatic escalation retains its allocated engine');
+ assert.equal(WITHDRAW_MILESTONE_ENGINE, 51, 'withdraw retains its allocated feature engine');
- assert.equal(ENGINE_VERSION, WITHDRAW_MILESTONE_ENGINE, 'the current writer includes the withdraw feature');
++ assert.ok(ENGINE_VERSION >= WITHDRAW_MILESTONE_ENGINE, 'the current writer includes the withdraw feature');
++ assert.equal(CONFLICT_ENGINE, 52, 'trunk conflict retains its allocated feature engine');
++ assert.ok(ENGINE_VERSION >= CONFLICT_ENGINE, 'the current writer retains trunk-conflict semantics');
+ assert.ok(ENGINE_VERSION >= AUTO_ESCALATE_ENGINE, 'the current writer retains automatic escalation');
+ assert.equal(MILESTONE_SHIP_ENGINE, 45, 'shipment retains its engine-45 meaning');
+ assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the current writer retains all milestone shipment behavior');
+ assert.ok(ENGINE_VERSION >= VERIFIER_STANDING_ENGINE, 'the current writer retains verifier standing');
assert.ok(ENGINE_VERSION >= RIGOR_NOTICE_ENGINE, 'the next writer preserves every historical model snapshot through main engine 33');
assert.ok(ENGINE_VERSION >= HEALTH_SENTINEL_ENGINE, 'the current writer retains the sentinel minimum and historical behavior');
- assert.ok(ENGINE_VERSION >= AUTO_ESCALATE_ENGINE, 'the current writer includes automatic escalation and preserves historical model snapshots');
- assert.ok(ENGINE_VERSION >= VERIFIER_STANDING_ENGINE, 'the current writer retains verifier standing');
- assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the current writer retains milestone shipping');
- assert.ok(ENGINE_VERSION >= CONFLICT_ENGINE, 'the writer retains the trunk-conflict feature minimum');
for (const version of Array.from({ length: ENGINE_VERSION }, (_, index) => index + 1)) {
const board = store.openBoard(':memory:');
t.after(() => store.closeBoard(board));
diff --cc test/pending-refreeze.test.js
index f9ec804f,7b33d3ef..4ebfa2c4
--- a/test/pending-refreeze.test.js
+++ b/test/pending-refreeze.test.js
@@@ -8,13 -8,17 +8,18 @@@ import { test } from 'node:test'
import * as store from '../src/board.js';
import { appliedSequence, applyRelayMove, engineReceipt, prepareEngineMove } from '../src/engine.js';
import { exportBoard, importBoard } from '../src/exchange.js';
- import { AUTO_ESCALATE_ENGINE } from '../src/machine.js';
- import { ENGINE_VERSION } from '../src/machine.js';
- import { VERIFIER_STANDING_ENGINE } from '../src/machine.js';
+ import {
+ AUTO_ESCALATE_ENGINE,
+ ENGINE_VERSION,
+ VERIFIER_STANDING_ENGINE,
+ } from '../src/machine.js';
+ import {
+ MILESTONE_SHIP_ENGINE,
+ WITHDRAW_MILESTONE_ENGINE,
+ } from '../src/milestones.js';
import { RIGOR_NOTICE_ENGINE } from '../src/rigor-source.js';
import { HEALTH_SENTINEL_ENGINE } from '../src/health-receipts.js';
+import { CONFLICT_ENGINE } from '../src/trunk-conflict.js';
- import { MILESTONE_SHIP_ENGINE } from '../src/milestones.js';
import { createE2eHelpers } from './e2e-helpers.js';
import { unpackRelease } from './release-archive.js';
@@@ -267,14 -271,15 +272,17 @@@ async function checkDependencyLegacyCli
}
test('dependency edits replay the same on every engine [B3,V2,H16]', async (t) => {
- assert.ok(ENGINE_VERSION >= AUTO_ESCALATE_ENGINE, 'the current writer retains automatic-escalation semantics');
- assert.ok(ENGINE_VERSION >= 45, 'the current writer retains engine-45 milestone semantics');
+ assert.equal(AUTO_ESCALATE_ENGINE, 50, 'automatic escalation retains its allocated engine');
+ assert.equal(WITHDRAW_MILESTONE_ENGINE, 51, 'withdraw retains its allocated feature engine');
- assert.equal(ENGINE_VERSION, WITHDRAW_MILESTONE_ENGINE, 'the current writer includes the withdraw feature');
++ assert.ok(ENGINE_VERSION >= WITHDRAW_MILESTONE_ENGINE, 'the current writer includes the withdraw feature');
++ assert.equal(CONFLICT_ENGINE, 52, 'trunk conflict retains its allocated feature engine');
++ assert.ok(ENGINE_VERSION >= CONFLICT_ENGINE, 'the current writer retains trunk-conflict semantics');
+ assert.ok(ENGINE_VERSION >= AUTO_ESCALATE_ENGINE, 'the current writer retains automatic escalation');
+ assert.equal(MILESTONE_SHIP_ENGINE, 45, 'shipment retains its engine-45 meaning');
+ assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the current writer retains all milestone shipment behavior');
+ assert.ok(ENGINE_VERSION >= VERIFIER_STANDING_ENGINE, 'the current writer retains verifier standing');
assert.ok(ENGINE_VERSION >= RIGOR_NOTICE_ENGINE, 'the next writer retains all recorded dependency-edit behavior');
assert.ok(ENGINE_VERSION >= HEALTH_SENTINEL_ENGINE, 'the current writer retains the sentinel minimum and historical behavior');
- assert.ok(ENGINE_VERSION >= AUTO_ESCALATE_ENGINE, 'the current writer retains recorded dependency-edit behavior and automatic escalation');
- assert.ok(ENGINE_VERSION >= VERIFIER_STANDING_ENGINE, 'the current writer retains verifier standing');
- assert.ok(ENGINE_VERSION >= CONFLICT_ENGINE, 'the writer retains the trunk-conflict feature minimum');
- assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the writer retains the milestone shipment minimum and every recorded legacy engine');
const directory = mkdtempSync(join(tmpdir(), 'pullboard-dependency-engines-'));
const cleanup = [];
t.after(() => {