Skip to content

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

Merged
branchseer merged 1 commit intomainfrom
fix/ctrl-c-flaky-output
Mar 29, 2026
Merged

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

Conversation

@branchseer
Copy link
Copy Markdown
Member

@branchseer branchseer commented Mar 29, 2026

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

@branchseer branchseer 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>
@branchseer branchseer force-pushed the fix/ctrl-c-flaky-output branch from 55cac33 to a4e6ea1 Compare March 29, 2026 08:53
@branchseer branchseer 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
@branchseer branchseer merged commit cf2a748 into main Mar 29, 2026
9 checks passed
@branchseer branchseer 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