Skip to content

test(terminals): count the shared kill_all grace in clock reads, not seconds - #206

Closed
nt-nerdtechnic wants to merge 1 commit into
mainfrom
test/kill-all-longest-grace-once-flake
Closed

nt-nerdtechnic wants to merge 1 commit into
mainfrom
test/kill-all-longest-grace-once-flake

Conversation

@nt-nerdtechnic

Copy link
Copy Markdown
Collaborator

Summary

  • test_kill_all_waits_the_longest_grace_once_not_once_per_pane failed on Windows backend 4/4 (run 38443251695, job 115454959944): three panes took 10.66s. The log shows all three sessions closed with exit=1 — on Windows TERM terminates the child, so no grace ran at all; the 10.66s was the ps snapshot, breakaway sweep and lifecycle drain on a loaded runner. Test misjudgment, not a product defect.
  • Reuses _SteppingClock from test(terminals): count the spec-less kill_all grace in clock reads, not seconds #204: a kill_group spy records the clock at each TERM and escalation. Asserts every TERM precedes the first escalation and each escalation lands one grace (within 3 clock steps) after the last TERM. On Windows (no escalation) it asserts only that the platform is win32, as test(terminals): count the spec-less kill_all grace in clock reads, not seconds #204 does.

Verification

  • Reproduced locally by making _ps_snapshot sleep 7s: the old test fails with the same message (10.06s); the new test passes.
  • Mutation: kill_all waiting one grace per pane sequentially → escalations at 3.1 / 6.2 / 9.25 and the new test fails.
  • Whole file 20 consecutive runs: 20/20 pass; test_osplat.py passes; ruff check clean; gitleaks 0 findings.

🤖 Generated with Claude Code

…seconds

test_kill_all_waits_the_longest_grace_once_not_once_per_pane timed the
whole kill_all on the wall clock, which also carries the ps snapshot, the
breakaway sweep and the lifecycle drain. A loaded Windows runner took
10.66s there with no grace at all (TERM terminates the child on Windows,
exit=1), and the 2x-grace bound failed.

Reuse _SteppingClock from #204: spy kill_group to record the clock at
each TERM and escalation, then assert every TERM precedes the first
escalation and each escalation lands one grace after the last TERM.
A mutation that waits one grace per pane puts the escalations at
3.1/6.2/9.25 and fails; a 7s ps snapshot no longer does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
nt-nerdtechnic added a commit that referenced this pull request Oct 13, 2026
…seconds (#206)

Squash-merged from test/kill-all-longest-grace-once-flake.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@nt-nerdtechnic

Copy link
Copy Markdown
Collaborator Author

Squash-merged into main as 11178c3.

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