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.

feat(stats): show what the board caught [N26,D1]

Corey Olson97db62e5eaed
diff --git a/docs/api.md b/docs/api.md
index ad64cf9e..aeb8ed15 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -38,6 +38,8 @@ The board setting `submit.requireInfraNote` in the coordinator's accepted `pullb
`pullboard stats [--since <date>] --json` returns `{version: 1, stats: {...}}` from the append-only event log. `submissions` and `rejections` count moves, including repeated attempts; `rejectionShare` is rejections divided by submissions (zero when the window has no submissions). `merged` counts distinct items with a merge move; `mergedWithoutAccept` counts those whose merge lacks an earlier acceptance of the latest submitted commit. That audit uses earlier history even when the acceptance falls before the selected window. Current item and verdict rows do not replace event evidence.
+`stats.caught` lists what the board caught in the window, read from moves it already records and never pushed: `counts` per kind (`sentBack`, `conflict`, `redHead`, `flake`, `stuck`), `total`, and `entries` of `{kind, item, at, text}`. A `sentBack` entry carries the gap the reviewer named; `conflict` is a reopen naming a trunk conflict; `redHead` is a reopen after the full suite failed at landing; `flake` is a flake proven by a paired rerun; `stuck` is a sentinel health finding. Text `stats` prints a `caught:` count line and one line per entry, and `pullboard digest` carries the same list for the last 30 days under `What the board caught`. It appears only when someone runs one of those commands.
+
`gateWaits`, beside `stats`, lists, for each kind of gated run in the last day (`check`, `review`, `doctrine`, `gate`, `landing`), its `runs`, `medianWaitMs`, `slowestWaitMs` and `medianRunMs`, read from the board's gate receipts; text `stats` prints them under `gate waits, last day:`. A gate receipt is written for every run that takes a gate slot. Its fields are `waitMs` (queued for a slot), `admissionMs` (deciding and queueing, then handing over), `setupMs`, `runMs` and `evidenceMs` (reading the result and writing its record), and `slot: {kind, reason}`, where `kind` is `ordinary`, `browser`, `short`, `runner` or `inherited`. A timing profile carries it as `receipt`, `check --json` returns it as `receipt`, and the timing lines print it as `phases: ...; slot: <kind> (<reason>)`. A doctrine hold at submit prints its own `doctrine hold phases:` line.
`stats.bars` counts bar corrections, keyed by agent: `{corrections, barRejects, buildRejects}`. A correction is an `edit --criterion` or `--check` on an item that was ever claimed. It must carry `--reason "what the old bar got wrong"` (HTTP `args.reason`); without one it is refused with `BAR_REASON`. A correction that follows the item's newest, unexplained reject marks that reject as caused by the bar, counted to the correcting agent; every other reject counts to the build, under the agent who added the item. Text `stats` prints one `bars:` line per agent, and text `show` prints each correction with its reason.
diff --git a/src/caught.js b/src/caught.js
new file mode 100644
index 00000000..7381ec5a
--- /dev/null
+++ b/src/caught.js
@@ -0,0 +1,103 @@
+/**
+ * What the board caught, read from events it already records [N26,D1]: a quiet list for
+ * `pullboard stats` and `pullboard digest`, shown only when someone asks.
+ *
+ * Why no new event kind: every catch is already a recorded move (a reject verdict, a reopen that
+ * names a trunk conflict or a red landing, a proven flake, a sentinel finding), so the list is a
+ * reading of history and adds nothing to it.
+ */
+import { NATIVE_FLAKE_ENGINE } from './flake-engine.js';
+
+/** The kinds of catch in the order they print, each with the words its heading uses. */
+export const CAUGHT_KINDS = [
+ { kind: 'sentBack', label: 'sent back by a reviewer' },
+ { kind: 'conflict', label: 'conflicted with the trunk and went back for a merge' },
+ { kind: 'redHead', label: 'heads the full suite refused to publish' },
+ { kind: 'flake', label: 'flakes proven' },
+ { kind: 'stuck', label: 'stuck states the sentinel reported' },
+];
+
+/**
+ * Parse an event's detail, tolerating a malformed row so one bad record never hides the rest.
+ *
+ * @param {{ event_detail: string }} event
+ * @returns {any}
+ */
+function detailOf(event) {
+ try { return JSON.parse(event.event_detail) ?? {}; } catch { return {}; }
+}
+
+/**
+ * Every catch in the window, newest last, plus a count per kind.
+ *
+ * @param {Array<{ event_id: number, event_at: string, event_by: string, event_kind: string, item_id: number | null, event_detail: string }>} history the board's events, oldest first
+ * @param {Array<{ verdict_id?: number, item_id: number, verdict_decision: string, verdict_commit: string, verdict_note: string, verdict_reason: string }>} verdicts the reviewers' verdicts, which carry the gap each one named
+ * @param {string | null} boundary inclusive ISO start of the window, or null for the whole history
+ * @returns {{ counts: Record<string, number>, total: number, entries: Array<{ kind: string, item: number | null, at: string, text: string }> }}
+ */
+export function caughtFrom(history, verdicts, boundary) {
+ const start = boundary ? Date.parse(boundary) : null;
+ const counts = Object.fromEntries(CAUGHT_KINDS.map(({ kind }) => [kind, 0]));
+ const entries = [];
+ // Reject moves and their verdict rows are committed together; pairing same-head rows oldest-first keeps each note with its event.
+ const rejectsByHead = new Map();
+ const rejectOffsets = new Map();
+ for (const verdict of verdicts) {
+ if (verdict.verdict_decision !== 'REJECT') continue;
+ const key = JSON.stringify([verdict.item_id, verdict.verdict_commit]);
+ if (!rejectsByHead.has(key)) rejectsByHead.set(key, []);
+ rejectsByHead.get(key).push(verdict);
+ }
+ for (const rejects of rejectsByHead.values()) {
+ rejects.sort((left, right) => (left.verdict_id ?? 0) - (right.verdict_id ?? 0));
+ }
+ /** Record one catch. */
+ const add = (kind, event, text) => {
+ counts[kind] += 1;
+ entries.push({ kind, item: event.item_id ?? null, at: event.event_at, text });
+ };
+ for (const event of history) {
+ const detail = detailOf(event);
+ let rejectedVerdict;
+ if (event.event_kind === 'reject') {
+ const key = JSON.stringify([event.item_id, detail.commit]);
+ const offset = rejectOffsets.get(key) ?? 0;
+ rejectedVerdict = rejectsByHead.get(key)?.[offset];
+ rejectOffsets.set(key, offset + 1);
+ }
+ if (start !== null && Date.parse(event.event_at) < start) continue;
+ if (event.event_kind === 'reject') {
+ const gap = rejectedVerdict?.verdict_note || rejectedVerdict?.verdict_reason || detail.reason || 'no gap recorded';
+ add('sentBack', event, `${detail.reason ?? 'rejected'}: ${gap}`);
+ } else if (event.event_kind === 'reopen' && detail.conflict) {
+ const files = Array.isArray(detail.conflict.files) ? detail.conflict.files.join(', ') : '';
+ add('conflict', event, `conflicted with the trunk${files ? ` in ${files}` : ''}`);
+ } else if (event.event_kind === 'reopen' && detail.landingFailure) {
+ const tests = Array.isArray(detail.landingFailure.tests) ? detail.landingFailure.tests.map((test) => `${test.file}: ${test.name}`).join('; ') : '';
+ add('redHead', event, `the full suite failed ${tests || 'at landing'}`);
+ } else if (event.event_kind === 'flake-observation' && detail.engine === NATIVE_FLAKE_ENGINE && detail.observation?.classification === 'flake') {
+ add('flake', event, `${detail.observation.file ?? 'unknown file'}: ${detail.observation.name ?? 'unknown test'} passed on rerun at the same head`);
+ } else if (event.event_kind === 'health-failure' && event.event_by === 'sentinel') {
+ add('stuck', event, `${detail.subject ?? detail.key ?? 'a stuck state'} (${String(detail.cause ?? 'refusal').replace(/^refusal:/u, '')})`);
+ }
+ }
+ return { counts, total: entries.length, entries };
+}
+
+/**
+ * The quiet lines the CLI prints: one count line, then one line per catch with its item and when.
+ * Nothing prints when nothing was caught beyond a single "none" line, so the list never grows noise.
+ *
+ * @param {{ counts: Record<string, number>, total: number, entries: Array<{ kind: string, item: number | null, at: string, text: string }> }} caught
+ * @returns {string[]}
+ */
+export function caughtLines(caught) {
+ const counts = CAUGHT_KINDS.map(({ kind, label }) => `${caught.counts[kind]} ${label}`).join(' · ');
+ const lines = [`caught: ${caught.total ? counts : 'nothing in this window'}`];
+ for (const { kind, label } of CAUGHT_KINDS) {
+ for (const entry of caught.entries.filter((row) => row.kind === kind)) {
+ lines.push(` ${label}: ${entry.item === null ? 'no item' : `#${entry.item}`}, ${entry.at}: ${entry.text.replace(/\s+/gu, ' ').trim()}`);
+ }
+ }
+ return lines;
+}
diff --git a/src/commands/stats.js b/src/commands/stats.js
index f9458f10..131d3116 100644
--- a/src/commands/stats.js
+++ b/src/commands/stats.js
@@ -3,6 +3,7 @@ import {
barStatsLines,
} from '../bar-corrections.js';
import * as store from '../board.js';
+import { caughtLines } from '../caught.js';
import * as gateReceipt from '../gate-receipt.js';
import {
flowLines,
@@ -28,6 +29,7 @@ export function run(io, { values }) {
io.say(`agents: ${stats.agents.map((agent) => `${agentDisplayName(agents, ctx.config, agent.id)} (${agent.families.join('/')}; ${agent.moves} moves)`).join(', ') || 'none'}`);
io.say(`events: ${stats.firstEventAt ?? 'none'} to ${stats.lastEventAt ?? 'none'}${stats.since ? ` (since ${stats.since})` : ''}`);
for (const line of barStatsLines(stats.bars)) io.say(line);
+ for (const line of caughtLines(stats.caught)) io.say(line);
for (const line of flowLines(stats.flow)) io.say(line);
for (const line of waits.lines) io.say(line);
return 0;
diff --git a/src/digest.js b/src/digest.js
index f6b6f323..22ff2afb 100644
--- a/src/digest.js
+++ b/src/digest.js
@@ -32,6 +32,10 @@ import {
milestones,
openBoardReadOnly,
} from './board.js';
+import {
+ CAUGHT_KINDS,
+ caughtFrom,
+} from './caught.js';
import { healthReport } from './health.js';
import { secretsIn } from './hooks.js';
import { Refused } from './refused.js';
@@ -42,6 +46,8 @@ export const DIGEST_MAX_BYTES = 50_000;
const ROW_LIMIT = 200;
/** Fact kinds that record a judgement and its reason. */
const JUDGEMENTS = ['decision', 'rejection', 'root-cause', 'supersession'];
+/** How far back the briefing's caught section reads, in days. */
+const CAUGHT_DAYS = 30;
/** Plain words for verdict reasons, keeping the code beside them for agents. */
const REASONS = {
TEST_FAILURE: 'a test failed', BEHAVIOR_MISMATCH: 'the behavior differs from the bar', INSUFFICIENT_EVIDENCE: 'too little evidence',
@@ -209,6 +215,13 @@ function render(db, { name, now, root, config }) {
/** Who moves a stuck finding next, in plain words. */
const owner = ({ role, who }) => (role === 'person' ? 'you' : role === 'coordinator' ? 'the coordinator' : who ? `${text(who, 80)} (${role})` : `a ${role}`);
const stuck = health.stuck.map((entry) => `- ${entry.item ? label(entry.item) : text(entry.subject, 60)}: ${text(entry.title, 240)}, since ${text(entry.since, 40)}: ${text(entry.why, 400)}\n Next, ${owner(entry.owner)}: ${text(entry.next, 300)}`);
+ // What the board caught in the last month, from moves it already recorded; shown here and never pushed.
+ const windowStart = new Date(now.getTime() - CAUGHT_DAYS * 86_400_000).toISOString();
+ const caught = caughtFrom(db.prepare('SELECT * FROM event ORDER BY event_id').all(), db.prepare('SELECT * FROM verdict ORDER BY verdict_id').all(), windowStart);
+ const caughtLabels = new Map(CAUGHT_KINDS.map(({ kind, label }) => [kind, label]));
+ const caughtEntries = caught.entries.slice().reverse().map((entry) =>
+ `- ${caughtLabels.get(entry.kind)}: ${entry.item === null ? 'no item' : label(entry.item)}, ${text(entry.at, 40)}: ${text(entry.text, 400)}`);
+ const caughtCounts = CAUGHT_KINDS.map(({ kind, label: words }) => `${caught.counts[kind]} ${words}`).join('; ');
const sections = [
section('Stuck and who moves it', stuck, stuck.length, 4_000, 'Nothing is stuck.'),
section('Open work', open.slice(0, ROW_LIMIT).map(work), open.length, 8_000, 'Nothing is open.'),
@@ -219,7 +232,10 @@ function render(db, { name, now, root, config }) {
section('Questions waiting on you', questions, Number(db.prepare(`SELECT count(*) AS n ${waiting}`).get().n), 4_500, 'No question waits on you.'),
section('Latest shouts to the coordinator', shouts, Number(db.prepare("SELECT count(*) AS n FROM shout WHERE shout_to = 'coordinator'").get().n), 5_000, 'No one has shouted the coordinator yet.'),
section('Milestones', roadmap, roadmap.length, 4_000, 'No milestones are set.'),
+ section(`What the board caught, last ${CAUGHT_DAYS} days`, caughtEntries, caught.total, 4_000, 'Nothing was caught in this window.'),
];
+ // The per-kind counts sit under the heading, before the lines they count.
+ if (caught.total) sections.at(-1).text = sections.at(-1).text.replace('\n\n', `\n\n${caughtCounts}.\n\n`);
const sequence = Number(db.prepare('SELECT coalesce(max(event_id), 0) AS n FROM event').get().n);
const glance = [
`- ${landed} items landed and ${accepted} are accepted and wait to land.`,
diff --git a/src/stats.js b/src/stats.js
index daad921e..e0679f64 100644
--- a/src/stats.js
+++ b/src/stats.js
@@ -3,6 +3,7 @@ import { events } from './board.js';
import { Refused } from './refused.js';
import { flowStats } from './stats-flow.js';
import { barStats } from './bar-corrections.js';
+import { caughtFrom } from './caught.js';
/** Parse an inclusive UTC date boundary, refusing malformed or impossible dates. */
export function sinceDate(value) {
@@ -100,5 +101,5 @@ export function proofStats(board, { since, now = Date.now() } = {}) {
const history = events(board);
const counts = countsFrom(history, boundary);
const verdicts = board.db.prepare('SELECT * FROM verdict ORDER BY verdict_id').all();
- return { ...counts, ...actorsFrom(history, boundary), bars: barStats(history, verdicts, boundary), flow: flowStats(history, boundary, now, counts) };
+ return { ...counts, ...actorsFrom(history, boundary), bars: barStats(history, verdicts, boundary), caught: caughtFrom(history, verdicts, boundary), flow: flowStats(history, boundary, now, counts) };
}
diff --git a/test/digest.test.js b/test/digest.test.js
index 37e43187..67b58a71 100644
--- a/test/digest.test.js
+++ b/test/digest.test.js
@@ -157,7 +157,7 @@ test('the digest is a readable briefing of one board [A2,N26]', (t) => {
const body = (text) => text.slice(text.indexOf('## At a glance')).trimEnd();
assert.equal(body(json.markdown), body(markdown), 'the JSON result carries the same briefing');
assert.deepEqual(json.sections.map((entry) => entry.title), ['Stuck and who moves it', 'Open work', 'Blocked work', 'In review', 'Recent decisions and answers',
- 'Recent verdicts', 'Questions waiting on you', 'Latest shouts to the coordinator', 'Milestones']);
+ 'Recent verdicts', 'Questions waiting on you', 'Latest shouts to the coordinator', 'Milestones', 'What the board caught, last 30 days']);
const out = join(box.dir, 'briefing.md');
writeFileSync(out, 'an older briefing');
diff --git a/test/stats-actors.test.js b/test/stats-actors.test.js
index 5693a1c4..2da4a3b0 100644
--- a/test/stats-actors.test.js
+++ b/test/stats-actors.test.js
@@ -187,5 +187,6 @@ test('[R1,R2] an empty board reports no agents or family buckets', (t) => {
agents: [],
families: [],
bars: {},
- }, 'an empty board has no bar corrections either');
+ caught: { counts: { sentBack: 0, conflict: 0, redHead: 0, flake: 0, stuck: 0 }, total: 0, entries: [] },
+ }, 'an empty board has no bar corrections and nothing caught');
});
diff --git a/test/stats-cli.test.js b/test/stats-cli.test.js
index 43d74b47..c6872b1b 100644
--- a/test/stats-cli.test.js
+++ b/test/stats-cli.test.js
@@ -29,7 +29,8 @@ function fixture(t) {
runFixtureGit(['init', '-q', '-b', 'main'], { cwd: root, stdio: 'pipe' });
writeFileSync(join(root, 'pullboard.json'), JSON.stringify({ lanes: { web: { owns: ['web/'] } } }));
writeFileSync(join(root, 'PRACTICE.md'), '');
- const clock = { now: () => new Date('2026-10-08T12:00:00.000Z') };
+ let now = new Date('2026-10-08T12:00:00.000Z');
+ const clock = { now: () => now };
const board = store.openBoard(join(root, '.git', 'pullboard', 'board.sqlite'), clock);
t.after(() => store.closeBoard(board));
store.register(board, { lane: 'coordinator', path: root });
@@ -46,7 +47,32 @@ function fixture(t) {
submit('c'.repeat(40));
store.verify(board, id, { agentId: reviewer, decision: 'ACCEPT', note: 'Fixture rework meets its bar.', head: 'c'.repeat(40), digest: 'frozen', policy: 'any' });
store.merged(board, id, { agentId: 'coordinator', commit: 'd'.repeat(40) });
- return { root, board };
+ return { root, board, builder, reviewer, setNow: (value) => { now = new Date(value); } };
+}
+
+/** Record two rejections of the same real board head after the criterion is corrected. */
+function addCorrectedRepeat(board, builder, reviewer, setNow) {
+ const commit = 'e'.repeat(40);
+ const tree = 'f'.repeat(40);
+ const id = store.addItem(board, { by: 'coordinator', lane: 'web', title: 'Corrected bar fixture', criterion: 'the heading is visible' });
+ const freeze = (item) => ({ text: item.item_criterion, digest: `digest:${item.item_criterion}` });
+ const first = store.claim(board, id, { agentId: builder, lane: 'web', leaseMs: 3_600_000, freeze });
+ submitFixture(board, id, { agentId: builder, commit, tree });
+ store.verify(board, id, {
+ agentId: reviewer, decision: 'REJECT', reason: 'BEHAVIOR_MISMATCH', note: 'the heading is missing',
+ head: commit, digest: first.digest, policy: 'any',
+ });
+ setNow('2026-10-09T12:00:00.000Z');
+ store.claim(board, id, { agentId: builder, lane: 'web', leaseMs: 3_600_000, freeze });
+ store.editItem(board, id, { agentId: 'coordinator', criterion: 'the heading is accessible', reason: 'the fixture corrects its criterion' });
+ const corrected = store.refreeze(board, id, { agentId: 'coordinator', freeze });
+ submitFixture(board, id, { agentId: builder, commit, tree });
+ store.verify(board, id, {
+ agentId: reviewer, decision: 'REJECT', reason: 'BEHAVIOR_MISMATCH',
+ note: 'the corrected criterion still fails\nThe accessible heading is absent.',
+ head: commit, digest: corrected.after, policy: 'any',
+ });
+ return id;
}
test('[R1,R2,A1] stats JSON is versioned, text states the same proof numbers and neither records a move', async (t) => {
@@ -112,3 +138,71 @@ test('[R1,R2,A2] local HTTP state exposes exactly the command statistics', async
assert.deepEqual({ ...document.state.proofStats, flow: { ...document.state.proofStats.flow, asOf: command.data.stats.flow.asOf } },
command.data.stats, 'the two observations retain every invariant field exactly');
});
+
+/** Add one catch of every other kind to the fixture board, through the events the board already records. */
+function addCatches(board) {
+ store.logEvent(board, 'coordinator', 'reopen', 1, { commit: 'c'.repeat(40), note: 'merge main', conflict: { files: ['web/app.js'], trunk: 'e'.repeat(40) }, cause: 'merge-conflict' });
+ store.logEvent(board, 'coordinator', 'reopen', 1, { commit: 'c'.repeat(40), note: 'red', supersedes: 1, landingFailure: { batch: 'b1', tests: [{ file: 'test/a.test.js', name: 'adds up' }], mergeCommit: 'f'.repeat(40) } });
+ store.logEvent(board, 'coordinator', 'flake-observation', null, { engine: 61, observation: { id: 'o1', classification: 'flake', file: 'test/b.test.js', name: 'waits' } });
+ store.logEvent(board, 'sentinel', 'health-failure', 1, { key: 'k1', cause: 'refusal:STUCK', subject: 'item 1', engine: 1 });
+}
+
+test('[N26,D1] stats names what the board caught', async (t) => {
+ const { root, board, builder, reviewer, setNow } = fixture(t);
+ const repeatedId = addCorrectedRepeat(board, builder, reviewer, setNow);
+ addCatches(board);
+ const json = await run(root, ['stats', '--json']);
+ assert.equal(json.code, 0, json.stderr);
+ const { counts, total, entries } = json.data.stats.caught;
+ assert.deepEqual(counts, { sentBack: 3, conflict: 1, redHead: 1, flake: 1, stuck: 1 });
+ assert.equal(total, 7);
+ assert.match(entries.find((entry) => entry.kind === 'sentBack').text, /Fixture rejects the first attempt\./u, 'a sent-back line carries the gap the reviewer named');
+ assert.ok(entries.every((entry) => entry.at && Object.hasOwn(entry, 'item')), 'each catch names its item and when');
+ const repeated = entries.filter((entry) => entry.kind === 'sentBack' && entry.item === repeatedId);
+ assert.equal(repeated.length, 2, 'both persisted rejection events are shown');
+ assert.match(repeated[0].text, /the heading is missing/u, 'the earlier event keeps its own reviewer note');
+ assert.doesNotMatch(repeated[0].text, /corrected criterion/u);
+ assert.match(repeated[1].text, /the corrected criterion still fails\nThe accessible heading is absent\./u, 'the raw note remains intact in JSON');
+ const laterWindow = await run(root, ['stats', '--since', '2026-10-09', '--json']);
+ const laterRepeat = laterWindow.data.stats.caught.entries.filter((entry) => entry.kind === 'sentBack' && entry.item === repeatedId);
+ assert.equal(laterRepeat.length, 1, 'the later window excludes the earlier same-head rejection');
+ assert.match(laterRepeat[0].text, /the corrected criterion still fails/u, 'the later event retains its note after earlier history is consumed');
+ assert.doesNotMatch(laterRepeat[0].text, /the heading is missing/u);
+ const text = await run(root, ['stats']);
+ assert.match(text.stdout, /caught: 3 sent back by a reviewer · 1 conflicted with the trunk and went back for a merge · 1 heads the full suite refused to publish · 1 flakes proven · 1 stuck states the sentinel reported/u);
+ assert.match(text.stdout, /sent back by a reviewer: #1, \S+: TEST_FAILURE: Fixture rejects the first attempt\./u);
+ const repeatedLines = text.stdout.split(/\r?\n/u).filter((line) => line.startsWith(` sent back by a reviewer: #${repeatedId},`));
+ assert.equal(repeatedLines.length, 2, 'each repeated rejection renders on one physical line');
+ assert.ok(repeatedLines.some((line) => line.includes('the heading is missing')));
+ assert.ok(repeatedLines.some((line) => line.includes('the corrected criterion still fails The accessible heading is absent.')));
+ assert.doesNotMatch(text.stdout, /^The accessible heading is absent\.$/mu, 'the multiline note does not leak into a second physical line');
+ assert.match(text.stdout, /conflicted with the trunk and went back for a merge: #1, \S+: conflicted with the trunk in web\/app\.js/u);
+ assert.match(text.stdout, /heads the full suite refused to publish: #1, \S+: the full suite failed test\/a\.test\.js: adds up/u);
+ assert.match(text.stdout, /flakes proven: no item, \S+: test\/b\.test\.js: waits passed on rerun/u);
+ assert.match(text.stdout, /stuck states the sentinel reported: #1, \S+: item 1 \(STUCK\)/u);
+ const digest = await run(root, ['digest', '--json']);
+ assert.equal(digest.code, 0, digest.stderr);
+ assert.match(digest.data.markdown, /## What the board caught, last 30 days/u);
+ assert.match(digest.data.markdown, /3 sent back by a reviewer; 1 conflicted with the trunk/u);
+ assert.match(digest.data.markdown, /Fixture rejects the first attempt\./u);
+ const digestRows = digest.data.markdown.split(/\r?\n/u).filter((line) => line.startsWith(`- sent back by a reviewer: Corrected bar fixture (#${repeatedId}),`));
+ assert.equal(digestRows.length, 2, 'each repeated rejection remains one digest row');
+ assert.ok(digestRows.some((line) => line.includes('the heading is missing')));
+ assert.ok(digestRows.some((line) => line.includes('the corrected criterion still fails The accessible heading is absent.')));
+});
+
+test('[N26,D1] the caught list never interrupts', async (t) => {
+ const { root, board } = fixture(t);
+ addCatches(board);
+ const before = store.events(board);
+ const shouts = board.db.prepare('SELECT count(*) AS n FROM shout').get().n;
+ for (const args of [['status'], ['list'], ['inbox'], ['lanes']]) {
+ const out = await run(root, args);
+ assert.doesNotMatch(out.stdout + out.stderr, /caught/iu, `pullboard ${args[0]} stays silent about catches`);
+ }
+ assert.deepEqual(store.events(board), before, 'no ordinary command records a move for a catch');
+ await run(root, ['stats']);
+ await run(root, ['digest']);
+ assert.deepEqual(store.events(board), before, 'asking for the list records nothing');
+ assert.equal(board.db.prepare('SELECT count(*) AS n FROM shout').get().n, shouts, 'a catch pushes no shout, banner or notification');
+});