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(core): withdraw clears milestones and orders roadmap [N26,H16]
Corey Olsoncc38c5df0255
diff --git a/docs/formats.md b/docs/formats.mdindex 0d2cab80..f59c9789 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` | `45` | `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` | `51` | `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.@@ -138,6 +138,8 @@ Engine 38 records submission test selections and normalized landing evidence. AEngine 45 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-45 move, and an older engine refuses it with `RELAY_MOVE` before changing its board or cursor. The coordinator assigned engine 45 to this milestone feature; each other feature retains its separately allocated engine minimum. Engine 30 carries the cause-key behavior above; engine 33 retains the checked-review behavior described above.+Engine 51 writes #649's withdraw-and-remove milestone behavior. A withdraw move is followed by one ordered `editMilestoneItems` removal for each local milestone that lists the item; previous withdraw records retain their original replay, and an older client refuses the new engine before applying any move. `WITHDRAW_MILESTONE_ENGINE` is 51; `MILESTONE_SHIP_ENGINE` remains 45, so milestone targets and shipment keep their engine-45 meaning. The roadmap projects remaining-to-ship work before verified items and omits withdrawn items from its list and total while reporting them separately.+Engine 42 adds ordered `recordHealthFindings` observations. A scan retains its board event revision, emits new and resolved sentinel notices once, and records `health-failure` receipts under their refusal cause keys. Rigor counts repeated health episodes without inventing a changed code commit. Older engines refuse this operation before replay; earlier move meanings and feature minima stay unchanged.The CLI declares its engine in every relay request's `X-Pullboard-Engine` header.diff --git a/src/cli.js b/src/cli.jsindex 645e34af..c032a9b1 100644--- a/src/cli.js+++ b/src/cli.js@@ -274,6 +274,7 @@ import {registeredProjectRootsSnapshot,} from './projects.js';import { milestoneRoadmap } from './roadmap.js';+import { milestonesListing } from './milestones.js';import {rigorLines,rigorReport,@@ -3693,8 +3694,10 @@ function workCommands(io, args) {}),withdraw: () => act(async (ctx, board, me) => {await ordered(ctx, board, 'withdraw', [idArg(first), { agentId: me.id, reason: [second, ...rest].filter(Boolean).join(' ') }]);- io.result?.({ id: idArg(first), reason: [second, ...rest].filter(Boolean).join(' ') });- io.say(`withdrew #${first}`);+ const left = milestonesListing(board, idArg(first));+ for (const name of left) await ordered(ctx, board, 'editMilestoneItems', [name, { agentId: me.id, remove: [idArg(first)] }]);+ io.result?.({ id: idArg(first), reason: [second, ...rest].filter(Boolean).join(' '), milestones: left });+ io.say(`withdrew #${first}${left.length ? `; removed it from milestone ${left.join(', ')}` : ''}`);return 0;}),refreeze: () => act(async (ctx, board, me) => {diff --git a/src/machine.js b/src/machine.jsindex 1aa6eb98..83a29e4c 100644--- a/src/machine.js+++ b/src/machine.js@@ -11,7 +11,7 @@/** Executable move semantics, carried by every sealed move and retained during replay [H16]. */import { RIGOR_NOTICE_ENGINE } from './rigor-source.js';-export const ENGINE_VERSION = 45;+export const ENGINE_VERSION = 51;/** 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;diff --git a/src/milestones.js b/src/milestones.jsindex e291c02a..17b1db0b 100644--- a/src/milestones.js+++ b/src/milestones.js@@ -24,6 +24,9 @@ import {/** The engine at which a milestone carries a target and ships; older moves replay as they did. */export const MILESTONE_SHIP_ENGINE = 45;+/** First writer for withdraw-and-remove milestone behavior; shipment remains engine 45. */+export const WITHDRAW_MILESTONE_ENGINE = 51;+/** The engine a move runs under: its recorded one during replay, else this client's. */function engineOf(board) {return board.executionEngineVersion ?? ENGINE_VERSION;@@ -42,6 +45,18 @@ export function roadmapState(status, landed) {return status === 'verified' ? 'accepted' : status;}+/** Order work for shipping: unfinished items first, then verified items, preserving each group. */+export function shippingOrder(entries) {+ const kept = entries.filter((item) => item.status !== 'withdrawn');+ const verified = kept.filter((item) => item.status === 'verified');+ return [...kept.filter((item) => item.status !== 'verified'), ...verified];+}++/** Return local milestones that list an item, in stored roadmap order including shipped milestones. */+export function milestonesListing(board, id) {+ return milestones(board).filter((milestone) => milestone.items.includes(id)).map((milestone) => milestone.name);+}+/*** Return milestones with each item's current status and state, a landed count, and the* milestone's target and shipment. `done` is the landed count: accepted work has not shipped yet.@@ -54,7 +69,7 @@ export function roadmap(board, resolveExternal = null) {const items = new Map(listItems(board, { all: true }).map((item) => [item.item_id, item]));const at = board.clock.now().getTime();return milestones(board).map((milestone) => {- const entries = milestone.items.map((id) => {+ const named = milestone.items.map((id) => {if (typeof id === 'number') {const item = items.get(id);return item@@ -64,6 +79,7 @@ export function roadmap(board, resolveExternal = null) {const external = resolveExternal?.(id) ?? { id, title: id, status: 'unavailable' };return { id: external.id, title: external.title, status: external.status, state: roadmapState(external.status, Boolean(external.landed)) };});+ const entries = shippingOrder(named);const landed = entries.filter((item) => item.state === 'landed').length;const target = milestone.target ?? null;return {@@ -76,6 +92,7 @@ export function roadmap(board, resolveExternal = null) {landed,done: landed,total: entries.length,+ withdrawn: named.length - entries.length,};});}diff --git a/test/agent-model-engine.test.js b/test/agent-model-engine.test.jsindex 05a61d5f..71061e17 100644--- a/test/agent-model-engine.test.js+++ b/test/agent-model-engine.test.js@@ -5,6 +5,7 @@ import * as store from '../src/board.js';import { applyEngineMove, prepareEngineMove } from '../src/engine.js';import { exportBoard, importBoard } from '../src/exchange.js';import { ENGINE_VERSION } from '../src/machine.js';+import { MILESTONE_SHIP_ENGINE, WITHDRAW_MILESTONE_ENGINE } from '../src/milestones.js';import { RIGOR_NOTICE_ENGINE } from '../src/rigor-source.js';import { HEALTH_SENTINEL_ENGINE } from '../src/health-receipts.js';import { configProblems, defaults, loadConfig } from '../src/config.js';@@ -12,8 +13,10 @@ 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 45 semantics [O8,O3,H16]', (t) => {- assert.equal(ENGINE_VERSION, 45, 'the current writer retains historical behavior through engine 44');+test('model declarations and event snapshots retain engines 1 through 51 semantics [O8,O3,H16]', (t) => {+ assert.equal(WITHDRAW_MILESTONE_ENGINE, ENGINE_VERSION, 'withdraw writes use the allocated feature engine');+ assert.equal(MILESTONE_SHIP_ENGINE, 45, 'shipment retains its engine-45 meaning');+ assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the current writer retains all milestone shipment behavior');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');for (const version of Array.from({ length: ENGINE_VERSION }, (_, index) => index + 1)) {diff --git a/test/milestones.test.js b/test/milestones.test.jsindex 9eb0ca1a..1765d98c 100644--- a/test/milestones.test.js+++ b/test/milestones.test.js@@ -109,7 +109,7 @@ test('[N26] a milestone ships what landed and moves the rest', async (t) => {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');+ [[open, 'open'], [landed, 'landed'], [accepted, 'accepted']], 'each item shows its roadmap state, work to ship first');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');@@ -132,7 +132,8 @@ test('[N26] a milestone ships what landed and moves the rest', async (t) => {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');+ assert.deepEqual(store.milestones(box.board).find((entry) => entry.name === 'B').items, [later, accepted, open], 'the unlanded items are now in B, after its own');+ assert.deepEqual(milestone(after, 'B').items.map(({ id }) => id), [later, open, accepted], 'and the roadmap lists them work to ship first');// The threads: each moved item records the move; the landed one records none.for (const id of [accepted, open]) {diff --git a/test/pending-refreeze.test.js b/test/pending-refreeze.test.jsindex 3fcb18a0..ac0df3ae 100644--- a/test/pending-refreeze.test.js+++ b/test/pending-refreeze.test.js@@ -9,6 +9,7 @@ import * as store from '../src/board.js';import { appliedSequence, applyRelayMove, engineReceipt, prepareEngineMove } from '../src/engine.js';import { exportBoard, importBoard } from '../src/exchange.js';import { ENGINE_VERSION } from '../src/machine.js';+import { MILESTONE_SHIP_ENGINE, WITHDRAW_MILESTONE_ENGINE } from '../src/milestones.js';import { RIGOR_NOTICE_ENGINE } from '../src/rigor-source.js';import { HEALTH_SENTINEL_ENGINE } from '../src/health-receipts.js';import { createE2eHelpers } from './e2e-helpers.js';@@ -263,7 +264,9 @@ 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, 45, 'the current writer retains historical behavior through engine 44');+ assert.equal(WITHDRAW_MILESTONE_ENGINE, ENGINE_VERSION, 'withdraw writes use the allocated feature engine');+ assert.equal(MILESTONE_SHIP_ENGINE, 45, 'shipment retains its engine-45 meaning');+ assert.ok(ENGINE_VERSION >= MILESTONE_SHIP_ENGINE, 'the current writer retains all milestone shipment behavior');assert.ok(ENGINE_VERSION >= RIGOR_NOTICE_ENGINE, 'the next writer retains all recorded dependency-edit behavior');assert.ok(ENGINE_VERSION >= HEALTH_SENTINEL_ENGINE, 'the current writer retains the sentinel minimum and historical behavior');const directory = mkdtempSync(join(tmpdir(), 'pullboard-dependency-engines-'));diff --git a/test/roadmap.test.js b/test/roadmap.test.jsnew file mode 100644index 00000000..58d42d1c--- /dev/null+++ b/test/roadmap.test.js@@ -0,0 +1,128 @@+/** Withdrawn work leaves the roadmap, and each milestone lists its work to ship first [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';+import { submitFixture } from './board-submit-fixture.js';+import { ENGINE_VERSION } from '../src/machine.js';+import { WITHDRAW_MILESTONE_ENGINE } from '../src/milestones.js';+import { prepareEngineMove } from '../src/engine.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, a builder agent, and a helper that files an item+ * in the state the roadmap tells apart: open, accepted (verified only) or landed (verified with a+ * merge commit). Git runs with every GIT_* variable stripped, so a hook's repository never leaks in.+ */+function fixture(t) {+ const dir = mkdtempSync(join(tmpdir(), 'pullboard-roadmap-'));+ 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.+ /** Quote a value for the fixture's private shell launcher. */+ 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: 'Roadmap fixture', GIT_AUTHOR_EMAIL: '[email protected]',+ GIT_COMMITTER_NAME: 'Roadmap 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, and require success. */+ const run = (...args) => {+ const result = spawnSync(process.execPath, [BIN, ...args], { cwd: repo, env, encoding: 'utf8' });+ assert.equal(result.status, 0, `${args.join(' ')}: ${result.stdout}${result.stderr}`);+ return result.stdout;+ };+ /** Run a command that must succeed and return its JSON document. */+ const json = (...args) => JSON.parse(run(...args, '--json'));+ run('init');+ 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' });+ /** Supply the stable criterion snapshot used by these synthetic board transitions. */+ 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 });+ submitFixture(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 { run, json, board, item };+}++test('withdraw leaves every milestone and the roadmap lists work to ship first [N26]', (t) => {+ const { run, json, board, item } = fixture(t);+ const landed = item('Landed page', 'landed');+ const dropped = item('Dropped idea', 'open');+ const first = item('First open page', 'open');+ const accepted = item('Accepted page', 'accepted');+ const second = item('Second open page', 'open');+ const unrelated = item('Unrelated page', 'open');+ run('milestone', 'add', 'Now', '--items', [landed, dropped, first, accepted, second].join(','));+ run('milestone', 'add', 'Later', '--items', [second, dropped].join(','));+ run('milestone', 'add', 'Elsewhere', '--items', String(unrelated));++ // Probe both sealed writers without consuming fixture IDs or changing board state.+ const withdrawMove = prepareEngineMove(board, 'withdraw', [dropped, { agentId: 'coordinator', reason: 'writer version' }], { id: 'withdraw-writer', actor: 'coordinator' });+ const cleanupMove = prepareEngineMove(board, 'editMilestoneItems', ['Now', { agentId: 'coordinator', remove: [dropped] }], { id: 'milestone-writer', actor: 'coordinator' });+ assert.equal(WITHDRAW_MILESTONE_ENGINE, ENGINE_VERSION, 'the feature writer is the current engine');+ assert.equal(withdrawMove.engine, ENGINE_VERSION, 'withdraw writes use the current engine');+ assert.equal(cleanupMove.engine, ENGINE_VERSION, 'milestone cleanup writes use the current engine');++ // Withdraw removes the item from every milestone that lists it and says which, in roadmap order.+ const said = run('withdraw', String(dropped), 'not recurring');+ assert.match(said, new RegExp(`withdrew #${dropped}; removed it from milestone Now, Later`), 'withdraw names each milestone it left');+ const lists = Object.fromEntries(store.milestones(board).map((entry) => [entry.name, entry.items]));+ assert.deepEqual(lists, { Now: [landed, first, accepted, second], Later: [second], Elsewhere: [unrelated] }, 'the item left Now and Later, and Elsewhere is untouched');+ const removals = store.events(board).filter((event) => event.event_kind === 'milestone_items').map((event) => JSON.parse(event.event_detail));+ assert.deepEqual(removals.map(({ name, remove }) => [name, remove]), [['Now', [dropped]], ['Later', [dropped]]], 'each removal is an ordered milestone move, so a replay does the same');+ const quiet = json('withdraw', String(unrelated), 'folded into another item');+ assert.deepEqual(quiet.milestones, ['Elsewhere'], 'the JSON result names the milestones too');+ assert.equal(json('withdraw', String(item('Never planned', 'open')), 'not needed').milestones.length, 0, 'an item no milestone lists leaves none');++ // A board from before this change still names a withdrawn item: the roadmap neither shows nor counts it.+ const stale = item('Stale withdrawn page', 'open');+ run('milestone', 'add', 'Old', '--items', [stale, landed].join(','));+ store.withdraw(board, stale, { agentId: 'coordinator', reason: 'withdrawn before withdraw left milestones' });+ assert.deepEqual(store.milestones(board).find((entry) => entry.name === 'Old').items, [stale, landed], 'the old board still names it');++ const roadmap = Object.fromEntries(json('roadmap').milestones.map((entry) => [entry.name, entry]));+ assert.deepEqual(roadmap.Now.items.map((entry) => [entry.id, entry.state]),+ [[first, 'open'], [second, 'open'], [landed, 'landed'], [accepted, 'accepted']], 'work to ship first, verified after, each in milestone order');+ assert.deepEqual([roadmap.Now.landed, roadmap.Now.done, roadmap.Now.total], [1, 1, 4], 'Now counts 1/4 landed');+ assert.deepEqual(roadmap.Old.items.map((entry) => entry.id), [landed], 'a withdrawn item is never shown');+ assert.deepEqual([roadmap.Old.done, roadmap.Old.total, roadmap.Old.withdrawn], [1, 1, 1], 'nor counted: Old is finished, 1/1, with one withdrawn item set aside');+ assert.deepEqual([roadmap.Elsewhere.total, roadmap.Elsewhere.items], [0, []], 'a milestone whose only item was withdrawn is empty');++ const text = run('roadmap');+ assert.match(text, /^Now: 1\/4 landed\n {2}#3 First open page — open\n {2}#5 Second open page — open\n {2}#1 Landed page — landed\n {2}#4 Accepted page — accepted$/m, 'the text roadmap lists the same order and count');+ assert.match(text, /^Old: 1\/1 landed\n {2}#1 Landed page — landed$/m, 'and leaves the withdrawn item out of the text');+ assert.doesNotMatch(text, /Stale withdrawn page|Dropped idea/, 'no withdrawn item appears anywhere in the text roadmap');+});