Skip to content

ci: the watcher must not fail a run the ratchet passed - #426

Merged
tannevaled merged 1 commit into
mainfrom
ci/watcher-must-not-fail-a-green-run
Aug 21, 2026
Merged

tannevaled merged 1 commit into
mainfrom
ci/watcher-must-not-fail-a-green-run

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

I added a watcher to this lane (#412) to find out what it was running out of. It found five memory blowups. It also, twice, turned a successful run into a red one:

passing examples: 15005   (files loaded: 2135, failed to load: 71)
frozen floor:     14900
note: 105 more passing than the floor
ruby/spec ratchet OK
Terminated
##[error]Process completed with exit code 1

The ratchet passed. The step failed in tearing the watcher down: an EXIT trap did that, and the status the step ended with was whatever the trap left behind. It hit #424 and #425, both of which are comfortably above their floors.

The fix

The ratchet's status is captured before anything is killed, and handed back explicitly. The child sleep is killed and waited for, so the runner has no orphan to report either.

The race is not reproducible on demand — which is a reason to remove the mechanism rather than to keep timing it.

Checked both ways, because a guard against a false failure must not swallow a real one:

ratchet exits step exits
0 0
1 1

🤖 Generated with Claude Code

I added a watcher to this lane to find out what it was running out of. It
found five memory blowups. It also, twice, turned a successful run into a
red one:

  passing examples: 15005   (files loaded: 2135, failed to load: 71)
  frozen floor:     14900
  note: 105 more passing than the floor
  ruby/spec ratchet OK
  Terminated
  ##[error]Process completed with exit code 1

The ratchet passed and the step failed, in tearing the watcher down. An
EXIT trap did that, and the status the step ended with was whatever the
trap left behind.

The status is taken from the ratchet before anything is killed, and
handed back explicitly. The race is not reproducible on demand, which is
a reason to remove the mechanism rather than to keep timing it.

Checked both ways: a ratchet exiting 0 gives a step exiting 0, and a
ratchet exiting 1 still gives a step exiting 1 — the guard must not
swallow a real failure to avoid a false one.
@tannevaled
tannevaled merged commit e6e9346 into main Aug 21, 2026
7 checks passed
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