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(cli): preserve verdict lines with checks [V19,V8]

Corey Olsonc05e98b9967a
diff --git a/src/cli.js b/src/cli.js
index 3e535d0c..4dfaab1b 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -1270,9 +1270,12 @@ function readCommands(io, { first, second, rest, values }) {
if (reviewer) io.say(`under review by ${reviewer} until ${item.item_review_until}`);
// Earlier verdicts as one line each, so an item sent back several times stays short to read
// (N30); --history prints every note in full.
- const verdictLine = (verdict) => `${verdict.verdict_decision} ${verdict.verdict_reason} by ${verdict.verdict_by}${verdict.verdict_verifier_family ? ` (${verdict.verdict_verifier_family})` : ''} at ${verdict.verdict_commit.slice(0, 12)}; check: ${verdict.check ?? 'unknown'}`;
+ const verdictLine = (verdict) => `${verdict.verdict_decision} ${verdict.verdict_reason} by ${verdict.verdict_by}${verdict.verdict_verifier_family ? ` (${verdict.verdict_verifier_family})` : ''} at ${verdict.verdict_commit.slice(0, 12)}`;
const notes = verdicts.map((verdict, index) => (values.history || index === verdicts.length - 1 ? verdict.verdict_note : firstLineOf(verdict.verdict_note)));
- verdicts.forEach((verdict, index) => io.say(`${verdictLine(verdict)}${notes[index] ? `: ${notes[index]}` : ''}`));
+ verdicts.forEach((verdict, index) => {
+ io.say(`${verdictLine(verdict)}${notes[index] ? `: ${notes[index]}` : ''}`);
+ io.say(` check: ${verdict.check ?? 'unknown'}`);
+ });
if (notes.some((note, index) => note !== verdicts[index].verdict_note)) io.say(`(earlier verdicts shortened; every note in full: pullboard show ${id} --history)`);
if (item.item_merged_commit) io.say(`merged as ${item.item_merged_commit}`);
if (item.item_withdrawn_reason) io.say(`withdrawn: ${item.item_withdrawn_reason}`);
diff --git a/test/verdict-check.test.js b/test/verdict-check.test.js
index 2b596b73..c4d3b8aa 100644
--- a/test/verdict-check.test.js
+++ b/test/verdict-check.test.js
@@ -135,8 +135,12 @@ test('rework keeps historical rejection unknown and shows the latest accept chec
assert.match(accepted, /no frozen check ran/);
const shownJson = JSON.parse(succeeds(box, repo, 'show', String(item.id), '--json'));
assert.deepEqual(shownJson.verdicts.map((verdict) => verdict.check), ['unknown', 'none']);
- const shown = succeeds(box, repo, 'show', String(item.id));
- assert.match(shown, /REJECT[\s\S]*check: unknown[\s\S]*ACCEPT[\s\S]*check: none/);
+ const shown = succeeds(box, repo, 'show', String(item.id)).split('\n');
+ const rejectLine = shown.findIndex((line) => line.startsWith('REJECT BEHAVIOR_MISMATCH'));
+ const acceptLine = shown.findIndex((line) => line.startsWith('ACCEPT CRITERION_MET'));
+ assert.ok(rejectLine >= 0 && acceptLine > rejectLine);
+ assert.equal(shown[rejectLine + 1], ' check: unknown');
+ assert.equal(shown[acceptLine + 1], ' check: none');
const rows = succeeds(box, repo, 'ledger').split('\n').filter((line) => line.startsWith(`| ${item.id} |`));
assert.equal(rows.length, 1);
assert.match(rows[0], /\| unchecked \|/);