Skip to content

fix(runner): release the file teardown when stop-on-failure halts - #1328

Merged
Chemaclass merged 1 commit into
mainfrom
fix/1321-stop-on-failure-skips-tear-down-after-script
Aug 19, 2026
Merged

fix(runner): release the file teardown when stop-on-failure halts#1328
Chemaclass merged 1 commit into
mainfrom
fix/1321-stop-on-failure-skips-tear-down-after-script

Conversation

@Chemaclass

Copy link
Copy Markdown
Member

🤔 Background

Related #1321

--stop-on-failure ends a sequential run with exit from inside the test loop, so the loop's own tear_down_after_script call is never reached. Whatever set_up_before_script acquired is leaked, and nothing in the output says the hook was skipped.

💡 Changes

  • Track the file whose teardown this shell still owes, and settle it from the exit path, before the summary and before the temp dirs a hook may still be reading.
  • Gate the debt on the file declaring the hook. With none declared the hook call prints a blank line, and emitting that from the halt path would change the output of every halted run.
  • Turning the exit into a loop flag was the other option. It reroutes the halt through a path guarded by parallel::is_enabled, so it would rewrite all five stop-on-failure snapshots and start writing reports sequentially. Neither belongs in this fix.
  • All five existing snapshots stay byte-identical.

--stop-on-failure ends a sequential run with `exit` from inside the test
loop, so the loop's own tear_down_after_script call was never reached and
whatever set_up_before_script acquired was leaked.

Track the file whose teardown this shell still owes, and settle the debt
from the exit path before the summary and before the temp dirs a hook may
still be reading. Gated on the file declaring the hook: with none declared
the hook call prints a blank line, and emitting that from the halt path
would change the output of every halted run.

Turning the exit into a loop flag was the other option. It reroutes the
halt through a path guarded by parallel::is_enabled, so it would rewrite
all five stop-on-failure snapshots and start writing reports sequentially,
neither of which this fix is about.

Closes #1321
@Chemaclass Chemaclass added the bug Something isn't working label Aug 19, 2026
@Chemaclass Chemaclass self-assigned this Aug 19, 2026
@Chemaclass
Chemaclass merged commit 1abb624 into main Aug 19, 2026
37 checks passed
@Chemaclass
Chemaclass deleted the fix/1321-stop-on-failure-skips-tear-down-after-script branch August 19, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant