Skip to content

fix(ci): flaky TUI paging test + macos-14 runner retirement (red Test & build on main) - #15

Merged
roypadina merged 2 commits into
mainfrom
fix/ci-tui-fixture-timestamps
Oct 31, 2026
Merged

roypadina merged 2 commits into
mainfrom
fix/ci-tui-fixture-timestamps

Conversation

@roypadina

@roypadina roypadina commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Cause

Test & build failed on main (run 40913072530) at tests/cli/tui.test.tsx → long lists > keeps the highlighted row inside the window while paging down: after g the frame showed session-5 at the top, not session-0.

Nothing in the merge differed from feat/ai-find. The test is timing-dependent:

  • Since 0.12.0 the TUI sorts sessions newest-first (sortRecords(…, 'used'); ties keep input order).
  • The fixture rec() gave each record its own new Date(). When building the 80 records crossed a millisecond tick, the later records (session-5…79) outranked session-0…4, which then sorted to the end of the list.
  • Whether the tick lands inside the build is luck. That is why the same test passed on the branch, failed on main, and also flaked on the ubuntu leg since 0.12.x.

Reproduced deterministically by forcing a 1 ms gap after record 5: same failure, same frame.

A second cause appeared on this PR's first run: Test & build failed in 1 s with "This job failed because of a scheduled macOS 14 runner image brownout. macOS 14 runner images will be retired on November 2, 2026" (actions/runner-images#13518). After 2026-11-02 every run on macos-14 would fail.

Fix (tests + CI only, no shipped code)

  • tests/cli/tui.test.tsx: one shared timestamp for every fixture record.
  • .github/workflows/ci.yml: Test & build runs on macos-latest instead of macos-14. The job name, and so the required check, is unchanged.
  • tests/cli/resume.test.ts: the default-bin test read the ambient AGENTCTL_CLAUDE_BIN, so it failed on any shell that exports an override. It now stubs the variable out for that test.

Local: npm run typecheck, npm test (221/221) and npm run build pass; the TUI suite passed 5 runs in a row.

No release: the change touches tests and CI only.

🤖 Generated with Claude Code

The TUI sorts sessions newest-first (since 0.12.0). The tui.test.tsx fixture
stamped each record with its own `new Date()`, so when building the 80-record
list crossed a millisecond tick, the later records sorted ahead of session-0
and `g` (jump to first) no longer showed it. Use one shared timestamp.

resume.test.ts read the ambient AGENTCTL_CLAUDE_BIN, so it failed on any
shell that exports an override. Stub it out for the default-bin test.
The macos-14 image is in scheduled brownouts before its retirement on
2026-11-02; jobs on it fail in ~1s during a brownout.
@roypadina roypadina changed the title test: fix flaky TUI paging test (red Test & build on main) fix(ci): flaky TUI paging test + macos-14 runner retirement (red Test & build on main) Oct 31, 2026
@roypadina
roypadina merged commit e2dcd63 into main Oct 31, 2026
2 checks passed
@roypadina
roypadina deleted the fix/ci-tui-fixture-timestamps branch October 31, 2026 14:02
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