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
fix(sentinels): require engine 56 for board watches [A6,H16]
Corey Olsonfdbb94c0a4ab
diff --git a/docs/formats.md b/docs/formats.mdindex e3562965..370b7e14 100644--- a/docs/formats.md+++ b/docs/formats.md@@ -113,7 +113,7 @@ The board file is in the repository's Git common directory at `.git/pullboard/bo| `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` | `55` | `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` | `56` | `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.@@ -148,9 +148,9 @@ Engine 42 adds ordered `recordHealthFindings` observations. A scan retains its bEngine 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.-Engine 53 adds board-owned watch proposals, exact person approve/decline decisions, ordered due-run claims and completed run receipts. Approval binds the entire execution definition; changing it creates a pending proposal. Replay records history without executing commands. Every non-cancelled red run records `sentinel:<name>` for Rigor; feed notices only mark failure and recovery transitions. Older engines refuse these operations and this new cause form before replay.+Engine 55 (`ROW_DRAFT_ENGINE`) adds `draftSpecRow`: an agent in a lane worktree records a drafted spec row on the board, since SPEC.md is the coordinator's file and a lane cannot write it. The move carries `row: {id, text, gate, tier, section, target}` and `written`. Every writer of a new row reserves its id with this move, in one write transaction, before any file names the id: a lane's spec draft, the main checkout's spec draft and doctrine rulings, Rigor and blueprints. The sender plans the id from its files; the board takes that id or the next number after it that no draft holds, so writers that planned the same id at the same moment get distinct ids, and the same row again keeps the id it reserved. `written: true` marks a writer that puts the row in its own file now; only unwritten spec drafts, which come from lanes, are written by spec apply. Until spec apply writes it, the commit-msg hook and `spec check` read a board draft as a draft row, so a lane cites the returned id at once and its worktree stays clean. The coordinator's `spec apply` writes each pending board draft into SPEC.md at its own id, and the person approves it there as before; a draft counts as applied once SPEC.md has its id. A move carrying `draftSpecRow` requires engine 55, and older engines refuse it before changing their board or cursor. Engine 54 is the strong-rejection notice above; engine 53 was reserved for unshipped board watches, now allocated engine 56 because engines 54 and 55 shipped first.-Engine 55 (`ROW_DRAFT_ENGINE`) adds `draftSpecRow`: an agent in a lane worktree records a drafted spec row on the board, since SPEC.md is the coordinator's file and a lane cannot write it. The move carries `row: {id, text, gate, tier, section, target}` and `written`. Every writer of a new row reserves its id with this move, in one write transaction, before any file names the id: a lane's spec draft, the main checkout's spec draft and doctrine rulings, Rigor and blueprints. The sender plans the id from its files; the board takes that id or the next number after it that no draft holds, so writers that planned the same id at the same moment get distinct ids, and the same row again keeps the id it reserved. `written: true` marks a writer that puts the row in its own file now; only unwritten spec drafts, which come from lanes, are written by spec apply. Until spec apply writes it, the commit-msg hook and `spec check` read a board draft as a draft row, so a lane cites the returned id at once and its worktree stays clean. The coordinator's `spec apply` writes each pending board draft into SPEC.md at its own id, and the person approves it there as before; a draft counts as applied once SPEC.md has its id. A move carrying `draftSpecRow` requires engine 55, and older engines refuse it before changing their board or cursor. Engine 54 is the strong-rejection notice above; engine 53 is allocated to another change.+Engine 56 (`BOARD_SENTINEL_ENGINE`) adds board-owned watch proposals, exact person approve/decline decisions, ordered due-run claims and completed run receipts. Approval binds the entire execution definition; changing it creates a pending proposal. Replay records history without executing commands. Every non-cancelled red run records `sentinel:<name>` for Rigor; feed notices only mark failure and recovery transitions. Older engines refuse these operations and this new cause form before replay. Published engine-55 readers reject these moves by their newer engine number before interpreting an operation.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, includingdiff --git a/src/machine.js b/src/machine.jsindex 355dbf14..652dd7e7 100644--- a/src/machine.js+++ b/src/machine.js@@ -31,7 +31,7 @@ export const ENGINE_VERSION = Math.max(WITHDRAW_MILESTONE_ENGINE,STRONG_REJECTION_NOTICE_ENGINE,52,- 53,+ 56,);/**diff --git a/src/sentinels.js b/src/sentinels.jsindex 1ec33d95..f36f2863 100644--- a/src/sentinels.js+++ b/src/sentinels.js@@ -9,7 +9,7 @@ import { ENGINE_VERSION } from './machine.js';import { Refused } from './refused.js';/** Coordinator allocation, 18 Oct: all new board-watch moves begin here [H16]. */-export const BOARD_SENTINEL_ENGINE = 53;+export const BOARD_SENTINEL_ENGINE = 56;const NAME = /^[a-z0-9][a-z0-9._-]{0,63}$/u;const INTERVALS = Object.freeze({ '10m': 600_000, hourly: 3_600_000, daily: 86_400_000 });diff --git a/test/agent-model-engine.test.js b/test/agent-model-engine.test.jsindex cbb3a106..c4476112 100644--- a/test/agent-model-engine.test.js+++ b/test/agent-model-engine.test.js@@ -37,7 +37,7 @@ test('model declarations and event snapshots retain all supported engine semantiassert.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.equal(BOARD_SENTINEL_ENGINE, 53, 'board watches retain their allocated feature engine');+ assert.equal(BOARD_SENTINEL_ENGINE, 56, 'board watches retain their allocated feature engine');assert.ok(ENGINE_VERSION >= BOARD_SENTINEL_ENGINE, 'the current writer retains board-watch semantics');for (const version of Array.from({ length: ENGINE_VERSION }, (_, index) => index + 1)) {const board = store.openBoard(':memory:');diff --git a/test/fixtures/engine-55-reader.js b/test/fixtures/engine-55-reader.jsnew file mode 100644index 00000000..edb38eb5--- /dev/null+++ b/test/fixtures/engine-55-reader.js@@ -0,0 +1,13 @@+/**+ * Frozen version gate from the published 0.9.1 engine, ac03eef74ef85e23820bc6dd9afb6735d4d65f9d.+ * Keep the released guard unchanged: importing today's engine would not test an older reader.+ * This fixture retains its version gate only; it never replays or changes board state.+ */+import { Refused } from '../../src/refused.js';++const ENGINE_VERSION = 55;++/** Stop before interpreting actors or operations that a newer engine may have changed. */+export function requireSupportedEngine(move) {+ if (Number.isSafeInteger(move?.engine) && move.engine > ENGINE_VERSION) throw new Refused('ENGINE_VERSION', `move engine version ${move.engine} is newer than this pullboard engine version ${ENGINE_VERSION}; upgrade pullboard before applying the relay order`);+}diff --git a/test/sentinels.test.js b/test/sentinels.test.jsindex 58e17303..98dfe682 100644--- a/test/sentinels.test.js+++ b/test/sentinels.test.js@@ -33,6 +33,7 @@ import { machineSettingsFile } from '../src/settings.js';import { runFixtureChild } from './fixture-child.js';import { runFixtureGit } from './fixture-child.js';import { parseProcessCensus } from '../src/process-census.js';+import { requireSupportedEngine as requirePublished55Engine } from './fixtures/engine-55-reader.js';/** Isolate actual SQLite, Git, settings and subprocess files; due time is explicitly injected. */function fixture(t) {@@ -196,6 +197,27 @@ test('a project directory symlink cannot change an approved watch into outside eassert.throws(() => sentinelDefinition({ ...row, directory: '../outside' }), error => error.code === 'BAD_SENTINEL');});+test('a published engine-55 reader refuses a board watch before inspecting it [A6,H16]', t => {+ const box = fixture(t);+ assert.equal(BOARD_SENTINEL_ENGINE, 56, 'board watches keep the first engine released with their operations');+ const move = prepareEngineMove(box.board, 'proposeSentinel', [{ agentId: box.agent,+ row: { name: 'new-watch', check: 'false', every: 'hourly', owner: 'core' } }]);+ let payloadReads = 0;+ const unread = new Proxy(move, {+ /** Fail if version negotiation reaches operation-specific data. */+ get(target, property, receiver) {+ if (property === 'operation' || property === 'args') {+ payloadReads += 1;+ throw new Error('the released reader inspected a newer move payload');+ }+ return Reflect.get(target, property, receiver);+ },+ });+ assert.throws(() => requirePublished55Engine(unread), error => error.code === 'ENGINE_VERSION'+ && error.message.includes(String(move.engine)) && error.message.includes('55'));+ assert.equal(payloadReads, 0, 'the published version guard rejects before interpreting the new operation or arguments');+});+test('watch receipts replay deterministically, export without execution and keep older engines unchanged [A6,H16]', async t => {const box = fixture(t); const replica = store.openBoard(':memory:', box.clock); t.after(() => store.closeBoard(replica));importBoard(replica, exportBoard(box.board));