Skip to content

fix(test): fix flaky ctrl-c e2e test on macOS Rosetta CI#308

Merged
wan9chi merged 1 commit into
mainfrom
fix/ctrl-c-flaky-output
Mar 29, 2026
Merged

fix(test): fix flaky ctrl-c e2e test on macOS Rosetta CI#308
wan9chi merged 1 commit into
mainfrom
fix/ctrl-c-flaky-output

Conversation

@wan9chi

@wan9chi wan9chi commented Mar 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove println!() after mark_milestone in exit-on-ctrlc — the \n was flaky on macOS Rosetta CI (sometimes lost in the PTY, causing snapshot mismatch)
  • Remove labeled mode ctrl-c test (milestones can't flush through the labeled writer's line buffer without a \n)
  • Use OnceLock to wait for ctrl-c on the main thread instead of std::process::exit(0) in the signal handler

Failed job: https://github.com/voidzero-dev/vite-task/actions/runs/23702188288/job/69047978201

Test plan

  • All e2e snapshot tests pass on macOS (native + Rosetta)
  • ctrl-c tests pass on Windows VM and CI
  • CI green on all platforms

🤖 Generated with Claude Code

@wan9chi wan9chi force-pushed the fix/ctrl-c-flaky-output branch 6 times, most recently from 9862cfb to 55cac33 Compare March 29, 2026 07:40
Move "ctrl-c received" print from the signal handler to the main thread
(after OnceLock::wait), so it always executes after the milestone flush
println!(). Previously, std::process::exit(0) in the handler could
terminate before output reached the PTY, causing flaky snapshot diffs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wan9chi wan9chi force-pushed the fix/ctrl-c-flaky-output branch from 55cac33 to a4e6ea1 Compare March 29, 2026 08:53
@wan9chi wan9chi changed the title fix(test): eliminate race in exit-on-ctrlc output ordering fix(test): fix flaky ctrl-c e2e test on macOS Rosetta CI Mar 29, 2026
@wan9chi wan9chi merged commit cf2a748 into main Mar 29, 2026
9 checks passed
@wan9chi wan9chi deleted the fix/ctrl-c-flaky-output branch March 29, 2026 09:07
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