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(core): merge current trunk with engine-44 escalation [B15]
Corey Olson9dd22d46d2b2
diff --cc docs/api.mdindex 83a1fda6,f97c22a1..72d326fb--- a/docs/api.md+++ b/docs/api.md@@@ -214,12 -216,10 +216,14 @@@ The causes, each with its ownerThe current release is the roadmap's first milestone with unverified local work; an unplanned item counts as current. A release is the newest tag named like `v1.2.3` or `1.2.3`, dated by its creation, and its landed work is every item first recorded merged after it. A repository with no such tag has no release deadline. The trunk is the primary checkout's branch, or the retained trunk when that checkout is detached.+ The health sentinel runs this read-only scan on `pullboard resume` and every ten minutes while the background view runs. New findings and resolutions arrive as ordinary shouts from `sentinel` to the coordinator and the finding’s owner, with its cause and next step. A continuing episode is not posted again. Ordered engine-42 receipts retain the observed revision; a concurrent board change defers the observation to a later resume instead of publishing stale findings. Health never changes claim state. Set `health.sentinel` to `false` in this repo’s `pullboard.json` or in machine settings to turn automatic scans off. Repeated `health-failure` receipts are visible to `pullboard rigor`, including a recurring work cause with no changed code commit.+`pullboard.json` sets the thresholds under `health`, each a duration like `90m`, `2h` or `1d`: `stuck` (default `1h`), `holds` (default `1d`) and `release` (default `1d`). A value that is not a duration is refused as `BAD_CONFIG`.+## Automatic escalation++Starting with engine 41, the second REJECT verdict since an item's latest route change records the existing escalation move automatically. Releases do not count as failed attempts. One `escalate` event carries both rejection records, including their reason, note, commit, digest, checked head and timestamp. A hand escalation or a route edit starts a new count; strong remains the ceiling. Sealed operations from engines below 41 retain their prior replay behavior.+## Item threads`pullboard fact <id> <kind> "<text>"` appends a fact to an existing item. The observation kinds are `capture`, `measurement`, `note` and `diff`; any registered agent may append them. The judgement kinds are `decision`, `rejection`, `supersession` and `root-cause`; only the item's live lease holder or the coordinator may append them. An expired lease gives no judgement permission. Facts do not change the item's status or its claim.diff --cc docs/formats.mdindex a5ac2755,31a2239e..03c0e550--- a/docs/formats.md+++ b/docs/formats.md@@@ -113,7 -113,7 +113,7 @@@ The board file is in the repository's G| `row grammar` | `1` | `SPEC_GRAMMAR_VERSION` in `src/spec.js`; optional `<!-- pullboard-grammar N -->` line in either file (absence means the current grammar) | Both files share the version. A declared version must match; an incompatible grammar change requires a coordinated version bump and compatible files. No automatic conversion occurs. || `board schema` | `2` | `SCHEMA_VERSION` in `src/board.js`, persisted as `PRAGMA user_version` | Create missing tables and indexes, add missing columns in place with declared defaults, restore missing or changed triggers, and remove stale machine triggers without replacing rows. || `event log` | `1` | `EVENT_LOG_VERSION` in `src/board.js`, persisted in `board_meta` as `event_log_version` | Older event-log versions upgrade in place; newer versions are refused with `EVENT_LOG_VERSION`. Preserve event rows when the board schema changes. |- | `move engine` | `41` | `ENGINE_VERSION` in `src/machine.js`, carried as `engine` in every sealed executable move | Bump when a move's meaning changes, independently of the event log and sealed envelope. A newer engine is refused with `ENGINE_VERSION`, naming both versions and asking you to upgrade Pullboard. |-| `move engine` | `42` | `ENGINE_VERSION` in `src/machine.js`, carried as `engine` in every sealed executable move | Bump when a move's meaning changes, independently of the event log and sealed envelope. A newer engine is refused with `ENGINE_VERSION`, naming both versions and asking you to upgrade Pullboard. |++| `move engine` | `44` | `ENGINE_VERSION` in `src/machine.js`, carried as `engine` in every sealed executable move | Bump when a move's meaning changes, independently of the event log and sealed envelope. A newer engine is refused with `ENGINE_VERSION`, naming both versions and asking you to upgrade Pullboard. |<!-- format-versions:end -->Pullboard 0.6.1 released engine 1. Engine 2 records a fresh explicit-build claim's skipped-review snapshot. Pullboard 0.8.1 released engine 3, including lane-sensitive graft refusals and authenticated relay senders. Engine 4 adds captured background-baseline completions through `completeCheckBaseline`; released engine-3 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Engine 5 requires a one-line reason when releasing a review and gives that reviewer a one-hour cooldown for the current submission. Each sealed move replays under its recorded engine version: engines 1 through 4 retain the original release event and review-reservation behavior. Engine 5 retains support for older moves, including engine-4 baseline completions. Pullboard 0.8.3 released engine 6, adding board-scoped machine credentials and permitting machine execution only for one exact, earlier authenticated phone request, including its payload digest. Engine 7 adds ordered item holds through `holdItem` and `releaseItemHold`; engine-6 clients stop with `ENGINE_VERSION` before interpreting either operation or advancing their replay cursor. Engine 8, shared by the 0.8.5 move changes, retains merged-item exception notes, selects the next review in roadmap order, and adds coordinator-only `reopen` for a submission returned without a verdict; engine-7 clients stop with `ENGINE_VERSION` before interpreting this new operation or advancing their replay cursor. Recorded engines 1 through 7 retain their original tier-first review selection. Engine 8 also adds durable refusal recovery for blocked relay positions; each explicit skip publishes the readable prefix even when another unsupported record follows. Engine 8 also permits coordinator criterion/check edits on a live claim as pending corrections; the holder cannot renew or submit until a refreeze adopts the correction while preserving the claim. Older request receipts retain their recorded engine semantics. Upgrade every linked device before using the new moves. Each release shares one engine bump across its changed moves. Engine 8 also retains declared model labels on registration and records each registered agent move's model snapshot; engines 1 through 7 retain their original registration and event details without these model fields. Pullboard 0.8.8 released engine 9, which allows resubmitting the same rejected commit after a corrected criterion is refrozen, but only when the rejection names a different frozen digest. Engine 8 retains its HEAD_NOT_NEW refusal and prior submit-event detail. Engine-9 submit events add `criterionDigest`, and engine-8 boards replay with the original refusal and event history.@@@ -128,8 -128,6 +128,8 @@@ Engine 19 makes a corrected bar recordEngine 33 binds a review to the immutable submitted commit, the exact checked composition, its reviewed trunk and sorted candidate paths. A stale, unmerged acceptance can be re-reviewed without rewriting the submission; landing uses its accepted checked composition. New review metadata and landing batches carrying `reviewedCommit` require engine 33, including later updates to those batches. Previously recorded outcomes replay before this state-dependent version check, and previously released engines retain their original review and landing behavior. Older clients refuse engine-33 moves before changing their board or replay cursor; upgrade linked clients before using checked-composition reviews. The coordinator assigned engine 33 to this change. Merge the actual trunk before landing.- Engine 41 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 41 retain their earlier behavior and do not automatically escalate. Upgrade linked boards before using automatic rejection escalation.++Engine 44 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 44 retain their earlier behavior and do not automatically escalate. Upgrade linked boards before using automatic rejection escalation.+Engine 20 lets a decision name the items it changes. An `appendFact`, `answerDecision` or `verify` move may carry `implies`, a list of existing item ids, and an `answerDecision` move may carry `supersedes`, the shout id of an earlier answer. Either makes the move an engine-20 move: an older engine refuses it with `RELAY_MOVE` before changing its board or cursor, and a board replaying an older engine refuses `implies` with `ENGINE_VERSION`. Engine 20 also tells implied items when a decision is superseded: by a fact's `supersedes`, by an answer's `supersedes`, or by the next verdict on the same item. Moves recorded under engines 19 and earlier replay without these notices. Engine numbers 13 to 18 are allocated to other changes; whichever lands later renumbers, keeping every earlier engine's replay unchanged.Engine 24 adds the person's `acceptCheck`: an item's current check, named by its SHA-256 digest, accepted so a check already green on main no longer holds the item on a board whose `checks.provesNothing` is `"hold"`. Only the person may send it, from the terminal or the view; the relay refuses it from an agent or a machine. A move from an older engine is refused before it changes the board or replay cursor, and older clients refuse engine-24 moves before interpreting them. Engines 21 through 23 are allocated to other changes.diff --cc docs/lifecycle.mdindex cac2b67f,8f5550ff..9b2f77d7--- a/docs/lifecycle.md+++ b/docs/lifecycle.md@@@ -56,10 -56,10 +56,10 @@@ Each move checks its guards in this ord| claim | open, claimed | claimed | agent, coordinator | joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_CLAIMABLE), checkProvesSomething (CRITERION_PROVES_NOTHING), itemNotHeld (ITEM_HELD), inLane (WRONG_LANE), routeAllows (ROUTE), dependenciesVerified (BLOCKED), notHeldByAnother (HELD), correctionRefrozen (PENDING_REFREEZE), laneOpen (LANE_HELD), oneLiveClaim (ONE_CLAIM), rowsInForce (UNKNOWN_SPEC or A5_GRAMMAR_VERSION or NO_POLICY or BAD_CONFIG or SPEC_BEHIND_MAIN) || release | claimed | open | agent, coordinator | joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_YOURS), isHolder (NOT_YOURS), reviewReleaseExplained (NOTE_REQUIRED) || lapse | claimed | open | clock, when its lease runs out | none |- | submit | claimed | submitted | agent, coordinator | joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_YOURS), isHolder (NOT_YOURS), correctionRefrozen (PENDING_REFREEZE), checkProvesSomething (CRITERION_PROVES_NOTHING), criterionUnchanged (CRITERIA_CHANGED), treeClean (DIRTY), nothingUntracked (UNTRACKED), hasCommit (NO_COMMIT), withinLane (OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), trunkMergeClean (MERGE_CONFLICT or MERGE_CHECK_FAILED or NO_POLICY or NO_TRUNK), noUnverifiedStack (STACKED_ON_UNVERIFIED), doctrineHolds (RATCHET_ROSE or RATCHET_UNCOUNTED), gateConfigured (NO_GATE), queuedItemLease (ITEM_LEASE_LOST or A5_GRAMMAR_VERSION or SPEC_BEHIND_MAIN or NOT_A_REPO or NO_CONFIG), gateGreen (GATE_RED or PIPEFAIL_UNAVAILABLE), treeStillDuringGate (MOVED_DURING_GATE), childrenDone (CHILDREN_OPEN), headIsNew (HEAD_NOT_NEW) |+ | submit | claimed | submitted | agent, coordinator | joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_YOURS), isHolder (NOT_YOURS), correctionRefrozen (PENDING_REFREEZE), checkProvesSomething (CRITERION_PROVES_NOTHING), criterionUnchanged (CRITERIA_CHANGED), treeClean (DIRTY), nothingUntracked (UNTRACKED), hasCommit (NO_COMMIT), withinLane (OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), trunkMergeClean (MERGE_CONFLICT or MERGE_CHECK_FAILED or NO_POLICY or NO_TRUNK), noUnverifiedStack (STACKED_ON_UNVERIFIED), doctrineHolds (RATCHET_ROSE or RATCHET_UNCOUNTED), gateConfigured (NO_GATE), queuedItemLease (ITEM_LEASE_LOST or A5_GRAMMAR_VERSION or SPEC_BEHIND_MAIN or NOT_A_REPO or NO_CONFIG), gateGreen (GATE_RED or PIPEFAIL_UNAVAILABLE), treeStillDuringGate (MOVED_DURING_GATE), submissionProofValid (SUBMISSION_PROOF), childrenDone (CHILDREN_OPEN), headIsNew (HEAD_NOT_NEW) || reserve | submitted | submitted | agent, coordinator | coordinatorSaysAs (MAIN_IS_COORDINATOR), joined (NOT_JOINED), roadmapReadable (MILESTONES_CORRUPT), itemExists (NO_ITEM), inState (NOT_SUBMITTED), reviewCooldownElapsed (REVIEW_COOLDOWN), notBuilder (SELF_VERIFY), routeAllows (ROUTE), policyAllows (COORDINATOR_VERIFIES), familyAllows (O2_FAMILY_MATCH), reviewFree (REVIEW_HELD) || accept | submitted, verified | verified | agent, coordinator | coordinatorSaysAs (MAIN_IS_COORDINATOR), joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_SUBMITTED), atSubmittedCommit (NOT_AT_COMMIT or OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), notMerged (ALREADY_MERGED), verdictReviewRecorded (BAD_VERDICT_REVIEW), reviewTreeCurrent (STALE_VERDICT or DIRTY or UNTRACKED or VERDICT_TRUNK_MOVED), notBuilder (SELF_VERIFY), routeAllows (ROUTE), policyAllows (COORDINATOR_VERIFIES), familyAllows (O2_FAMILY_MATCH), reviewFree (REVIEW_HELD), criterionUnchanged (CRITERIA_CHANGED), reasonIsMet (BAD_REASON), trunkMergeClean (MERGE_CONFLICT or MERGE_CHECK_FAILED or NO_POLICY or NO_TRUNK), noUnverifiedStack (STACKED_ON_UNVERIFIED), queuedItemLease (ITEM_LEASE_LOST or A5_GRAMMAR_VERSION or SPEC_BEHIND_MAIN or NOT_A_REPO or NO_CONFIG), itemCheckGreen (CHECK_RED or CHECK_UNVERIFIED), proofNoted (PROOF_REQUIRED), result (LAND_HEADER), result (ENGINE_VERSION) |-| reject | submitted, verified | open | agent, coordinator | coordinatorSaysAs (MAIN_IS_COORDINATOR), joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_SUBMITTED), atSubmittedCommit (NOT_AT_COMMIT or OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), notMerged (ALREADY_MERGED), verdictReviewRecorded (BAD_VERDICT_REVIEW), reviewTreeCurrent (STALE_VERDICT or DIRTY or UNTRACKED or VERDICT_TRUNK_MOVED), notBuilder (SELF_VERIFY), routeAllows (ROUTE), policyAllows (COORDINATOR_VERIFIES), familyAllows (O2_FAMILY_MATCH), reviewFree (REVIEW_HELD), criterionUnchanged (CRITERIA_CHANGED), reasonCoded (BAD_REASON), noteGiven (NOTE_REQUIRED), causeWellFormed (BAD_CAUSE), result (LAND_HEADER), result (ENGINE_VERSION) |+| reject | submitted, verified | open | agent, coordinator | coordinatorSaysAs (MAIN_IS_COORDINATOR), joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_SUBMITTED), atSubmittedCommit (NOT_AT_COMMIT or OUTSIDE_LANE or NO_POLICY or BAD_CONFIG or GIT_GRAFTS), notMerged (ALREADY_MERGED), verdictReviewRecorded (BAD_VERDICT_REVIEW), reviewTreeCurrent (STALE_VERDICT or DIRTY or UNTRACKED or VERDICT_TRUNK_MOVED), notBuilder (SELF_VERIFY), routeAllows (ROUTE), policyAllows (COORDINATOR_VERIFIES), familyAllows (O2_FAMILY_MATCH), reviewFree (REVIEW_HELD), criterionUnchanged (CRITERIA_CHANGED), reasonCoded (BAD_REASON), noteGiven (NOTE_REQUIRED), causeWellFormed (BAD_CAUSE), result (LAND_HEADER), result (ENGINE_VERSION), result (NOT_YOURS), result (CLOSED) || reopen | submitted, verified | open | coordinator | joined (NOT_JOINED), itemExists (NO_ITEM), inState (NOT_SUBMITTED), coordinatorOnly (COORDINATOR_ONLY), noteGiven (NOTE_REQUIRED), causeWellFormed (BAD_CAUSE), notMerged (ALREADY_MERGED), landingFailureRecorded (LANDING_FAILURE_REQUIRED) || escalate | open, claimed | open | agent, coordinator | joined (NOT_JOINED), noteGiven (NOTE_REQUIRED), itemExists (NO_ITEM), holderOrCoordinator (NOT_YOURS), inState (CLOSED) || refreeze | open, claimed, submitted | open | coordinator, when there is no live claim awaiting a coordinator correction | joined (NOT_JOINED), coordinatorOnly (COORDINATOR_ONLY), itemExists (NO_ITEM), inState (CLOSED), rowsInForce (UNKNOWN_SPEC or A5_GRAMMAR_VERSION or NO_POLICY or BAD_CONFIG or SPEC_BEHIND_MAIN) |diff --cc src/machine.jsindex 652c76f4,e11f776b..212cb068--- a/src/machine.js+++ b/src/machine.js@@@ -10,10 -10,7 +10,10 @@@*//** Executable move semantics, carried by every sealed move and retained during replay [H16]. */- export const ENGINE_VERSION = 41;-export const ENGINE_VERSION = 42;++export const ENGINE_VERSION = 44;++/** First engine that automatically escalates an item's second rejection at its current route [B15]. */- export const AUTO_ESCALATE_ENGINE = 41;++export const AUTO_ESCALATE_ENGINE = 44;/** 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 bea9ac91,31861391..01cc8f4b--- a/test/agent-model-engine.test.js+++ b/test/agent-model-engine.test.js@@@ -11,7 -12,7 +12,9 @@@ 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) => {- assert.ok(ENGINE_VERSION >= AUTO_ESCALATE_ENGINE, 'the current writer includes automatic escalation and preserves historical model snapshots');++ assert.equal(ENGINE_VERSION, 44, 'engine 44 is the current writer');+ assert.ok(ENGINE_VERSION >= HEALTH_SENTINEL_ENGINE, 'the current writer retains the sentinel minimum and historical behavior');++ assert.equal(AUTO_ESCALATE_ENGINE, ENGINE_VERSION, 'the current writer includes automatic escalation and preserves historical model snapshots');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/board.test.jsindex 84eece66,af2f1892..39521103--- a/test/board.test.js+++ b/test/board.test.js@@@ -312,22 -311,6 +313,22 @@@ function submitted()const verdict = (id, fields) =>store.verify(board, id, { head: SHA_A, digest: 'digest:Page', policy: 'any', note: 'broke the fix; its test failed; restored it', ...fields });+/** Submit one new revision and record its rejection on the item's real SQLite board [B15,V6].+ *+ * @param {number} id+ * @param {string} commit+ * @param {string} note+ */+function rejectRevision(id, commit, note) {+ if (store.getItem(board, id).item_status === 'open') claimAs(id, 'web-1', 'web');+ const item = store.getItem(board, id);- store.submit(board, id, { agentId: 'web-1', commit, tree: `tree-${commit[0]}` });++ submitFixture(board, id, { agentId: 'web-1', commit, tree: `tree-${commit[0]}` });+ verdict(id, {+ agentId: 'web-2', decision: 'REJECT', reason: 'TEST_FAILURE', note,+ head: commit, digest: `digest:${item.item_title}`,+ });+}+test('the builder never verifies its own work [V1]', () => {const id = submitted();assert.throws(() => verdict(id, { agentId: 'web-1', decision: 'ACCEPT' }), /SELF_VERIFY/);@@@ -866,109 -849,6 +867,144 @@@ test('escalate frees an item one tier uassert.deepEqual(JSON.parse(first.event_detail), { from: 'light', to: 'mid', note: 'check failed twice', attempt: 'refs/pullboard/attempts/1/abc', model: 'unknown' }, 'the failure and the pinned attempt travel with it');});+test('two failed attempts at a route escalate the item one route up [B15,B13]', () => {+ const id = routed('Automatic escalation', 'light');+ claimAs(id, 'web-1', 'web');+ store.release(board, id, 'web-1');+ rejectRevision(id, SHA_A, 'first reject: missing parser output');+ assert.equal(store.getItem(board, id).item_route, 'light', 'a release is not a failed attempt');+ assert.equal(store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate').length, 0);++ rejectRevision(id, SHA_B, 'second reject: parser still drops the row');+ const item = store.getItem(board, id);+ assert.deepEqual([item.item_status, item.item_route, item.item_owner], ['open', 'mid', null]);+ const escalations = store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate');+ assert.equal(escalations.length, 1, 'the second rejection writes one existing escalation event');+ const detail = JSON.parse(escalations[0].event_detail);+ assert.deepEqual([detail.from, detail.to], ['light', 'mid']);+ assert.equal(detail.rejections.length, 2, 'the single escalation receipt carries both rejections');+ assert.deepEqual(detail.rejections.map((entry) => entry.note), [+ 'first reject: missing parser output', 'second reject: parser still drops the row',+ ]);+ assert.deepEqual(detail.rejections.map((entry) => entry.reason), ['TEST_FAILURE', 'TEST_FAILURE']);+ assert.deepEqual(detail.rejections.map((entry) => [entry.commit, entry.head]), [[SHA_A, SHA_A], [SHA_B, SHA_B]]);+ assert.ok(detail.rejections.every((entry) => entry.verdictId && entry.eventId && entry.digest && entry.at));+});++test('a hand escalation starts a new route rejection count [B15,B13]', () => {+ const id = routed('Manual route reset', 'light');+ rejectRevision(id, SHA_A, 'old-route reject');+ assert.equal(store.getItem(board, id).item_route, 'light');+ store.escalate(board, id, { agentId: 'coordinator', note: 'manual route handoff' });++ rejectRevision(id, SHA_B, 'first mid-route reject');+ assert.equal(store.getItem(board, id).item_route, 'mid', 'the prior light rejection does not carry over');+ assert.equal(store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate').length, 1);+ rejectRevision(id, SHA_C, 'second mid-route reject');+ assert.equal(store.getItem(board, id).item_route, 'strong');+ const escalations = store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate');+ assert.equal(escalations.length, 2);+ assert.deepEqual(JSON.parse(escalations[1].event_detail).rejections.map((entry) => entry.note), [+ 'first mid-route reject', 'second mid-route reject',+ ]);+});++test('a coordinator route edit starts a new rejection count [B15,B13]', () => {+ const id = routed('Edited route reset', 'light');+ rejectRevision(id, SHA_A, 'old light-route reject');+ store.editItem(board, id, { agentId: 'coordinator', route: 'mid' });++ rejectRevision(id, SHA_B, 'first edited mid-route reject');+ assert.equal(store.getItem(board, id).item_route, 'mid');+ assert.equal(store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate').length, 0);++ rejectRevision(id, SHA_C, 'second edited mid-route reject');+ assert.equal(store.getItem(board, id).item_route, 'strong');+ const escalations = store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate');+ assert.equal(escalations.length, 1);+ assert.deepEqual(JSON.parse(escalations[0].event_detail).rejections.map((entry) => entry.note), [+ 'first edited mid-route reject', 'second edited mid-route reject',+ ]);+});++test('an item at strong stays at strong after more failures [B15,B13]', () => {+ const id = routed('Strong ceiling', 'strong');+ rejectRevision(id, SHA_A, 'strong reject one');+ rejectRevision(id, SHA_B, 'strong reject two');+ assert.equal(store.getItem(board, id).item_route, 'strong');+ rejectRevision(id, SHA_C, 'strong reject three');+ rejectRevision(id, SHA_D, 'strong reject four');+ assert.equal(store.getItem(board, id).item_route, 'strong');+ const escalations = store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate');+ assert.equal(escalations.length, 2, 'each pair records one ceiling escalation');+ assert.ok(escalations.every((event) => {+ const detail = JSON.parse(event.event_detail);+ return detail.from === 'strong' && detail.to === 'strong' && detail.rejections.length === 2;+ }));+});++test('engine 40 reject moves replay without automatic escalation [B15,H16]', () => {+ const id = routed('Legacy engine', 'light');+ const legacyFreeze = (item) => ({+ text: JSON.stringify({+ criterion: item.item_criterion,+ policy: { version: 1, commit: SHA_A, verify: { policy: 'any', family: 'off' } },+ }),+ digest: `digest:${item.item_title}`,+ });++ const submissionProof = {++ version: 1, files: [], full: false, deferred: true,++ reason: 'synthetic board-state fixture; no gate execution',++ };+ let sequence = 0;+ const applyLegacyMove = (operation, args) => {+ sequence += 1;+ const move = prepareEngineMove(board, operation, args, { id: `engine-40-auto-escalation-${sequence}` });- move.engine = AUTO_ESCALATE_ENGINE - 1;++ move.engine = 40;+ const result = applyEngineMove(board, move, { sequence, at: `2026-10-18T00:00:0${sequence}.000Z` });+ assert.equal(result.error, undefined, `${operation} replays on engine 40`);+ };+ applyLegacyMove('claim', [id, { agentId: 'web-1', lane: 'web', leaseMs: HOUR, freeze: legacyFreeze }]);- applyLegacyMove('submit', [id, { agentId: 'web-1', commit: SHA_A, tree: 'tree-a' }]);++ applyLegacyMove('submit', [id, { agentId: 'web-1', commit: SHA_A, tree: 'tree-a', submissionProof }]);++ applyLegacyMove('verify', [id, { agentId: 'web-2', decision: 'REJECT', reason: 'TEST_FAILURE', note: 'legacy reject one', head: SHA_A, digest: `digest:${store.getItem(board, id).item_title}`, policy: 'any' }]);++ applyLegacyMove('claim', [id, { agentId: 'web-1', lane: 'web', leaseMs: HOUR, freeze: legacyFreeze }]);++ applyLegacyMove('submit', [id, { agentId: 'web-1', commit: SHA_B, tree: 'tree-b', submissionProof }]);++ applyLegacyMove('verify', [id, { agentId: 'web-2', decision: 'REJECT', reason: 'TEST_FAILURE', note: 'legacy reject two', head: SHA_B, digest: `digest:${store.getItem(board, id).item_title}`, policy: 'any' }]);++ assert.equal(store.getItem(board, id).item_route, 'light');++ assert.equal(store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate').length, 0);++});++++test('engine 43 reject moves replay without automatic escalation [B15,H16]', () => {++ const id = routed('Legacy engine', 'light');++ const legacyFreeze = (item) => ({++ text: JSON.stringify({++ criterion: item.item_criterion,++ policy: { version: 1, commit: SHA_A, verify: { policy: 'any', family: 'off' } },++ }),++ digest: `digest:${item.item_title}`,++ });++ const submissionProof = {++ version: 1, files: [], full: false, deferred: true,++ reason: 'synthetic board-state fixture; no gate execution',++ };++ let sequence = 0;++ const applyLegacyMove = (operation, args) => {++ sequence += 1;++ const move = prepareEngineMove(board, operation, args, { id: `engine-43-auto-escalation-${sequence}` });++ move.engine = 43;++ const result = applyEngineMove(board, move, { sequence, at: `2026-10-18T00:00:0${sequence}.000Z` });++ assert.equal(result.error, undefined, `${operation} replays on engine 43`);++ };++ applyLegacyMove('claim', [id, { agentId: 'web-1', lane: 'web', leaseMs: HOUR, freeze: legacyFreeze }]);++ applyLegacyMove('submit', [id, { agentId: 'web-1', commit: SHA_A, tree: 'tree-a', submissionProof }]);+ applyLegacyMove('verify', [id, { agentId: 'web-2', decision: 'REJECT', reason: 'TEST_FAILURE', note: 'legacy reject one', head: SHA_A, digest: `digest:${store.getItem(board, id).item_title}`, policy: 'any' }]);+ applyLegacyMove('claim', [id, { agentId: 'web-1', lane: 'web', leaseMs: HOUR, freeze: legacyFreeze }]);- applyLegacyMove('submit', [id, { agentId: 'web-1', commit: SHA_B, tree: 'tree-b' }]);++ applyLegacyMove('submit', [id, { agentId: 'web-1', commit: SHA_B, tree: 'tree-b', submissionProof }]);+ applyLegacyMove('verify', [id, { agentId: 'web-2', decision: 'REJECT', reason: 'TEST_FAILURE', note: 'legacy reject two', head: SHA_B, digest: `digest:${store.getItem(board, id).item_title}`, policy: 'any' }]);+ assert.equal(store.getItem(board, id).item_route, 'light');+ assert.equal(store.events(board, { itemId: id }).filter((event) => event.event_kind === 'escalate').length, 0);+});+test('a fresh claim records where the work started; submit records what it changed, reworks included [N21]', () => {const id = store.addItem(board, { by: 'coordinator', lane: 'web', title: 'Page' });const claimAt = (head) => store.claim(board, id, { agentId: 'web-1', lane: 'web', leaseMs: 2 * HOUR, freeze, head });diff --cc test/pending-refreeze.test.jsindex 3a6437a1,f9a15d76..02cc0663--- a/test/pending-refreeze.test.js+++ b/test/pending-refreeze.test.js@@@ -261,7 -262,7 +262,9 @@@ 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 recorded dependency-edit behavior and automatic escalation');++ assert.equal(ENGINE_VERSION, 44, 'engine 44 is the current writer');+ assert.ok(ENGINE_VERSION >= HEALTH_SENTINEL_ENGINE, 'the current writer retains the sentinel minimum and historical behavior');++ assert.equal(AUTO_ESCALATE_ENGINE, ENGINE_VERSION, 'the current writer retains recorded dependency-edit behavior and automatic escalation');const directory = mkdtempSync(join(tmpdir(), 'pullboard-dependency-engines-'));const cleanup = [];t.after(() => {