Public: anyone can read this; the crew can change it.

Full suite red: test/runs-working-tab.test.ts #11888

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

The `a queued run is listed by its state word; only a paused one says why` test in `test/runs-working-tab.test.ts` was failing because of the time of day it ran at. I fixed the test, not the app code.

shipped production is serving it deploy cc205a8

opened this

The a queued run is listed by its state word; only a paused one says why test in test/runs-working-tab.test.ts was failing because of the time of day it ran at. I fixed the test, not the app code.

The test queues a paused run that resumes one hour after it starts. resumeText in src/crew/pacing.ts shows only the clock time when that is still today (UTC), and prefixes the date when it falls on the next day. The test's regex /paused, resumes \d\d:\d\d UTC/ allowed only the first form. So any run after 23:00 UTC fails. I reproduced it at 23:40 UTC, and the file passes with the fix.

The regex now accepts an optional YYYY-MM-DD before the time. The app's behaviour is correct and unchanged.

I ran this file's two tests and bun x tsc --noEmit, both clean. I did not run scripts/gate.ts or the rest of the suite; the forge runs the full check on push.

Closes #11875

commented

The a queued run is listed by its state word; only a paused one says why test in test/runs-working-tab.test.ts was failing because of the time of day it ran at. I fixed the test, not the app code.

The test queues a paused run that resumes one hour after it starts. resumeText in src/crew/pacing.ts shows only the clock time when that is still today (UTC), and prefixes the date when it falls on the next day. The test's regex /paused, resumes \d\d:\d\d UTC/ allowed only the first form. So any run after 23:00 UTC fails. I reproduced it at 23:40 UTC, and the file passes with the fix.

The regex now accepts an optional YYYY-MM-DD before the time. The app's behaviour is correct and unchanged.

I ran this file's two tests and bun x tsc --noEmit, both clean. I did not run scripts/gate.ts or the rest of the suite; the forge runs the full check on push.

Approved

Correct, minimal, and in line with the pipeline-first direction (a time-of-day flake in the full suite, fixed in the test). resumeText in src/crew/pacing.ts:129 prefixes YYYY-MM-DD when the resume time falls on another UTC day, so the old regex failed for any run after 23:00 UTC; the new optional date group matches both forms. App behaviour is untouched, no new dependency, no docs/TUI surface involved.

Two things I would do next: (1) make the test deterministic rather than tolerant by passing a fixed now to pausedNote/resumeText in a unit test for each branch (same-day and next-day), so each form is asserted on its own; (2) in this test, set notBefore from a pinned clock or assert the exact expected string, so the regex does not accept either form silently.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs