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
feat(roadmap): a milestone ships what landed and moves the rest [N26]
Corey Olson53d0fc04ddf9
diff --git a/docs/api.md b/docs/api.mdindex 75ddc138..03584224 100644--- a/docs/api.md+++ b/docs/api.md@@ -68,6 +68,7 @@ For example: `flow: review wait average 61 min (1 measured; > 60 min); bottlenec| `milestone move` | `version:number`, `milestone:object` || `milestone edit` | `version:number`, `milestone:object` || `milestone remove` | `version:number`, `milestone:object` |+| `milestone ship` | `version:number`, `milestone:object`, `into:string|null`, `moved:array` || `show` | `version:number`, `item_id:number`, `item_title:string`, `item_lane:string`, `item_status:string`, `verdicts:array`, `thread:array` || `stats` | `version:number`, `stats:object` || `status` | `version:number`, `me:object`, `mine:array`, `stats:object`, `reviewQueue:object`, `unread:number`, `relay:object` |@@ -252,7 +253,11 @@ Core readers can call `allShouts(board)` for every stored shout, oldest first, wThe local board state and events responses include `eventLogVersion`, which identifies the persisted event-record format separately from the HTTP envelope's `version`. Static view exports keep this field in both state.json and events.json so a reader can refuse a format newer than it understands. Sealed relay events do not use this local board format marker.-The coordinator maintains the roadmap with `milestone add <name> [--note ...] [--items 1,2,3]`, `milestone items <name> --add|--remove ids`, `milestone move <name> --before <other>`, `milestone edit <name> [--name <new>] [--note <text>]`, and `milestone remove <name>`. A milestone stores only its name, optional note, and ordered item ids in `board_meta`; removing a milestone leaves its items untouched. A `repo#id` reference uses a registered repo's display name (or its folder name) before `#`; its status is read from that board when the repo is registered on this machine. `pullboard roadmap` prints milestones in order with a verified-item done count. Its JSON results and API state use `{ name, note, items: [{ id, title, status }], done, total }` for each milestone.+The coordinator maintains the roadmap with `milestone add <name> [--note ...] [--items 1,2,3]`, `milestone items <name> --add|--remove ids`, `milestone move <name> --before <other>`, `milestone edit <name> [--name <new>] [--note <text>] [--target <date and time>|none]`, `milestone ship <name> [--next <name>]`, and `milestone remove <name>`. A milestone stores its name, optional note, optional target, its shipment once shipped, and ordered item ids in `board_meta`; removing a milestone leaves its items untouched. A target is stored as ISO time; `--target none` clears it. A `repo#id` reference uses a registered repo's display name (or its folder name) before `#`; its status is read from that board when the repo is registered on this machine.++An item counts as done only once it has landed on main: it is verified and its merge commit is recorded. `pullboard roadmap` prints milestones in order as `N/M landed`, with the target, `past target` for an unshipped milestone whose target has passed, or the commit it shipped at, and each item as `landed`, `accepted` (verified, not landed) or its status. Its JSON results and API state use `{ name, note, target, pastTarget, shipped, items: [{ id, title, status, state }], landed, done, total }` for each milestone: `target` is ISO text or `null`, `shipped` is `{ commit, at, by }` or `null`, `state` is `landed`, `accepted` or the status, and `done` equals `landed`.++`milestone ship` is the coordinator's move. It records the milestone as shipped at the main checkout's commit and moves every item that has not landed into the next unshipped milestone after it, or into `--next`, recording a `milestone_moved` event on each moved item's thread. A withdrawn item and a `repo#id` reference stay where they are. Its JSON result is `{ milestone, into, moved }`. A shipped milestone takes no new items: `milestone items <name> --add` refuses `MILESTONE_SHIPPED`. Shipping refuses `NO_NEXT_MILESTONE` when unlanded items have nowhere to go, and `MILESTONE_COMMIT` when main has no commit. Targets and shipping are engine 14 moves.<!-- api-http-shapes:start -->| Response | Required top-level fields |diff --git a/src/cli.js b/src/cli.jsindex cbebab1c..b34d587e 100644--- a/src/cli.js+++ b/src/cli.js@@ -278,6 +278,8 @@ const OPTIONS = {'dry-run': { type: 'boolean' },update: { type: 'boolean' },before: { type: 'string' },+ target: { type: 'string' },+ next: { type: 'string' },add: { type: 'string' },remove: { type: 'string' },name: { type: 'string' },@@ -1983,11 +1985,13 @@ function readCommands(io, { first, second, rest, values }) {io.result?.({ milestones });if (!milestones.length) io.say('no milestones yet; the coordinator can add one with pullboard milestone add');for (const milestone of milestones) {- io.say(`${milestone.name}: ${milestone.done}/${milestone.total} done`);+ const when = milestone.shipped ? ` · shipped at ${milestone.shipped.commit.slice(0, 12)} on ${milestone.shipped.at}`+ : milestone.target ? ` · target ${milestone.target}${milestone.pastTarget ? ', past target' : ''}` : '';+ io.say(`${milestone.name}: ${milestone.landed}/${milestone.total} landed${when}`);if (milestone.note) io.say(` ${milestone.note}`);for (const item of milestone.items) {const id = typeof item.id === 'number' ? `#${item.id}` : item.id;- io.say(` ${id} ${item.title} — ${item.status}`);+ io.say(` ${id} ${item.title} — ${item.state}`);}}return 0;@@ -2821,11 +2825,21 @@ function workCommands(io, args) {await ordered(ctx, board, 'moveMilestone', [name, { agentId: me.id, before: values.before }]);entry = store.milestones(board).find((value) => value.name === name);} else if (first === 'edit') {- if (!second || rest.length || (values.name === undefined && values.note === undefined) || values.items !== undefined || values.before !== undefined || values.add !== undefined || values.remove !== undefined) {- throw new Refused('USAGE', 'pullboard milestone edit <name> [--name <new name>] [--note <text>]');+ if (!second || rest.length || (values.name === undefined && values.note === undefined && values.target === undefined) || values.items !== undefined || values.before !== undefined || values.add !== undefined || values.remove !== undefined || values.next !== undefined) {+ throw new Refused('USAGE', 'pullboard milestone edit <name> [--name <new name>] [--note <text>] [--target <date and time>|none]');}name = second;- entry = await ordered(ctx, board, 'editMilestone', [name, { agentId: me.id, newName: values.name, note: values.note }]);+ entry = await ordered(ctx, board, 'editMilestone', [name, { agentId: me.id, newName: values.name, note: values.note, ...(values.target === undefined ? {} : { target: values.target }) }]);+ name = entry.name;+ } else if (first === 'ship') {+ if (!second || rest.length || ['items', 'note', 'before', 'name', 'add', 'remove', 'target'].some((key) => values[key] !== undefined)) {+ throw new Refused('USAGE', 'pullboard milestone ship <name> [--next <name>]');+ }+ name = second;+ const shipped = await ordered(ctx, board, 'shipMilestone', [name, { agentId: me.id, commit: mainCheckout(ctx.info.root)?.commit ?? null, ...(values.next === undefined ? {} : { next: values.next }) }]);+ io.result?.(shipped);+ io.say(`milestone shipped: ${name} at ${shipped.milestone.shipped.commit}; ${shipped.moved.length ? `moved ${shipped.moved.map((id) => `#${id}`).join(', ')} into ${shipped.into}` : 'every item landed'}`);+ return 0;} else if (first === 'remove') {if (!second || rest.length || values.items !== undefined || values.note !== undefined || values.before !== undefined || values.name !== undefined || values.add !== undefined || values.remove !== undefined) {throw new Refused('USAGE', 'pullboard milestone remove <name>');@@ -2834,7 +2848,7 @@ function workCommands(io, args) {await ordered(ctx, board, 'removeMilestone', [name, { agentId: me.id }]);entry = { name };} else {- throw new Refused('USAGE', 'use pullboard milestone add, items, move, edit or remove');+ throw new Refused('USAGE', 'use pullboard milestone add, items, move, edit, ship or remove');}entry ??= store.milestones(board).find((value) => value.name === name);io.result?.({ milestone: entry });diff --git a/src/next-steps.js b/src/next-steps.jsindex d8afe8fe..6735a321 100644--- a/src/next-steps.js+++ b/src/next-steps.js@@ -162,12 +162,15 @@ export const NEXT_STEPS = Object.freeze({MERGE_CHECK_FAILED: 'use Git 2.38 or newer (git --version), then retry',MERGE_CONFLICT: 'merge main into your branch, resolve the conflicts, commit, and run the command again',MILESTONES_CORRUPT: 'restore the board from a known-good export: pullboard import <file>',- MILESTONE_EDIT: 'pass --name or --note: pullboard milestone edit <name> --note "<text>"',+ MILESTONE_COMMIT: 'commit to main, then ship from the main checkout: pullboard milestone ship <name>',+ MILESTONE_EDIT: 'pass --name, --note or --target: pullboard milestone edit <name> --note "<text>"',MILESTONE_EXISTS: 'pick another name, or edit the existing one: pullboard milestone edit <name>',MILESTONE_ITEMS: 'list item ids once each: pullboard milestone add <name> --items 1,2',MILESTONE_NAME: 'pullboard milestone add <name>',MILESTONE_NOTE: 'pass the note text: --note "<text>"',MILESTONE_ORDER: 'move it before a different milestone; see pullboard roadmap',+ MILESTONE_SHIPPED: 'add the item to the next milestone instead: pullboard milestone items <next> --add <id>',+ MILESTONE_TARGET: 'pass a date and time: pullboard milestone edit <name> --target 2026-10-20T18:00Z',MISSING_SIGNATURE: 'have the person repeat approval for the named row: pullboard spec approve <id>',MISSING_SIGNERS: 'restore the signer list from git: git checkout HEAD -- .pullboard/signers',MODEL_REQUIRED: 'pass --model "<model name>", or set PULLBOARD_MODEL in this shell',@@ -211,6 +214,7 @@ export const NEXT_STEPS = Object.freeze({NO_LANE: 'pick a lane from pullboard lanes',NO_LINES: 'name a line range inside the file',NO_MILESTONE: 'name a milestone from pullboard roadmap',+ NO_NEXT_MILESTONE: 'add the next milestone, or name one: pullboard milestone ship <name> --next <milestone>',NO_POLICY: 'restore and commit pullboard.json, then run the command again',NO_READER: 'name a lane, an agent or all: pullboard shout all "<text>"',NO_REPO: 'run pullboard init in the repo, or pick a project in pullboard view',diff --git a/src/templates.js b/src/templates.jsindex 5c9a529a..252d06d4 100644--- a/src/templates.js+++ b/src/templates.js@@ -125,7 +125,7 @@ It prints the folder to work in and what to run there first. Every join needs th6. A reject reopens the item. Fix it, commit, claim, submit again; the same head is refused. If you cannot get an item green, do not force it: \`pullboard escalate <id> --note "what you tried and how it failed"\` hands it one tier up.7. Your lane is done when its items are verified, not when they are submitted. After your last submit, keep running \`pullboard next --wait 9\`: a rejected item comes back to your lane.-The coordinator merges verified items into the main line; builders never merge.+The coordinator merges verified items into the main line; builders never merge. When a release ships, the coordinator runs \`pullboard milestone ship <name>\`: it records main's commit and moves the items that have not landed into the next milestone.For spare test capacity, use \`pullboard runner add <ssh-host> --slots <n> --browser <n>\`. It registers SSH capacity on this machine; \`pullboard resources\` shows runners and their usage. Only committed source goes to a runner, and board moves stay here.diff --git a/test/agent-model-engine.test.js b/test/agent-model-engine.test.jsindex e85e2e8d..a58abce5 100644--- a/test/agent-model-engine.test.js+++ b/test/agent-model-engine.test.js@@ -10,9 +10,9 @@ import { mkdtempSync, rmSync, writeFileSync } from 'node:fs';import { tmpdir } from 'node:os';import { join } from 'node:path';-test('model declarations and event snapshots retain engines 1 through 11 semantics [O8,O3,H16]', (t) => {- assert.equal(ENGINE_VERSION, 12, 'engine 12 preserves the released engine-8 through engine-11 model behavior');- for (const version of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ENGINE_VERSION]) {+test('model declarations and event snapshots retain engines 1 through 12 semantics [O8,O3,H16]', (t) => {+ assert.equal(ENGINE_VERSION, 14, 'engine 14 preserves the released engine-8 through engine-12 model behavior');+ for (const version of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ENGINE_VERSION]) {const board = store.openBoard(':memory:');t.after(() => store.closeBoard(board));const registration = prepareEngineMove(board, 'register', [{ lane: 'web', path: '/web', model: 'First Model' }]);diff --git a/test/api-http.test.js b/test/api-http.test.jsindex b0024d56..ec1b607d 100644--- a/test/api-http.test.js+++ b/test/api-http.test.js@@ -957,7 +957,7 @@ test('[A2, N26] local milestone item status refreshes after an item event', asynconst before = await box.call(box.path + '/state');assert.equal(builds, 1);assert.deepEqual(before.document.state.milestones[0].items[0], {- id: itemId, title: 'Roadmap item', status: 'open',+ id: itemId, title: 'Roadmap item', status: 'open', state: 'open',});const unchanged = await box.call(box.path + '/state');@@ -969,7 +969,7 @@ test('[A2, N26] local milestone item status refreshes after an item event', asynconst after = await box.call(box.path + '/state');assert.equal(builds, 2, 'a real item event rebuilds the cached local roadmap');assert.deepEqual(after.document.state.milestones[0].items[0], {- id: itemId, title: 'Roadmap item', status: 'claimed',+ id: itemId, title: 'Roadmap item', status: 'claimed', state: 'claimed',});});diff --git a/test/api.test.js b/test/api.test.jsindex 3f00ea84..4e53affc 100644--- a/test/api.test.js+++ b/test/api.test.js@@ -971,6 +971,9 @@ test('[A1] every catalog command and subcommand has a real CLI exercise', () =>json(source, source.repo, 'milestone', ['add', 'Later'], 'add');json(source, source.repo, 'milestone', ['move', 'Later', '--before', 'Catalog'], 'move');json(source, source.repo, 'milestone', ['edit', 'Catalog', '--name', 'Release', '--note', 'Catalog coverage'], 'edit');+ json(source, source.repo, 'milestone', ['edit', 'Release', '--target', '2026-10-20T18:00Z'], 'edit');+ const shippedLater = json(source, source.repo, 'milestone', ['ship', 'Later'], 'ship');+ assert.deepEqual([shippedLater.into, shippedLater.moved], [null, []], 'an empty milestone ships with nothing to move');json(source, source.repo, 'milestone', ['remove', 'Later'], 'remove');json(source, source.repo, 'milestone', ['remove', 'Release'], 'remove');const reopenItem = json(source, source.repo, 'add', ['coordinator', 'Reopen catalog item', '--criterion', 'Exercise the versioned reopen result.', '--check', 'true'], 'add').item;@@ -1040,7 +1043,8 @@ test('[N26,A2] roadmap text, JSON and API state follow live local and registeredconst textRoadmap = box.run(box.repo, 'roadmap');assert.equal(textRoadmap.status, 0, textRoadmap.stderr);- assert.ok(textRoadmap.stdout.indexOf('Aftercare: 0/0 done') < textRoadmap.stdout.indexOf('Delivery: 0/2 done'));+ assert.ok(textRoadmap.stdout.includes('Aftercare: 0/0 landed') && textRoadmap.stdout.indexOf('Aftercare: 0/0 landed') < textRoadmap.stdout.indexOf('Delivery: 0/2 landed'),+ 'the roadmap counts landed items, in milestone order');assert.match(textRoadmap.stdout, /Ship the release/);assert.match(textRoadmap.stdout, new RegExp(`#${localItem.item_id} Local release — claimed`));assert.match(textRoadmap.stdout, new RegExp(`foreign#${externalItem.item_id} External follow-up — open`));diff --git a/test/board.test.js b/test/board.test.jsindex c9f9daf6..9b48b363 100644--- a/test/board.test.js+++ b/test/board.test.js@@ -196,7 +196,10 @@ test('[N26,A2] milestones stay ordered and only the coordinator can edit them',agentId: 'web-2', decision: 'ACCEPT', reason: 'CRITERION_MET', note: 'checked the expected result',head: SHA_A, digest: 'digest:Publish', policy: 'any',});- assert.equal(store.roadmap(board)[0].done, 1, 'done counts follow verified item state');+ assert.equal(store.roadmap(board)[0].done, 0, 'done counts only landed work, so a verified item is not done yet');+ assert.equal(store.roadmap(board)[0].items[0].state, 'accepted', 'a verified item that has not landed reads as accepted');+ store.merged(board, second, { agentId: 'coordinator', commit: SHA_A });+ assert.equal(store.roadmap(board)[0].done, 1, 'done counts the item once its merge onto main is recorded');store.removeMilestone(board, 'Maintenance', { agentId: 'coordinator' });assert.deepEqual(store.milestones(board).map(({ name }) => name), ['Release']);assert.equal(store.getItem(board, second).item_status, 'verified', 'removing a milestone leaves its item untouched');diff --git a/test/milestones.test.js b/test/milestones.test.jsnew file mode 100644index 00000000..52e16d11--- /dev/null+++ b/test/milestones.test.js@@ -0,0 +1,163 @@+/** The roadmap counts what landed on main, and shipping a milestone carries the rest forward [N26]. */+import assert from 'node:assert/strict';+import { execFileSync, spawnSync } from 'node:child_process';+import { chmodSync, mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs';+import { tmpdir } from 'node:os';+import { join, resolve } from 'node:path';+import { after, test } from 'node:test';+import * as store from '../src/board.js';++const BIN = resolve(import.meta.dirname, '../bin/pullboard.js');+const HOUR = 3_600_000;+const TEMP_DIRS = [];++after(() => {+ for (const dir of TEMP_DIRS) rmSync(dir, { recursive: true, force: true });+});++/**+ * A real repo on main with an initialized board and a builder agent, and items in each state+ * the roadmap tells apart: landed (verified with a merge commit), accepted (verified only) and open.+ * Git runs with every GIT_* variable stripped, so a hook's repository never leaks into the fixture.+ */+function fixture(t) {+ const dir = mkdtempSync(join(tmpdir(), 'pullboard-milestones-'));+ TEMP_DIRS.push(dir);+ const repo = join(dir, 'repo');+ const bin = join(dir, 'bin');+ mkdirSync(bin);+ // The repo's hooks call pullboard by name, so the fixture puts this checkout's CLI on PATH.+ const word = (value) => `'${String(value).replaceAll("'", "'\\''")}'`;+ writeFileSync(join(bin, 'pullboard'), `#!/bin/sh\nexec ${word(process.execPath)} ${word(BIN)} "$@"\n`);+ chmodSync(join(bin, 'pullboard'), 0o755);+ const env = { ...process.env };+ for (const key of Object.keys(env)) if (key.startsWith('GIT_')) delete env[key];+ Object.assign(env, { HOME: join(dir, 'home'), PULLBOARD_HOME: join(dir, 'pullboard-home'),+ PULLBOARD_MACHINE_HOME: join(dir, 'machine-home'), GIT_CONFIG_GLOBAL: '/dev/null', GIT_CONFIG_NOSYSTEM: '1',+ GIT_AUTHOR_NAME: 'Milestone fixture', GIT_AUTHOR_EMAIL: '[email protected]',+ GIT_COMMITTER_NAME: 'Milestone fixture', GIT_COMMITTER_EMAIL: '[email protected]', PATH: `${bin}:${process.env.PATH}` });+ execFileSync('git', ['init', '-q', '-b', 'main', repo], { env });+ /** Run Git inside the fixture repo with its private identity. */+ const git = (...args) => execFileSync('git', args, { cwd: repo, env, encoding: 'utf8', stdio: 'pipe' }).trim();+ /** Run pullboard from the main checkout, where it acts as the coordinator. */+ const run = (...args) => {+ const result = spawnSync(process.execPath, [BIN, ...args], { cwd: repo, env, encoding: 'utf8' });+ return { status: result.status, stdout: result.stdout ?? '', stderr: result.stderr ?? '' };+ };+ /** Run a command that must succeed and return its JSON document. */+ const json = (...args) => {+ const result = run(...args, '--json');+ assert.equal(result.status, 0, `${args.join(' ')}: ${result.stdout}${result.stderr}`);+ return JSON.parse(result.stdout);+ };+ const initialized = run('init');+ assert.equal(initialized.status, 0, initialized.stdout + initialized.stderr);+ writeFileSync(join(repo, 'SPEC.md'), '# Fixture\n\n## G · Goals\n- G1 [approved, must] Work is tracked. | gate: true\n');+ writeFileSync(join(repo, 'pullboard.json'), JSON.stringify({ gate: 'true', verify: 'any', lanes: { web: { owns: ['web/'], specs: ['G1'] } }, shared: [] }));+ git('add', '-A');+ git('commit', '-q', '-m', 'chore: initialize fixture');+ const board = store.openBoard(join(repo, '.git', 'pullboard', 'board.sqlite'));+ t.after(() => store.closeBoard(board));+ store.ensureCoordinator(board, repo);+ const builder = store.register(board, { lane: 'web', path: join(dir, 'builder'), model: 'Fixture Model' });+ const freeze = () => ({ text: 'Tracked work', digest: 'digest:tracked' });+ /** File an item and take it to the named state: open, accepted or landed. */+ const item = (title, state) => {+ const id = store.addItem(board, { by: 'coordinator', lane: 'web', title, criterion: 'Tracked work', specIds: ['G1'] });+ if (state === 'open') return id;+ const commit = String(id).repeat(40).slice(0, 40);+ store.claim(board, id, { agentId: builder, lane: 'web', leaseMs: HOUR, freeze });+ store.submit(board, id, { agentId: builder, commit, tree: 'tree' });+ store.verify(board, id, { agentId: 'coordinator', decision: 'ACCEPT', note: 'checked it', head: commit, digest: 'digest:tracked', policy: 'any' });+ if (state === 'landed') store.merged(board, id, { agentId: 'coordinator', commit: git('rev-parse', 'HEAD') });+ return id;+ };+ return { repo, git, run, json, board, builder, item };+}++/** The milestone named `name` in a roadmap document. */+function milestone(document, name) {+ return document.milestones.find((entry) => entry.name === name);+}++/** The milestone moves recorded on an item's thread. */+function moves(box, id) {+ return box.json('show', String(id)).thread.filter((entry) => entry.kind === 'milestone_moved');+}++test('[N26] a milestone ships what landed and moves the rest', (t) => {+ const box = fixture(t);+ const landed = box.item('Landed work', 'landed');+ const accepted = box.item('Accepted work', 'accepted');+ const open = box.item('Open work', 'open');+ const later = box.item('Later work', 'open');+ box.json('milestone', 'add', 'A', '--items', `${landed},${accepted},${open}`);+ box.json('milestone', 'add', 'B', '--items', String(later));++ // The target: set on A and shown in the roadmap and its JSON; a passed one is marked.+ const edited = box.json('milestone', 'edit', 'A', '--target', '2026-01-02T03:04Z');+ assert.equal(edited.milestone.target, '2026-01-02T03:04:00.000Z', 'the edit stores the target');+ const before = box.json('roadmap');+ assert.equal(milestone(before, 'A').target, '2026-01-02T03:04:00.000Z', 'the roadmap JSON shows the target');+ assert.equal(milestone(before, 'A').pastTarget, true, 'an unshipped milestone past its target is marked');+ assert.equal(milestone(before, 'B').pastTarget, false, 'a milestone with no target is never past it');++ // Landed counting: only the merged item counts; each item shows landed, accepted or its status.+ assert.equal(milestone(before, 'A').landed, 1, 'only the item merged onto main counts as landed');+ assert.equal(milestone(before, 'A').done, 1, 'done means landed, so accepted work is not done');+ assert.equal(milestone(before, 'A').total, 3);+ assert.deepEqual(milestone(before, 'A').items.map(({ id, state }) => [id, state]),+ [[landed, 'landed'], [accepted, 'accepted'], [open, 'open']], 'each item shows its roadmap state');+ const text = box.run('roadmap');+ assert.equal(text.status, 0, text.stdout + text.stderr);+ assert.match(text.stdout, /^A: 1\/3 landed · target 2026-01-02T03:04:00\.000Z, past target$/m, 'the text shows N/M landed, the target and past target');+ assert.match(text.stdout, /^ {2}#\d+ Landed work — landed$/m);+ assert.match(text.stdout, /^ {2}#\d+ Accepted work — accepted$/m);+ assert.match(text.stdout, /^ {2}#\d+ Open work — open$/m);++ // Shipping is the coordinator's move, not a builder's.+ assert.throws(() => store.shipMilestone(box.board, 'A', { agentId: box.builder, commit: box.git('rev-parse', 'main') }),+ (error) => error.code === 'COORDINATOR_ONLY');++ // Ship: A records main's commit, and the two unlanded items move into B.+ const main = box.git('rev-parse', 'main');+ const shipped = box.json('milestone', 'ship', 'A');+ assert.equal(shipped.milestone.shipped.commit, main, "the milestone is shipped at main's commit");+ assert.equal(shipped.into, 'B', 'the next milestone is the one after it');+ assert.deepEqual(shipped.moved, [accepted, open]);+ const after = box.json('roadmap');+ assert.equal(milestone(after, 'A').shipped.commit, main, "the roadmap shows main's commit on the shipped milestone");+ assert.deepEqual(milestone(after, 'A').items.map(({ id }) => id), [landed], 'only the landed item stays in the shipped milestone');+ assert.equal(milestone(after, 'A').pastTarget, false, 'a shipped milestone is no longer past its target');+ assert.deepEqual(milestone(after, 'B').items.map(({ id }) => id), [later, accepted, open], 'the unlanded items are now in B');++ // The threads: each moved item records the move; the landed one records none.+ for (const id of [accepted, open]) {+ const recorded = moves(box, id);+ assert.equal(recorded.length, 1, `#${id}'s thread records its move`);+ assert.equal(recorded[0].detail.from, 'A');+ assert.equal(recorded[0].detail.to, 'B');+ assert.equal(recorded[0].detail.commit, main);+ }+ assert.deepEqual(moves(box, landed), [], 'a landed item does not move');++ // The refusal: a shipped milestone takes no new items.+ const refused = box.run('milestone', 'items', 'A', '--add', String(later), '--json');+ assert.notEqual(refused.status, 0, refused.stdout + refused.stderr);+ assert.equal(JSON.parse(refused.stdout).error.code, 'MILESTONE_SHIPPED', 'adding to a shipped milestone is refused');+ assert.deepEqual(milestone(box.json('roadmap'), 'A').items.map(({ id }) => id), [landed], 'the refusal changes nothing');+});++test('[N26] milestone ship --next names where the unlanded items go', (t) => {+ const box = fixture(t);+ const open = box.item('Open work', 'open');+ box.json('milestone', 'add', 'A', '--items', String(open));+ box.json('milestone', 'add', 'B');+ box.json('milestone', 'add', 'C');+ const shipped = box.json('milestone', 'ship', 'A', '--next', 'C');+ assert.equal(shipped.into, 'C', '--next overrides the milestone after it');+ const document = box.json('roadmap');+ assert.deepEqual(milestone(document, 'B').items, [], 'the milestone after it gets nothing');+ assert.deepEqual(milestone(document, 'C').items.map(({ id }) => id), [open], 'the --next milestone gets the unlanded item');+ assert.equal(moves(box, open)[0].detail.to, 'C', 'the thread names the --next milestone');+});diff --git a/test/pending-refreeze.test.js b/test/pending-refreeze.test.jsindex 15ad01aa..4840ab92 100644--- a/test/pending-refreeze.test.js+++ b/test/pending-refreeze.test.js@@ -243,16 +243,16 @@ 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 12 reproduces engine 10 dependency additions and clears');+ assert.deepEqual(currentFeature, oldFeature, 'engine 14 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 12 replay identical events');+ assert.deepEqual(store.events(current), legacyStore.events(old), 'engine 10 and engine 14 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 12 retain the same dependency-move receipts');+ 'engine 10 and engine 14 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');- assert.equal(currentSnapshot.tables.board_meta.find((row) => row.meta_key === 'relay_engine_version').meta_value, '12');+ assert.equal(currentSnapshot.tables.board_meta.find((row) => row.meta_key === 'relay_engine_version').meta_value, String(ENGINE_VERSION));assert.deepEqual(withoutEngineMarker(currentSnapshot), withoutEngineMarker(oldSnapshot),'the sole snapshot difference is the intentionally newer writer-version marker');}@@ -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, 12);+ assert.equal(ENGINE_VERSION, 14);const directory = mkdtempSync(join(tmpdir(), 'pullboard-dependency-engines-'));const cleanup = [];t.after(() => {diff --git a/test/row-decisions-replay.test.js b/test/row-decisions-replay.test.jsindex 8f048ccf..5eaeccdf 100644--- a/test/row-decisions-replay.test.js+++ b/test/row-decisions-replay.test.js@@ -144,7 +144,7 @@ test('captured person decisions and coordinator apply replay identically without});test('engine 12 records preserved decline text and replays a separate reason [S18,S19,H16]', (t) => {- assert.equal(ENGINE_VERSION, 12);+ assert.ok(ENGINE_VERSION >= 12, 'engine 12 and later keep the preserved-text decline');const { source, copies: [one, two] } = decisionCopies(t);const preserved = {kind: 'spec', file: 'SPEC.md', id: 'G2',diff --git a/test/view.test.js b/test/view.test.jsindex aacf3d7a..558595cc 100644--- a/test/view.test.js+++ b/test/view.test.js@@ -317,7 +317,7 @@ test('scoped API answers and its cache and stream never resolve a foreign roadmaassert.equal(stateResponse.status, 200);const stateDocument = await stateResponse.json();const external = stateDocument.state.milestones[0].items[0];- assert.deepEqual(external, { id: 'external-1', title: 'External item', status: 'unavailable' });+ assert.deepEqual(external, { id: 'external-1', title: 'External item', status: 'unavailable', state: 'unavailable' });assert.ok(localItem.item_id > 0);const localRoadmap = JSON.stringify(stateDocument.state.milestones);assert.ok(!localRoadmap.includes(foreign.name));