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.

chore(core): merge main with milestone engine 31 [H16,N26]

Corey Olson0c9f9189d71f
diff --cc docs/formats.md
index e6810a27,df5ecd04..355daab1
--- a/docs/formats.md
+++ b/docs/formats.md
@@@ -130,8 -130,8 +130,11 @@@ Engine 20 lets a decision name the item
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.
- Engine 31 gives a milestone a target and a shipment. An `editMilestone` move may carry `target`, an ISO date or date-time with an explicit zone (the CLI and `prepareEngineMove` turn a typed local time into UTC before the move is sealed, so every replica stores the same instant; a bare local time in an envelope is refused with `MILESTONE_TARGET`), or `none` to clear it. A `shipMilestone` move records the milestone as shipped at main's commit and moves every local item that has not landed and is not withdrawn into the next unshipped milestone, or `--next`, writing a `milestone_moved` event on each moved item; repo-qualified references stay in place and are listed as not moved across boards. A shipped milestone refuses new items with `MILESTONE_SHIPPED`. Either makes the move an engine-31 move, and an older engine refuses it with `RELAY_MOVE` before changing its board or cursor. Engine numbers 13 to 18 and 21 to 30 are allocated to other changes; whichever lands later renumbers, keeping every earlier engine's replay unchanged.
+ Engine 30 lets a reject and a reopen carry a cause key (`cause`: `test:<file>::<title>`, `refusal:<CODE>`, `row:<id>` or `doctrine:<id>`) and lets the person record a never-again fact with `cause` and `neverAgain: true`, for `pullboard rigor`. Only a move that carries one of these needs engine 30; engine-29 and older moves replay unchanged, and clients on an older engine refuse an engine-30 move with `RELAY_MOVE` before changing their board or cursor. Engine 20 is the implied-items engine above; engine numbers 21 through 29 are allocated to other changes.
+
++Engine 31 gives a milestone a target and a shipment. An `editMilestone` move may carry `target`, an ISO date or date-time with an explicit zone (the CLI and `prepareEngineMove` turn a typed local time into UTC before the move is sealed, so every replica stores the same instant; a bare local time in an envelope is refused with `MILESTONE_TARGET`), or `none` to clear it. A `shipMilestone` move records the milestone as shipped at main's commit and moves every local item that has not landed and is not withdrawn into the next unshipped milestone, or `--next`, writing a `milestone_moved` event on each moved item; repo-qualified references stay in place and are listed as not moved across boards. A shipped milestone refuses new items with `MILESTONE_SHIPPED`. Either makes the move an engine-31 move, and an older engine refuses it with `RELAY_MOVE` before changing its board or cursor. Engine numbers 13 to 18 and 21 to 29 are allocated to other changes; engine 30 carries the cause-key behavior above.
++
+
The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.
A linked board requires at least engine 3 after issuing any agent token, including
revoked or expired tokens. Issuing any machine credential raises that board’s minimum to engine 6, including after revocation or expiry. The minimum survives reopening the auth database;
diff --cc src/engine.js
index 72331e94,bfdaaf96..78618e45
--- a/src/engine.js
+++ b/src/engine.js
@@@ -5,8 -5,7 +5,8 @@@ import { recordedRefusal } from './reco
import { BAR_ENGINE, carriesBarReason } from './bar-corrections.js';
import { carriesImplies, IMPLIES_ENGINE } from './implies.js';
import { CHECK_ACCEPT_ENGINE } from './check-accept.js';
- import { ENGINE_VERSION } from './machine.js';
+ import { CAUSE_ENGINE, ENGINE_VERSION } from './machine.js';
+import { MILESTONE_SHIP_ENGINE, canonicalMilestoneTarget } from './milestones.js';
import { Refused } from './refused.js';
import { requestMoveProblem, recordRequestMove } from './relay-requests.js';
import { relayMoveActor, relaySenderProblem, validRelaySender } from './relay-sender.js';
@@@ -24,15 -23,17 +24,17 @@@ export const ENGINE_OPERATIONS = Object
]);
/** Engine version at which each ordered operation first has stable replay semantics. */
-const OPERATION_ENGINE = Object.freeze({ reopen: 8, recordLandingBatch: 8, recordLandingWaiver: 8, recordLandingFlake: 8, finishLandingBatch: 8, acceptCheck: CHECK_ACCEPT_ENGINE });
+const OPERATION_ENGINE = Object.freeze({ reopen: 8, recordLandingBatch: 8, recordLandingWaiver: 8, recordLandingFlake: 8, finishLandingBatch: 8, acceptCheck: CHECK_ACCEPT_ENGINE,
+ shipMilestone: MILESTONE_SHIP_ENGINE });
- /** Dependency edits add engine-10 meaning, edit reasons engine-19, implied items engine-20 and a milestone target engine-31, without changing ordinary historical envelopes. */
-/** Dependency edits add engine-10 meaning, edit reasons engine-19, implied items engine-20, and a
- * cause key on a reject, reopen or person fact engine-30 (#713), without changing ordinary historical envelopes.
- */
++/** Dependency edits add engine-10 meaning, edit reasons engine-19, implied items engine-20, a cause key on a reject, reopen or person fact engine-30 (#713), and milestone targets engine-31, without changing ordinary historical envelopes. */
function minimumOperationEngine(operation, args) {
const options = args[1];
+ const given = (name) => Boolean(options && typeof options === 'object' && Object.hasOwn(options, name) && options[name] !== undefined && options[name] !== null && options[name] !== false);
+ if (['verify', 'reopen', 'appendFact'].includes(operation) && (given('cause') || given('neverAgain') || given('asPerson'))) return CAUSE_ENGINE;
if (carriesImplies(operation, args)) return IMPLIES_ENGINE;
if (carriesBarReason(operation, args)) return BAR_ENGINE;
+ if (operation === 'editMilestone' && options && Object.hasOwn(options, 'target') && options.target !== undefined) return MILESTONE_SHIP_ENGINE;
return operation === 'editItem' && options && Object.hasOwn(options, 'after') && options.after !== undefined
? 10 : OPERATION_ENGINE[operation] ?? 1;
}
diff --cc src/machine.js
index b33d2387,14be3e95..95527ca0
--- a/src/machine.js
+++ b/src/machine.js
@@@ -10,8 -10,11 +10,11 @@@
*/
/** Executable move semantics, carried by every sealed move and retained during replay [H16]. */
-export const ENGINE_VERSION = 30;
+export const ENGINE_VERSION = 31;
+ /** 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;
+
/** @typedef {'agent' | 'coordinator' | 'clock'} Role */
/**