Skip to content

Give every refusing handoff kill test a failed handoff whatever the timing - #24

Merged
reka18 merged 1 commit into
mainfrom
fix/handoff-test-backoff
Nov 26, 2026
Merged

reka18 merged 1 commit into
mainfrom
fix/handoff-test-backoff

Conversation

@reka18

@reka18 reka18 commented Nov 26, 2026

Copy link
Copy Markdown
Owner

Why: `random_kills_of_two_runners_with_an_expiring_program_never_hand_off_after_it` failed on Linux x86_64 in #23's CI (`8 runs: 5 failed; 0 backoffs`, then `the seed hits a failed handoff`). The refusing kill tests assert that a failed handoff happened, but whether a random refusal landed during a handoff depended on timing, so the fixed seed didn't settle it.

Change (test only):

  • In refusing modes, the first iteration (always before any expiry) refuses the handoff's writes and lets its runners finish instead of killing them, so a backoff always happens and the backoff checks always run.
  • Non-refusing seeds draw the same random sequence as before.
  • The state check accepts no state for a program that was never admitted (seen only with `HANDOFF_KILLS=3`).

Tested: the whole `automation_handoffs` suite passes with `HANDOFF_KILLS=3` (where the forced iteration supplies the only backoffs) and with the default 50. Clippy is clean.

…iming

The refusing kill tests required at least one failed handoff, but whether a
random refusal landed during a handoff depended on the machine's timing:
Linux x86_64 CI got none (8 runs, 0 backoffs) and failed. The first
iteration now refuses and lets its runners finish, so each of these seeds
always backs off at least once, and the backoff checks always run. The other
seeds draw the same random sequence as before.

A program that was never admitted has no state, which the state check now
accepts; it showed up only with very few iterations.
@reka18
reka18 merged commit d3b2a02 into main Nov 26, 2026
3 checks passed
@reka18
reka18 deleted the fix/handoff-test-backoff branch November 26, 2026 06:57
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