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.
JavaScript agentic-codingai-agentsai-governanceautonomous-agentsclaude-codeclicode-reviewcodexcoding-agentsdeveloper-toolsgit-hooksllmlocal-firstmulti-agentsoftware-factoryspec-driven-developmentverificationvibe-coding
chore(merge): integrate accepted conflict reopening [B3,D1]
Corey Olson9469351601dd
diff --cc docs/formats.mdindex 24598d4b,0d2cab80..7e27707e--- a/docs/formats.md+++ b/docs/formats.md@@@ -136,10 -136,10 +136,12 @@@ Engine 30 lets a reject and a reopen caEngine 38 records submission test selections and normalized landing evidence. A `submit` carrying `submissionProof` or a `recordLandingBatch` carrying `invariantEvidence` requires engine 38; earlier engines refuse these envelopes before applying them, and a missing or malformed proof is refused with `SUBMISSION_PROOF` on a modern submit before its item or events change. Moves recorded under engines 37 and earlier replay without inferred coverage. Recorded invariant evidence is append-only when a landing batch is adopted; adopting or finishing a batch already carrying that evidence requires engine 38, even when the incoming move omits the evidence field. Engine slots 25 through 37 are allocated to earlier train changes; preserve their semantics when composing this item.+ 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 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 47 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 47, 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 46 and earlier replay unchanged. The unlanded feature’s previous allocation was 36; it moved to 47 after the trunk reached engine 42, 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 3 after issuing any agent token, includingrevoked or expired tokens. Issuing any machine credential raises that board’s minimum to engine 6, including after revocation or expiry. The minimum survives reopening the auth database;diff --cc src/engine.jsindex 7052c3b3,ff14534f..fe07dfa3--- a/src/engine.js+++ b/src/engine.js@@@ -54,9 -54,10 +58,10 @@@ export const ENGINE_OPERATIONS = Object]);/** Engine version at which each ordered operation first has stable replay semantics. */- const OPERATION_ENGINE = Object.freeze({ orderMilestoneItems: MILESTONE_RANK_ENGINE, reopen: 8, recordLandingBatch: 8, recordLandingWaiver: 8, recordLandingFlake: 8, finishLandingBatch: 8, acceptCheck: CHECK_ACCEPT_ENGINE });+ const OPERATION_ENGINE = Object.freeze({ orderMilestoneItems: MILESTONE_RANK_ENGINE, reopen: 8, recordLandingBatch: 8, recordLandingWaiver: 8, recordLandingFlake: 8, finishLandingBatch: 8, acceptCheck: CHECK_ACCEPT_ENGINE,+ shipMilestone: MILESTONE_SHIP_ENGINE });- /** Dependency edits, causes, sealed reviews, submission proofs and trunk conflicts retain distinct recorded engine meanings. */-/** Dependency edits, causes, sealed reviews, submission proofs, health observations and milestone targets retain distinct recorded engine meanings. */++/** Dependency edits, causes, sealed reviews, submission proofs, trunk conflicts, health observations and milestone targets retain distinct recorded engine meanings. */function minimumOperationEngine(operation, args, board) {if (operation === 'recordHealthFindings') return HEALTH_SENTINEL_ENGINE;const options = args[1];diff --cc src/machine.jsindex ba43fefe,1aa6eb98..469f919a--- a/src/machine.js+++ b/src/machine.js@@@ -10,7 -10,8 +10,8 @@@*//** Executable move semantics, carried by every sealed move and retained during replay [H16]. */+ import { RIGOR_NOTICE_ENGINE } from './rigor-source.js';-export const ENGINE_VERSION = 45;+export const ENGINE_VERSION = 47;/** The engine at which a reject, reopen or person fact can carry a cause key (#713); older moves replay unchanged [D1,H16]. */export const CAUSE_ENGINE = 30;diff --cc test/agent-model-engine.test.jsindex e0687006,05a61d5f..6e6f8891--- a/test/agent-model-engine.test.js+++ b/test/agent-model-engine.test.js@@@ -8,15 -6,16 +6,19 @@@ import { applyEngineMove, prepareEngineimport { exportBoard, importBoard } from '../src/exchange.js';import { ENGINE_VERSION } from '../src/machine.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 { 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 engines 1 through 34 semantics [O8,O3,H16]', (t) => {-test('model declarations and event snapshots retain engines 1 through 45 semantics [O8,O3,H16]', (t) => {- assert.equal(ENGINE_VERSION, 45, 'the current writer retains historical behavior through engine 44');++test('model declarations and event snapshots retain every recorded engine [O8,O3,H16]', (t) => {++ assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the writer retains the milestone shipment minimum and every recorded legacy engine');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 >= 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.jsindex ef6233cd,3fcb18a0..dbbcbaa0--- a/test/pending-refreeze.test.js+++ b/test/pending-refreeze.test.js@@@ -12,6 -10,7 +10,9 @@@ import { appliedSequence, applyRelayMovimport { exportBoard, importBoard } from '../src/exchange.js';import { ENGINE_VERSION } from '../src/machine.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';@@@ -264,9 -263,9 +265,10 @@@ async function checkDependencyLegacyCli}test('dependency edits replay the same on every engine [B3,V2,H16]', async (t) => {- assert.equal(ENGINE_VERSION, 45, 'the current writer retains historical behavior through engine 44');++ assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the writer retains the milestone shipment minimum and every recorded legacy engine');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 >= CONFLICT_ENGINE, 'the writer retains the trunk-conflict feature minimum');const directory = mkdtempSync(join(tmpdir(), 'pullboard-dependency-engines-'));const cleanup = [];t.after(() => {