fix(story-mode): a quoted report marks what it skips, a run that never loaded says so (review round 11)

From the fact-checker's last items:
- A helper's report quoted in a notice joined its first sentence to one
  from paragraphs later with nothing between: where text was left out,
  the balloon now says "…" (found in the report itself, so two
  sentences that follow each other are never marked).
- "The first run fails on purpose, as you asked" for a run that never
  loaded a test (a collection error) now reads "At first the tests don't
  even load, as you asked; the second run passes.", as a test panel
  already says it.
- A list intro without a count ("What failed and how I fixed it:") brings
  its items while they fit in 360 characters, not 260.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-10-18 18:05:48 +02:00
1 parent 1a66dbabfb
commit bcfef8af5b
4 files changed
+55 -10

No files matched your search

@@ -54,7 +54,7 @@
{
"kind": "loop",
"ok": true,
"story": "The first run fails on purpose, as you asked; the second passes.",
"story": "At first the tests don't even load, as you asked; the second run passes.",
"unaskedSave": false,
"director": "2 checks · 4 edits · +150 · last: ok · after 1 second opinion",
"balloon": "All 19 test cases pass (13 test functions), and ruff check and ruff format both come back clean.",
@@ -142,7 +142,7 @@
"story": "A background job reports back.",
"unaskedSave": false,
"director": "Prompt · 6 words · task",
"balloon": "\"Write README for csvstat\" reports: I wrote README.md and committed it on its own on feat/csvstat. The README has every section you asked for and no badges.",
"balloon": "\"Write README for csvstat\" reports: I wrote README.md and committed it on its own on feat/csvstat. … The README has every section you asked for and no badges.",
"tests": null,
"roundsOk": null,
"printed": null,
+24
View File
@@ -9,6 +9,7 @@ import {
buildStoryPage,
buildStoryTurns,
classifyBashCommand,
closingText,
createStoryReducer,
exactDuration,
firstSentence,
@@ -1103,6 +1104,29 @@ describe('buildStoryPage', () => {
expect(performance.now() - start).toBeLessThan(1500);
});
it('a quoted report marks only the text it skips with "…"', () => {
const report = [
'I wrote README.md and committed it.',
'It covers usage and the exit codes.',
'It reads the file and prints the counts for each column, one line per column. '.repeat(3),
'One known issue: big numbers are shown rounded.',
].join('\n\n');
// The second sentence follows the first: no mark. The issue is three paragraphs on: marked.
expect(
closingText(
report,
['It covers usage and the exit codes.', 'One known issue: big numbers are shown rounded.'],
' … '
)
).toBe(
'I wrote README.md and committed it. It covers usage and the exit codes. … One known issue: big numbers are shown rounded.'
);
// Claude's own closing words are never marked.
expect(closingText(report, ['One known issue: big numbers are shown rounded.'])).toBe(
'I wrote README.md and committed it. One known issue: big numbers are shown rounded.'
);
});
it('a short ending keeps the sentence that leaves something open', () => {
const page = pageOf([
prompt('run them'),