From 713978eb810500296d2cd39db56b9aa53316464b Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Sun, 18 Oct 2026 17:17:23 +0200 Subject: [PATCH] fix(story-mode): "the tests pass, then Claude starts a git repository and saves the work" One "and" fewer where a test run's commit is the first save of a new repository. Co-Authored-By: Claude Opus 5.5 (1M context) --- src/story-mode.ts | 2 +- .../story-corpus/text-plan-dry-run-helper.expected.json | 2 +- test/story-corpus.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/story-mode.ts b/src/story-mode.ts index 0d2599a5..7ae79ddb 100644 --- a/src/story-mode.ts +++ b/src/story-mode.ts @@ -2713,7 +2713,7 @@ function decorate(draft: DraftPanel, events: StoryEvent[], turn: StoryTurn, inde if (saved) { director += ` · ${plural(saved, 'commit')}`; if (ok) - story = `${story.slice(0, -1)}, and Claude ${startsRepoAt(draft.events, events) ? 'starts a git repository and ' : ''}saves the work${ + story = `${story.slice(0, -1)}, ${startsRepoAt(draft.events, events) ? 'then Claude starts a git repository and' : 'and Claude'} saves the work${ checks.some((e) => e.ships === 'push') ? ' and sends it up' : '' }.`; } diff --git a/test/fixtures/story-corpus/text-plan-dry-run-helper.expected.json b/test/fixtures/story-corpus/text-plan-dry-run-helper.expected.json index 65e18264..e8f62866 100644 --- a/test/fixtures/story-corpus/text-plan-dry-run-helper.expected.json +++ b/test/fixtures/story-corpus/text-plan-dry-run-helper.expected.json @@ -62,7 +62,7 @@ { "kind": "check", "ok": true, - "story": "Claude writes test_csvstat.py and pyproject.toml; the tests pass, and Claude starts a git repository and saves the work.", + "story": "Claude writes test_csvstat.py and pyproject.toml; the tests pass, then Claude starts a git repository and saves the work.", "director": "python3 -m pytest -q 2>&1 → ok ×2 · 17 passed · writes 2 files · 1 commit", "balloon": "Code and tests are committed.", "tests": { diff --git a/test/story-corpus.test.ts b/test/story-corpus.test.ts index 6d6fe1f3..c8d6a00f 100644 --- a/test/story-corpus.test.ts +++ b/test/story-corpus.test.ts @@ -107,7 +107,7 @@ describe('Story Mode on real sessions', () => { it('a commit at the end of a test one-liner is kept, and a background helper reports back in 9 s', () => { expect(panel('text-plan-dry-run-helper', 0, 'check')?.story).toBe( - 'Claude writes test_csvstat.py and pyproject.toml; the tests pass, and Claude starts a git repository and saves the work.' + 'Claude writes test_csvstat.py and pyproject.toml; the tests pass, then Claude starts a git repository and saves the work.' ); expect(panel('text-plan-dry-run-helper', 0, 'plan')?.story).toBe('Claude writes a plan: 4 steps.'); expect(pagesOf('text-plan-dry-run-helper')[1]).toMatchObject({ origin: 'task', durationMs: 9008 });