Skip to content

Autonomous development for real products. Governed agents build from specs you approve, follow the rules you set, and nothing merges until another agent proves it. Your decisions, judgement and taste are the bar that work must clear. Declare your vision and let agents build it.

fix(land): the landing lease move is engine 74 and relays [C7]

Corey Olsonb908ff595369
diff --git a/docs/formats.md b/docs/formats.md
index 5cbad3e0..e9b75a65 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` | `73` | `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` | `74` | `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 -->
Relay transport capability `apiVersion: 2` is independent of these versions and
@@ -196,6 +196,8 @@ Engine 72 (`COORDINATOR_HOLD_ENGINE`) holds a linked board's coordinator at one
Engine 73 (`PEOPLE_ENGINE`) names people and lets approvers alone act as the person. The relay stamps each stored record's sender with the GitHub login behind it, the engine the sender declared and, on a board that names approvers, `approver: true|false` for a person sender. Replaying a move made at engine 73 or later, every event it writes carries `person`, that login, beside `event_by`, the agent or seat. A move that carries out a recorded phone request carries the request sender's login instead, and a `relay_refused` event carries the login of the person who tried the move or request. `pullboard.json` may list `approvers`, GitHub logins, at most fifty; leaving it out keeps today's behaviour. On a board that names them, every replica refuses with `NOT_APPROVER` a person move (a row or sentinel decision, an answer, hold or fact as the person, a person request shout) or a phone request to answer, hold or decide rows whose sender is not an approver, and the relay refuses an unlink or snapshot replacement from anyone else. A record whose seal no key opens, from an engine no newer than the replica's, is set aside as `relay_refused` with code `RELAY_SEAL`, and replay goes on; one from a newer engine still asks for an upgrade.
+Engine 74 (`LANDING_LEASE_ENGINE`) gives a trunk one landing at a time (#417). The `landingLeaseMove` operation takes, renews and releases the board's landing lease, carrying the holder's token, branch, pid, generation and guardian. `recordLandingBatch` and `finishLandingBatch` may carry a `landingFence` that names the lease they write under; a write whose fence is not the current holder's is refused. A second `pullboard land` names the holder and queues. Older engines refuse `landingLeaseMove` and any fenced landing write, and a landing lease move never falls back to a local preview or a queued relay move: it needs an acknowledged order.
+
The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.
A linked board requires at least engine 48 after issuing any agent token or machine credential, including
revoked or expired ones; before engine 48 these minimums were 3 and 6. The minimum survives reopening the auth database;
diff --git a/src/landing-lease-engine.js b/src/landing-lease-engine.js
index 807ea3ae..1d997cbd 100644
--- a/src/landing-lease-engine.js
+++ b/src/landing-lease-engine.js
@@ -1,2 +1,2 @@
/** Board-ordered landing admission retains its own replay meaning [Q1,Q2,Q3]. */
-export const LANDING_LEASE_ENGINE = 76;
+export const LANDING_LEASE_ENGINE = 74;
diff --git a/src/relay-outbox.js b/src/relay-outbox.js
index 1f6e5df0..187d7d6b 100644
--- a/src/relay-outbox.js
+++ b/src/relay-outbox.js
@@ -163,7 +163,7 @@ export const ITEM_SLOTS = Object.freeze({
recordRowDecisions: [], applyRowDecisions: [], draftSpecRow: [], recordSpecApprovalBaseline: [],
recordLandingBatch: [], recordLandingWaiver: [], recordLandingFlake: [], finishLandingBatch: [],
recordHealthFindings: [], decideSentinel: [], beginSentinelRun: [], finishSentinelRun: [],
- recordFlakeObservation: [], recordGateRun: [], declareJob: [], recordJobRun: [], takeCoordinator: [],
+ recordFlakeObservation: [], recordGateRun: [], declareJob: [], recordJobRun: [], takeCoordinator: [], landingLeaseMove: [],
...Object.fromEntries(FIRST_ITEM.map((operation) => [operation, [[0]]])),
addItem: [[0, 'parentId'], [0, 'after', '*']],
editItem: [[0], [1, 'after', '*']],
diff --git a/test/relay-credential.test.js b/test/relay-credential.test.js
index baddd4d0..e3deff20 100644
--- a/test/relay-credential.test.js
+++ b/test/relay-credential.test.js
@@ -32,6 +32,7 @@ test('every current operation selects its native actor credential without a seco
if (operation === 'declareJob') args = [{ agentId: actor, name: 'credential-job', every: '10m', owner: actor }];
if (operation === 'recordJobRun') args = [{ agentId: actor, name: 'credential-job' }];
if (operation === 'takeCoordinator') args = [{ agentId: actor, machine: 'credential-machine' }];
+ if (operation === 'landingLeaseMove') args = [{ agentId: actor, action: 'renew', token: 'credential-lease', branch: 'main', pid: 1, generation: 0 }];
if (operation === 'proposeSentinel') args = [{ agentId: actor,
row: { name: 'credential-watch', check: 'true', every: 'hourly', owner: actor } }];
if (['beginSentinelRun', 'finishSentinelRun'].includes(operation)) {