Skip to content

Decompose src/runs/pause.test.ts (616 lines) below the 500-line global …#426

Merged
jayminwest merged 3 commits into
mainfrom
warren/run_pbaessv251c5
Jun 18, 2026
Merged

Decompose src/runs/pause.test.ts (616 lines) below the 500-line global …#426
jayminwest merged 3 commits into
mainfrom
warren/run_pbaessv251c5

Conversation

@jayminwest

Copy link
Copy Markdown
Owner

Summary

refactor(runs): decompose pause.test.ts below 500-line limit (warren-0e98)

Run

  • Warren run: run_pbaessv251c5
  • Agent: pi
  • Cost: $0.715 (66 in / 7.2k out / 792.9k cache-r)

Seeds

  • warren-0e98 — Decompose src/runs/pause.test.ts (616 lines) below the 500-line global limit. First extract the shared file-local helper group into a new sibling src/runs/pause.test-helpers.ts and export each symbol: PROJECT_ID, PLOT_ID, makeAgentJson, poseEvent, answerEvent, stubReader, multiPlotReader. Carry the imports those helpers need into the helpers file (type PlotEvent from @os-eco/plot-cli, type PlotEventReader from ./pause.ts) and import every helper back into each resulting test file — keep ONE copy, do NOT duplicate, or jscpd check:dups will flag it. Then split the four top-level describe blocks along their existing seams into two sibling test files, each importing the helpers from ./pause.test-helpers.ts and the units under test from ./pause.ts: keep describe("pickUnansweredQuestion"), describe("findAnswerFor"), and describe("bootPauseDetector") in src/runs/pause.test.ts; move describe("tickPauseDetector") into a new src/runs/pause.tick.test.ts. Do not alter any test body, assertion, stub, or fixture. Mirror the precedent src/diagnostics/checks.test-helpers.ts (warren-7a15) and src/server/handlers/projects.test-helpers.ts (warren-a715). Verify: each of wc -l src/runs/pause.test.ts src/runs/pause.tick.test.ts src/runs/pause.test-helpers.ts shows < 500 AND bun test src/runs/pause.test.ts src/runs/pause.tick.test.ts reports 23 pass / 0 fail (same total as before) AND bun run typecheck is clean AND bun run check:dups exits 0.

Commits (3)

  • 1c7a807 refactor(runs): decompose pause.test.ts below 500-line limit (warren-0e98)
  • 69753e4 chore(seeds): close warren-0e98, warren-b7fa
  • 96e4c5e chore(warren): seeds state

Files changed

.seeds/issues.jsonl            |   6 +-
 .seeds/plans.jsonl             |   2 +-
 scripts/file-size-budgets.json |   1 -
 src/runs/pause.test-helpers.ts |  49 +++++
 src/runs/pause.test.ts         | 434 +----------------------------------------
 src/runs/pause.tick.test.ts    | 395 +++++++++++++++++++++++++++++++++++++
 6 files changed, 456 insertions(+), 431 deletions(-)

Prompt

Show prompt
work on sd warren-0e98

🤖 Opened by warren run run_pbaessv251c5

jayminwest and others added 3 commits June 18, 2026 10:51
…0e98)

Extract shared file-local helpers into src/runs/pause.test-helpers.ts
and split describe("tickPauseDetector") into src/runs/pause.tick.test.ts.
Remove the grandfathered file-size budget entry. No test bodies changed;
23 pass / 0 fail.

Closes warren-0e98, warren-b7fa
@jayminwest jayminwest enabled auto-merge (squash) June 18, 2026 10:54
@jayminwest jayminwest merged commit 852d566 into main Jun 18, 2026
2 checks passed
@jayminwest jayminwest deleted the warren/run_pbaessv251c5 branch June 18, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant