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(relay): seat provenance takes engine 27, as assigned [H2,V1]
Corey Olson67b8de8c444a
diff --git a/docs/api.md b/docs/api.mdindex b48adce8..311a9d9a 100644--- a/docs/api.md+++ b/docs/api.md@@ -201,11 +201,11 @@ Phone enrollment uses a one-use `#device=<locator>.<secret>` fragment, removed b`POST /auth/machines {board,machine}` requires a foreground person session and returns a `pm_` credential bound to that board and machine. This delegate can list only its board’s token ids and metadata, and through `POST /auth/tokens {board,agent}` it first-mints a `pa_` token only for a seat the relay never issued a token to, including after that token expired or was revoked (`TOKEN_EXISTS` otherwise). Such a seat (a manual `pullboard join`, or any name minted ahead) is machine-origin for good: it builds, never verifies on a linked board, and its name cannot later be registered (`SEAT_TAKEN`). The native client also checks that the seat is registered, which the relay cannot see. It cannot link a board, issue a machine credential, post a phone request, revoke another credential directly, or use person-only cookie endpoints.-A `pa_` token renews only its own seat: `POST /auth/tokens {board,agent}` naming itself returns a new token and revokes the one that asked (`TOKEN_AGENT` for any other seat). A seat's first token from another seat comes only with the move that registers it: `POST /api/v1/boards/:board/moves {sequence, sealed, registration}`, sent with the creating seat's token, where `registration` is `{target, creator, sequence, digest}` (the creator is the sender, the sequence is this upload's, and the digest is the SHA-256 of the `sealed` text). The relay appends the move and issues the target's first token in one board lock and returns it only in that reply as `enrollment`; the public event carries the receipt and never the token. An exact retry returns the same issuance id and expiry without a token. The receipt commits in the same journal transaction as the move and is kept through compaction, and it claims the target from that moment: the machine credential and a person are refused a first mint for any name a receipt claims, under the same board lock that appends receipts, so no failure between the append and the enrollment leaves a window. If enrollment fails after the append, the creator's exact retry, or its `recover:true` reissue, rolls the first mint forward from the journalled receipt. A lost token is reissued by its creator, `POST /auth/tokens {board,agent,recover:true}` with the creator's token, which revokes the old ones. `/auth/tokens` refuses a `registration` field (`REGISTRATION_IN_MOVE`), so a copied receipt never mints. Replicas apply an engine-20 registration by another seat only with the receipt that names its target, creator, position and digest, so the board's record of who created a seat matches the relay's.+A `pa_` token renews only its own seat: `POST /auth/tokens {board,agent}` naming itself returns a new token and revokes the one that asked (`TOKEN_AGENT` for any other seat). A seat's first token from another seat comes only with the move that registers it: `POST /api/v1/boards/:board/moves {sequence, sealed, registration}`, sent with the creating seat's token, where `registration` is `{target, creator, sequence, digest}` (the creator is the sender, the sequence is this upload's, and the digest is the SHA-256 of the `sealed` text). The relay appends the move and issues the target's first token in one board lock and returns it only in that reply as `enrollment`; the public event carries the receipt and never the token. An exact retry returns the same issuance id and expiry without a token. The receipt commits in the same journal transaction as the move and is kept through compaction, and it claims the target from that moment: the machine credential and a person are refused a first mint for any name a receipt claims, under the same board lock that appends receipts, so no failure between the append and the enrollment leaves a window. If enrollment fails after the append, the creator's exact retry, or its `recover:true` reissue, rolls the first mint forward from the journalled receipt. A lost token is reissued by its creator, `POST /auth/tokens {board,agent,recover:true}` with the creator's token, which revokes the old ones. `/auth/tokens` refuses a `registration` field (`REGISTRATION_IN_MOVE`), so a copied receipt never mints. Replicas apply an engine-27 registration by another seat only with the receipt that names its target, creator, position and digest, so the board's record of who created a seat matches the relay's.`POST /auth/coordinators {board}` takes a person session only and issues the coordinator's token: the first one (`bootstrap`), a fresh one after loss, expiry or revocation (`reissue`), or the person's reset of a coordinator first minted by the machine (`reset`). It revokes every older coordinator token. `pullboard relay on` calls it inside its own sign-in, so a board needs no extra tap. `GET /auth/tokens` also returns `coordinatorEvents`, each with its reason, the person session id, the revoked token ids, the issued id and the time; `pullboard relay tokens` prints them.-On a linked board, an engine-20 verdict, review reservation or review offer needs verifier standing: the verifier was enrolled through the relay by its creator, each creator up the line was too, the line ends at the coordinator, and neither the builder nor a machine join is on it. The coordinator stands on the token the person set up. A seat without standing is refused with `VERIFIER_STANDING` in one line that names the fix, `pullboard worktree <lane> --model "<model name>"` run by the coordinator from the main checkout. Seats from before engine 20, or from before the board was linked, keep building; reviews need a fresh seat made that way. Each person-made coordinator token carries a machine lineage (a reissue that replaces a token keeps it; another machine's token starts its own), and a seat enrolled from it, or from a seat in its line, records that lineage. A coordinator claim records the lineage of the machine that builds it. When the coordinator built an item, a seat from another machine's registration lineage, or the person, verifies it; a seat from the building machine's own lineage is refused and told so. On an unlinked board who may verify is unchanged. The relay stamps each record it stores with `policy` (and `root` for the person-made coordinator token); a stamped record below engine 20 is refused, older unstamped records replay as they did, and a board with machine or agent credentials requires engine 20.+On a linked board, an engine-27 verdict, review reservation or review offer needs verifier standing: the verifier was enrolled through the relay by its creator, each creator up the line was too, the line ends at the coordinator, and neither the builder nor a machine join is on it. The coordinator stands on the token the person set up. A seat without standing is refused with `VERIFIER_STANDING` in one line that names the fix, `pullboard worktree <lane> --model "<model name>"` run by the coordinator from the main checkout. Seats from before engine 27, or from before the board was linked, keep building; reviews need a fresh seat made that way. Each person-made coordinator token carries a machine lineage (a reissue that replaces a token keeps it; another machine's token starts its own), and a seat enrolled from it, or from a seat in its line, records that lineage. A coordinator claim records the lineage of the machine that builds it. When the coordinator built an item, a seat from another machine's registration lineage, or the person, verifies it; a seat from the building machine's own lineage is refused and told so. On an unlinked board who may verify is unchanged. The relay stamps each record it stores with `policy` (and `root` for the person-made coordinator token); a stamped record below engine 27 is refused, older unstamped records replay as they did, and a board with machine or agent credentials requires engine 27.Residual: tokens on disk, in the repository's shared `relay.json`, are readable by every process of the same operating-system user, so a process that reads another seat's current `pa_` can act as that seat and renew it; signed moves (#408) close that. An agent holding the machine credential can still make a seat of its own, by a manual join or by minting a never-issued name, which also makes a creator skip that name. That seat cannot verify that agent's work, nor any work on a linked board, and cannot act as any existing seat. A sealed snapshot uploaded with the machine credential remains a trusted checkpoint for replicas that restore from it.diff --git a/docs/formats.md b/docs/formats.mdindex 0469c8d8..0da70f2a 100644--- a/docs/formats.md+++ b/docs/formats.md@@ -102,7 +102,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` | `20` | `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` | `27` | `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.@@ -115,11 +115,11 @@ Engine 12 records declined person row decisions without replacing the exact sourEngine 19 makes a corrected bar record why the old one was wrong. Once an item has ever been claimed, an `editItem` that changes its criterion or check must carry `reason`, the text of what the old bar got wrong; without one it is refused with `BAR_REASON`, naming `--reason`. The edit event then records `reason` and `barCorrection: {fields, reject}`: `fields` lists `criterion` and/or `check`, and `reject` is `{verdict, by, reason, at}` when the item's newest verdict is a reject no earlier correction already explained, or `null`. That reject is counted as caused by the bar. The board derives `barCorrection` from its own rows; a move supplies only `reason`. An edit before any claim needs no reason and records one only if given. `pullboard stats` JSON adds `bars`, keyed by agent: `{corrections, barRejects, buildRejects}`. Corrections and the rejects they explain count to the agent who corrected the bar; any other reject counts as the build's, to the agent who added the item. An `editItem` move carrying `reason` requires engine 19, and older engines refuse it with `RELAY_MOVE` before changing their board or cursor. Moves recorded under engines 18 and earlier replay without the reason rule. Engine numbers 13 to 18 are allocated to other changes; whichever lands later renumbers, keeping every earlier engine's replay unchanged.-Engine 20 records on each new seat the seat that created it (`createdBy`: an agent id, or `machine` for a join no seat made), lets a creator name the new seat (`id`), and applies verifier standing to relay-replayed verdicts, review reservations and offers on a linked board: the verifier's line of creating seats must reach the coordinator through seats enrolled by the relay, without the builder or a machine join. Replicas apply a register move by another seat only with the relay's receipt for its target, creator, position and digest. The relay stamps every record it stores with `policy: 20`; a stamped move below engine 20 is refused. Engine-12 and older moves, and unstamped records, replay as they did. On an unlinked board who may verify is unchanged.+Engine 27 records on each new seat the seat that created it (`createdBy`: an agent id, or `machine` for a join no seat made), lets a creator name the new seat (`id`), and applies verifier standing to relay-replayed verdicts, review reservations and offers on a linked board: the verifier's line of creating seats must reach the coordinator through seats enrolled by the relay, without the builder or a machine join. Replicas apply a register move by another seat only with the relay's receipt for its target, creator, position and digest. The relay stamps every record it stores with `policy: 27`; a stamped move below engine 27 is refused. Engine-12 and older moves, and unstamped records, replay as they did. On an unlinked board who may verify is unchanged.The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.-A linked board requires at least engine 20 after issuing any agent token or machine credential, including-revoked or expired ones; before engine 20 these minimums were 3 and 6. The minimum survives reopening the auth database;+A linked board requires at least engine 27 after issuing any agent token or machine credential, including+revoked or expired ones; before engine 27 these minimums were 3 and 6. The minimum survives reopening the auth database;unlink removes the board and ends its lifetime. A missing declaration is legacyengine 1. Board-content requests below their minimum, and malformed declarations,receive `ENGINE_VERSION` with upgrade guidance before records are returned ordiff --git a/docs/lifecycle.md b/docs/lifecycle.mdindex 2bfdfca9..c11e6781 100644--- a/docs/lifecycle.md+++ b/docs/lifecycle.md@@ -134,8 +134,8 @@ Each move checks its guards in this order and refuses with the first one that do| NO_POLICY | the caller's checkout contains the submitted commit | restore the frozen policy objects || BAD_CONFIG | the caller's checkout contains the submitted commit | repair the committed coordinator configuration || GIT_GRAFTS | the caller's checkout contains the submitted commit | ask the coordinator to remove the Git graft file before retrying |-| SELF_VERIFY | the caller did not build it; on a linked board, at engine 20 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | another agent verifies it: pullboard next --verify |-| VERIFIER_STANDING | the caller did not build it; on a linked board, at engine 20 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>" |+| SELF_VERIFY | the caller did not build it; on a linked board, at engine 27 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | another agent verifies it: pullboard next --verify |+| VERIFIER_STANDING | the caller did not build it; on a linked board, at engine 27 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join | the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>" || COORDINATOR_VERIFIES | the repo's verify policy lets the caller verify this lane's work | the coordinator verifies it || O2_FAMILY_MATCH | the builder and verifier have different declared families; an undeclared family counts as a match, only when verify.family is require | ask the coordinator for a verifier from another declared family || REVIEW_HELD | no other agent holds its review under a live lease | pullboard next --verify, which passes over reviews another agent holds |diff --git a/relay/auth.js b/relay/auth.jsindex b14b2e26..97fccd97 100644--- a/relay/auth.js+++ b/relay/auth.js@@ -544,7 +544,7 @@ export function createRelayAuth({ database, github, now = Date.now, sessionTTL =minimumEngineVersion(board) {open();identifier(board, 'BAD_BOARD');- // Machine and agent credentials now carry engine-20 seat provenance; older clients would skip it.+ // Machine and agent credentials now carry engine-27 seat provenance; older clients would skip it.if (db.prepare("SELECT 1 FROM relay_credentials WHERE board=? AND kind IN ('machine','board') LIMIT 1").get(board)) return VERIFIER_STANDING_ENGINE;return db.prepare("SELECT 1 FROM relay_credentials WHERE board=? AND kind='board' LIMIT 1").get(board) ? 3 : 1;},diff --git a/relay/journal.js b/relay/journal.jsindex cd85ab0c..415d3aba 100644--- a/relay/journal.js+++ b/relay/journal.js@@ -71,7 +71,7 @@ export function createRelayJournal({ directory, boardId, maxBytes = DEFAULT_BYTEDROP TABLE journal_snapshot_v2;UPDATE journal_meta SET value='3' WHERE key='format';`);}- // Engine-20 attribution (#579): the relay's policy stamp, the person-set coordinator flag and a+ // Engine-27 attribution (#579): the relay's policy stamp, the person-set coordinator flag and a// seat receipt. Older records keep these empty, so they replay exactly as they did.for (const [column, type] of [['sender_policy', 'INTEGER'], ['sender_root', 'INTEGER'], ['sender_lineage', 'TEXT'], ['registration', 'TEXT']]) {if (!db.prepare('PRAGMA table_info(journal_record)').all().some((saved) => saved.name === column)) db.exec(`ALTER TABLE journal_record ADD COLUMN ${column} ${type}`);diff --git a/src/board.js b/src/board.jsindex 359ef9b1..2f34f755 100644--- a/src/board.js+++ b/src/board.js@@ -507,7 +507,7 @@ function current(board, item) {* by the agent; the board neither names nor infers it. Registering again preserves the agent id;* explicitly supplied family and model values update their declarations, while omission preserves them.*- * From engine 20 a new seat records the seat that created it (`createdBy`: an agent id, or+ * From engine 27 a new seat records the seat that created it (`createdBy`: an agent id, or* `machine` for a join no seat made), so a linked board can tell a builder's own seats from* independent verifiers (#579). A creator may name the new seat (`id`, the lane's next form) when* the relay already issued a token for the next name; ids then skip taken names.diff --git a/src/cli.js b/src/cli.jsindex ea93e997..91c336c7 100644--- a/src/cli.js+++ b/src/cli.js@@ -576,7 +576,7 @@ function withBoard(ctx, work) {/** Dispatch a board mutation locally, or seal it before any linked replica applies it. */async function ordered(ctx, board, operation, args) {- // Every engine-20 registration records the seat that made it: the coordinator from the main+ // Every engine-27 registration records the seat that made it: the coordinator from the main// checkout, the joined agent from its worktree, or `machine` for a join no seat made (#579).if (operation === 'register' && args[0] && args[0].createdBy === undefined) {const joined = store.agentAt(board, ctx.info.root)?.agent_id;@@ -2650,7 +2650,7 @@ async function nextOnce(ctx, values) {const { item, reasons, shared } = store.nextFor(board, { agentId: me.id, lane: me.lane, runnable: values.runnable, routes: values.routes, warm,priority: mainRedReworkItems(ctx.info.root, board) });const held = item?.item_status === 'claimed';- /** Offer only reviews this seat may give; a linked board previews its engine-20 verifier standing (#579). */+ /** Offer only reviews this seat may give; a linked board previews its engine-27 verifier standing (#579). */const findOffer = () => store.reviewOffer(board, { agentId: me.id, lane: me.lane, policy: ctx.config.verify.policy,familyPolicy: ctx.config.verify.family, ratio: ctx.config.verify.reviewRatio, runnable: values.runnable, routes: values.routes });const offer = held ? null : relayLinked(ctx.info.root) ? store.withVerifierStanding(board, { root: true }, findOffer) : findOffer();diff --git a/src/engine.js b/src/engine.jsindex f497174a..e5a8a971 100644--- a/src/engine.js+++ b/src/engine.js@@ -183,7 +183,7 @@ export function refuseRelayMove(board, move, { sequence, at, sender, kind, code,}/**- * Bind an engine-20 registration to the relay's receipt (#579). A seat made by another seat names+ * Bind an engine-27 registration to the relay's receipt (#579). A seat made by another seat names* itself in the move (`id`) and arrives with the receipt the relay issued its first token under:* same target, the authenticated creator, this position and these exact sealed bytes. A join no* seat made is machine-sent and carries no receipt; a receipt on any other move is refused.@@ -220,7 +220,7 @@ export function applyRelayMove(board, move, { sequence, at, sender, kind, digestconst phoneReceipt = sender?.kind === 'machine' && move?.engine >= 6 && Boolean(move.personRequest) && !requestMoveProblem(board, move, { checkExecutorLease: false });const problem = relaySenderProblem(move, sender, kind, { phoneReceipt }) ?? (kind === 'move' ? registrationProblem(board, move, { sender, registration, sequence, digest }) : null);if (!problem) {- // Engine-20 relay moves run under linked verifier standing; older recorded moves replay as they did.+ // Engine-27 relay moves run under linked verifier standing; older recorded moves replay as they did.// The person is above every seat; their own moves act with the coordinator's standing.const standing = move?.engine >= VERIFIER_STANDING_ENGINE ? { root: sender?.root === true || sender?.kind === 'person',person: sender?.kind === 'person', lineage: sender?.root === true && typeof sender.lineage === 'string' ? sender.lineage : null } : null;diff --git a/src/machine.js b/src/machine.jsindex f31104e5..bd684671 100644--- a/src/machine.js+++ b/src/machine.js@@ -10,13 +10,13 @@*//** Executable move semantics, carried by every sealed move and retained during replay [H16]. */-export const ENGINE_VERSION = 20;+export const ENGINE_VERSION = 27;/*** The engine whose relay moves carry seat provenance and verifier standing (#579). It is its own* constant because engine slots are allotted per item: whoever lands second renumbers this line.*/-export const VERIFIER_STANDING_ENGINE = 20;+export const VERIFIER_STANDING_ENGINE = 27;/** @typedef {'agent' | 'coordinator' | 'clock'} Role */@@ -135,7 +135,7 @@ export const GUARDS = [{ id: 'childrenDone', refuse: 'CHILDREN_OPEN', rule: 'every child item is verified or withdrawn', next: 'finish the child items, or the coordinator withdraws them', source: 'board' },{ id: 'headIsNew', refuse: 'HEAD_NOT_NEW', rule: 'a verifier has not rejected this commit at this bar; after a no-verdict reopen, the bar was refrozen', next: 'commit the rework, or refreeze the bar after a no-verdict reopen before resubmitting the same commit', source: 'board' },{ id: 'atSubmittedCommit', refuse: 'NOT_AT_COMMIT', alsoRefuses: [{ code: 'OUTSIDE_LANE', next: 'restore foreign paths before accepting' }, { code: 'NO_POLICY', next: 'restore the frozen policy objects' }, { code: 'BAD_CONFIG', next: 'repair the committed coordinator configuration' }, { code: 'GIT_GRAFTS', next: 'ask the coordinator to remove the Git graft file before retrying' }], rule: "the caller's checkout contains the submitted commit", next: 'git switch --detach <commit>', source: 'cli' },- { id: 'notBuilder', refuse: 'SELF_VERIFY', alsoRefuses: [{ code: 'VERIFIER_STANDING', next: 'the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>"' }], rule: 'the caller did not build it; on a linked board, at engine 20 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join', next: 'another agent verifies it: pullboard next --verify', source: 'board' },+ { id: 'notBuilder', refuse: 'SELF_VERIFY', alsoRefuses: [{ code: 'VERIFIER_STANDING', next: 'the coordinator makes an independent verifier from the main checkout: pullboard worktree <lane> --model "<model name>"' }], rule: 'the caller did not build it; on a linked board, at engine 27 or newer, the caller was enrolled through the relay by a line of creating seats from the coordinator that includes neither the builder nor a machine join', next: 'another agent verifies it: pullboard next --verify', source: 'board' },{ id: 'policyAllows', refuse: 'COORDINATOR_VERIFIES', rule: "the repo's verify policy lets the caller verify this lane's work", next: 'the coordinator verifies it', source: 'board' },{ id: 'familyAllows', refuse: 'O2_FAMILY_MATCH', rule: 'the builder and verifier have different declared families; an undeclared family counts as a match', next: 'ask the coordinator for a verifier from another declared family', source: 'board', when: 'only when verify.family is require' },{ id: 'reviewFree', refuse: 'REVIEW_HELD', rule: 'no other agent holds its review under a live lease', next: 'pullboard next --verify, which passes over reviews another agent holds', source: 'board' },diff --git a/src/seats.js b/src/seats.jsindex 65ea3ac7..2c112ae5 100644--- a/src/seats.js+++ b/src/seats.js@@ -1,6 +1,6 @@/*** Seats (B3, H2, V1): who each registered agent is on the board, read from the agent table and the- * metadata kept beside it: its model, its route, and from engine 20 the seat that created it, whether+ * metadata kept beside it: its model, its route, and from engine 27 the seat that created it, whether* the relay enrolled it, and its machine lineage. Verifier standing on a linked board (#579) is* decided here from that line of creators. board.js registers seats and re-exports the readers.*/@@ -62,7 +62,7 @@ export function routeOf(board, agentId) {}/**- * The id an engine-20 registration gives a new seat: the named one when it is the lane's form and+ * The id an engine-27 registration gives a new seat: the named one when it is the lane's form and* free, otherwise the lane's first free number from its count. Skipping taken numbers keeps a named* seat from colliding with the next unnamed one.*@@ -96,8 +96,8 @@ function firstFreeSeatId(board, lane, total) {}/**- * The seat that created this one, as its engine-20 registration recorded it: an agent id,- * `machine` for a join no seat made, or null for a seat registered before engine 20.+ * The seat that created this one, as its engine-27 registration recorded it: an agent id,+ * `machine` for a join no seat made, or null for a seat registered before engine 27.** @param {any} board* @param {string} id@@ -145,7 +145,7 @@ export function nextSeatId(board, lane) {/*** Run board work under linked-board verifier standing (#579): a relay replica replaying an- * engine-20 move, or a linked CLI previewing one. `root` says whether the acting coordinator's+ * engine-27 move, or a linked CLI previewing one. `root` says whether the acting coordinator's* relay credential was set up by the person. Unlinked boards never enter this, so who may verify* there is unchanged.*@@ -169,7 +169,7 @@ export function withVerifierStanding(board, standing, work) {/*** Why this seat may not verify the builder's item on a linked board, or null when it may. The* seat's creators are walked up to the coordinator: the builder, a join no seat made (`machine`),- * or a seat registered before engine 20 anywhere on the way means no standing. The coordinator+ * or a seat registered before engine 27 anywhere on the way means no standing. The coordinator* stands only on a credential the person set up.** @param {any} boarddiff --git a/test/agent-model-engine.test.js b/test/agent-model-engine.test.jsindex 2c84af92..8be02605 100644--- a/test/agent-model-engine.test.js+++ b/test/agent-model-engine.test.js@@ -11,7 +11,7 @@ import { tmpdir } from 'node:os';import { join } from 'node:path';test('model declarations and event snapshots retain engines 1 through 12 and 19 semantics [O8,O3,H16]', (t) => {- assert.equal(ENGINE_VERSION, 20, 'engine 20 preserves the released engine-8 through engine-19 model behavior');+ assert.equal(ENGINE_VERSION, 27, 'engine 27 preserves the released engine-8 through engine-19 model behavior');for (const version of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 19, ENGINE_VERSION]) {const board = store.openBoard(':memory:');t.after(() => store.closeBoard(board));diff --git a/test/pending-refreeze.test.js b/test/pending-refreeze.test.jsindex 603c8539..025078fc 100644--- a/test/pending-refreeze.test.js+++ b/test/pending-refreeze.test.js@@ -243,12 +243,12 @@ async function checkDependencyLegacyClients(cleanup, directory, snapshot, targetconst oldFeature = legacyEngine.applyRelayMove(old, engine10Move, engine10Receipt);const currentFeature = applyRelayMove(current, engine10Move, engine10Receipt);assert.equal(oldFeature.error, undefined, JSON.stringify(oldFeature));- assert.deepEqual(currentFeature, oldFeature, 'engine 20 reproduces engine 10 dependency additions and clears');+ assert.deepEqual(currentFeature, oldFeature, 'engine 27 reproduces engine 10 dependency additions and clears');assert.deepEqual(store.getItem(current, target), legacyStore.getItem(old, target));- assert.deepEqual(store.events(current), legacyStore.events(old), 'engine 10 and engine 20 replay identical events');+ assert.deepEqual(store.events(current), legacyStore.events(old), 'engine 10 and engine 27 replay identical events');assert.equal(appliedSequence(current), legacyEngine.appliedSequence(old));assert.deepEqual(engineReceipt(current, engine10Move.id), legacyEngine.engineReceipt(old, engine10Move.id),- 'engine 10 and engine 20 retain the same dependency-move receipts');+ 'engine 10 and engine 27 retain the same dependency-move receipts');const oldSnapshot = legacyExchange.exportBoard(old);const currentSnapshot = exportBoard(current);assert.equal(oldSnapshot.tables.board_meta.find((row) => row.meta_key === 'relay_engine_version').meta_value, '10');@@ -261,7 +261,7 @@ async function checkDependencyLegacyClients(cleanup, directory, snapshot, target}test('dependency edits replay the same on every engine [B3,V2,H16]', async (t) => {- assert.equal(ENGINE_VERSION, 20);+ assert.equal(ENGINE_VERSION, 27);const directory = mkdtempSync(join(tmpdir(), 'pullboard-dependency-engines-'));const cleanup = [];t.after(() => {diff --git a/test/relay-deploy.test.js b/test/relay-deploy.test.jsindex 5ad81332..8df24fd4 100644--- a/test/relay-deploy.test.js+++ b/test/relay-deploy.test.js@@ -291,7 +291,7 @@ test('[H5,H18] the Railway checklist matches the container and relay runtime settest('[H5,H18] the Railway smoke links, reads one unsealed move and unlinks locally', async (t) => {const box = await relayClientFixture(t);await box.link();- assert.equal(await box.requireEngineThree(), 20, 'a machine-linked board requires the engine-20 seat-provenance replay engine');+ assert.equal(await box.requireEngineThree(), 27, 'a machine-linked board requires the engine-27 seat-provenance replay engine');const previous = JSON.parse(readFileSync(box.linkFile, 'utf8'));const legacy = await fetch(`${previous.url}/api/v1/boards/${previous.board}/state`, {headers: { authorization: `Bearer ${previous.token}`, 'x-pullboard-engine': '2' },diff --git a/test/relay-machine-auth.test.js b/test/relay-machine-auth.test.jsindex 6f495238..2d336c60 100644--- a/test/relay-machine-auth.test.js+++ b/test/relay-machine-auth.test.js@@ -57,7 +57,7 @@ test('machine credentials mint and list same-board agents but cannot link, revokassert.equal(tokens.some(value => Object.hasOwn(value, 'token') || Object.hasOwn(value, 'hash')), false);await assert.rejects(auth.listTokens(machine.token, beta), { code: 'TOKEN_BOARD' });await assert.rejects(auth.issueToken(machine.token, { board: beta, agent: 'cross-board' }), { code: 'TOKEN_BOARD' });- assert.equal(auth.minimumEngineVersion(alpha), 20, 'machine and agent credentials require engine 20 (#579)');+ assert.equal(auth.minimumEngineVersion(alpha), 27, 'machine and agent credentials require engine 27 (#579)');await assert.rejects(auth.listTokens(agent.token, alpha), { code: 'HUMAN_REQUIRED' });await assert.rejects(auth.revoke(machine.token, agent.id), { code: 'TOKEN_NOT_OWNED' });diff --git a/test/relay-mint.test.js b/test/relay-mint.test.jsindex b24718a7..f39dcd83 100644--- a/test/relay-mint.test.js+++ b/test/relay-mint.test.js@@ -247,7 +247,7 @@ test('an agent in its worktree cannot mint a relay token [H2,V1,E3,E5,P6]', asyn/** The accept arguments a seat sends for this item. */const verdict = (agentId) => [item.item_id, { agentId, decision: 'ACCEPT', reason: 'CRITERION_MET', note: 'checked the proof', head: 'd'.repeat(40), digest: item.item_frozen_digest }];let id = 0;- /** Replay one stamped engine-20 relay move from an agent on the linked board copy. */+ /** Replay one stamped engine-27 relay move from an agent on the linked board copy. */const move = (operation, args, sender, extra = {}) => applyRelayMove(board, { version: 1, engine: ENGINE_VERSION, id: `standing-${++id}`, operation, args }, {sequence: appliedSequence(board) + 1, at: new Date().toISOString(), kind: 'move', sender: { kind: 'agent', userId: '1', policy: VERIFIER_STANDING_ENGINE, ...sender }, ...extra,});diff --git a/test/relay-retention.test.js b/test/relay-retention.test.jsindex c0d2dbb8..73f261e0 100644--- a/test/relay-retention.test.js+++ b/test/relay-retention.test.js@@ -60,7 +60,7 @@ async function fixture(t) {/** Return status/body without ever placing credentials in diagnostic text or URLs. */async function call(id, { path = '/state', method = 'GET', token = signed.token, body } = {}) {const response = await fetch('http://127.0.0.1:' + relay.port + '/api/v1/boards' + (id ? '/' + id + path : ''), {- method, headers: { 'x-pullboard-engine': '20', authorization: 'Bearer ' + token, ...(body ? { 'content-type': 'application/json' } : {}) },+ method, headers: { 'x-pullboard-engine': '27', authorization: 'Bearer ' + token, ...(body ? { 'content-type': 'application/json' } : {}) },...(body ? { body: JSON.stringify(body) } : {}),});return { status: response.status, body: await response.json() };@@ -88,7 +88,7 @@ test('[H18] warnings begin at sixty days on authorized contact; compaction and rwarningTimeout.unref();t.after(() => { clearTimeout(warningTimeout); controller.abort(); });const stream = await fetch('http://127.0.0.1:' + box.relay.port + '/api/v1/boards/' + A + '/events?after=0', {- headers: { 'x-pullboard-engine': '20', authorization: 'Bearer ' + box.signed.token, accept: 'text/event-stream' }, signal: controller.signal,+ headers: { 'x-pullboard-engine': '27', authorization: 'Bearer ' + box.signed.token, accept: 'text/event-stream' }, signal: controller.signal,});const reader = stream.body.getReader();let delivered = '';diff --git a/test/relay-sealed.test.js b/test/relay-sealed.test.jsindex cfbbf8b2..394bb952 100644--- a/test/relay-sealed.test.js+++ b/test/relay-sealed.test.js@@ -1198,7 +1198,7 @@ test('checkpoint restore checks native digest after BEGIN IMMEDIATE against a setest('relay stores engine-4 sealed background completions opaquely [V2,H16]', async t => {const box = await fixture(t, { machineCredentials: false });- // A board with agent tokens requires an engine-20 client (#579); the sealed move keeps engine 4.+ // A board with agent tokens requires an engine-27 client (#579); the sealed move keeps engine 4.const headers = { 'x-pullboard-engine': String(ENGINE_VERSION) };assert.ok(ENGINE_VERSION >= 4, 'engine-4 background completions remain supported');const snapshot = await box.call(box.path + '/state', {diff --git a/test/relay-version.test.js b/test/relay-version.test.jsindex 2a2b663b..b2acdb1c 100644--- a/test/relay-version.test.js+++ b/test/relay-version.test.js@@ -28,10 +28,10 @@ test('relay enforces the minimum engine ever required by each board [H16,H3]', aawait auth.revoke(person.token, historical.id);time += 10;assert.equal(auth.minimumEngineVersion(A), 1);- assert.equal(auth.minimumEngineVersion(B), 20, 'agent tokens now require engine 20 (#579)');+ assert.equal(auth.minimumEngineVersion(B), 27, 'agent tokens now require engine 27 (#579)');auth.close();auth = createRelayAuth(authConfig);- assert.equal(auth.minimumEngineVersion(B), 20, 'the minimum survives revocation, expiry and reopening the real auth database');+ assert.equal(auth.minimumEngineVersion(B), 27, 'the minimum survives revocation, expiry and reopening the real auth database');const relay = await serveRelay({ directory: join(directory, 'data'), auth, maintenanceMs: 0, pollMs: 10 });t.after(async () => { await relay.close(); auth.close(); rmSync(directory, { recursive: true, force: true }); });const base = `http://127.0.0.1:${relay.port}/api/v1/boards/`;@@ -48,19 +48,19 @@ test('relay enforces the minimum engine ever required by each board [H16,H3]', a}// Seed opaque snapshots so eligible reads reach actual state and event handlers.for (const board of [A, B]) {- const seeded = await call(board, '/state', { engine: 20, method: 'PUT', body: JSON.stringify({ sequence: 0, sealed: opaque }) });+ const seeded = await call(board, '/state', { engine: 27, method: 'PUT', body: JSON.stringify({ sequence: 0, sealed: opaque }) });assert.equal(seeded.status, 200, seeded.text);}for (const board of [A, B]) {- const currentState = await call(board, '/state', { engine: 20 });+ const currentState = await call(board, '/state', { engine: 27 });assert.equal(currentState.status, 200, currentState.text);- assert.equal((await call(board, '/events?after=0', { engine: 20 })).status, 200);+ assert.equal((await call(board, '/events?after=0', { engine: 27 })).status, 200);}for (const board of [A, B]) {const controller = new AbortController();const streamed = await fetch(base + board + '/events?after=0', {- headers: { authorization: `Bearer ${person.token}`, 'x-pullboard-engine': '20', accept: 'text/event-stream' }, signal: controller.signal,+ headers: { authorization: `Bearer ${person.token}`, 'x-pullboard-engine': '27', accept: 'text/event-stream' }, signal: controller.signal,});assert.equal(streamed.status, 200);await streamed.body.cancel(); controller.abort();diff --git a/test/relay.test.js b/test/relay.test.jsindex bd81c380..21fb25bb 100644--- a/test/relay.test.js+++ b/test/relay.test.js@@ -823,7 +823,7 @@ test('revoking a board credential while its upload body is open stores nothing [const origin = `http://127.0.0.1:${service.port}`;const snapshot = await fetch(`${origin}/api/v1/boards/${board}/state`, {method: 'PUT',- headers: { 'x-pullboard-engine': '20', authorization: `Bearer ${person.token}`, 'content-type': 'application/json' },+ headers: { 'x-pullboard-engine': '27', authorization: `Bearer ${person.token}`, 'content-type': 'application/json' },body: JSON.stringify({ sequence: 0, sealed: 'AQ' }),});assert.equal(snapshot.status, 200);@@ -843,7 +843,7 @@ test('revoking a board credential while its upload body is open stores nothing [let stream;const upload = fetch(`${origin}/api/v1/boards/${board}/moves`, {method: 'POST',- headers: { 'x-pullboard-engine': '20', authorization: `Bearer ${agent.token}`, 'content-type': 'application/json' },+ headers: { 'x-pullboard-engine': '27', authorization: `Bearer ${agent.token}`, 'content-type': 'application/json' },body: new ReadableStream({ start(controller) { stream = controller; controller.enqueue(Buffer.from('{"sequence":1,"sealed":"')); } }),duplex: 'half',});@@ -859,7 +859,7 @@ test('revoking a board credential while its upload body is open stores nothing [assert.equal(response.status, 401, JSON.stringify(refusal));assert.equal(refusal.error.code, 'AUTH_REQUIRED');const events = await fetch(`${origin}/api/v1/boards/${board}/events?after=0`, {- headers: { 'x-pullboard-engine': '20', authorization: `Bearer ${person.token}` },+ headers: { 'x-pullboard-engine': '27', authorization: `Bearer ${person.token}` },});assert.equal(events.status, 200);assert.deepEqual((await events.json()).events, [], 'the revoked upload never appends a move');@@ -880,7 +880,7 @@ test('revoking a person token during snapshot upload preserves the prior snapshoconst origin = `http://127.0.0.1:${service.port}`;const firstSnapshot = await fetch(`${origin}/api/v1/boards/${board}/state`, {method: 'PUT',- headers: { 'x-pullboard-engine': '20', authorization: `Bearer ${person.token}`, 'content-type': 'application/json' },+ headers: { 'x-pullboard-engine': '27', authorization: `Bearer ${person.token}`, 'content-type': 'application/json' },body: JSON.stringify({ sequence: 0, sealed: 'AQ' }),});assert.equal(firstSnapshot.status, 200);@@ -900,7 +900,7 @@ test('revoking a person token during snapshot upload preserves the prior snapsholet stream;const upload = fetch(`${origin}/api/v1/boards/${board}/state`, {method: 'PUT',- headers: { 'x-pullboard-engine': '20', authorization: `Bearer ${person.token}`, 'content-type': 'application/json' },+ headers: { 'x-pullboard-engine': '27', authorization: `Bearer ${person.token}`, 'content-type': 'application/json' },body: new ReadableStream({ start(controller) { stream = controller; controller.enqueue(Buffer.from('{"sequence":0,"sealed":"')); } }),duplex: 'half',});@@ -916,7 +916,7 @@ test('revoking a person token during snapshot upload preserves the prior snapshoassert.equal(response.status, 401, JSON.stringify(refusal));assert.equal(refusal.error.code, 'AUTH_REQUIRED');const current = await fetch(`${origin}/api/v1/boards/${board}/state`, {- headers: { 'x-pullboard-engine': '20', authorization: `Bearer ${observer.token}` },+ headers: { 'x-pullboard-engine': '27', authorization: `Bearer ${observer.token}` },});assert.equal(current.status, 200);const saved = await current.json();