Fix ESRCH race in EvalHost teardown, rebind the 9.0.0 seal - #87
Merged
Merged
Conversation
…tion Reading /proc/<pid>/stat while stopping an EvalHost raced the process exiting. The catch handled ENOENT but not ESRCH, so the rejection escaped Promise.all and failed the test that was tearing down. Signalling at lines 670, 717 and 733 already treated ESRCH as gone; only the enumeration path missed it. Linux-only, which is why it passed on macOS and failed on CI. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The teardown fix touches evals/harness.ts, which the release grader closure covers, so the previous seal no longer regrades. Same original 8.3.0 campaign and canary, regraded offline with no model calls. The candidate artifact is unchanged: the harness is not packed, so the tarball hash held. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks the 9.0.0 tag. Main CI went red after #86 merged, on
eval host writes reviewer model through native plugin tuple options.Root cause — a real race, not a flake
Enumerating a process table is inherently racy: a member can exit between the
readdirof/procand the read of its entry. Linux reports that asENOENTwhen the directory is already gone andESRCHwhen the process is mid-reap. The catch handled onlyENOENT, soESRCHescaped, rejected thePromise.all, and failed the test that was tearing down.It failed in 11.5s, far below the 180s/240s timeouts — it errored, it didn't stall.
Signalling at
harness.ts:670,:717and:733already treatsESRCHas gone. Only the enumeration path missed it, so this restores the file's own convention rather than inventing one.Linux-only, which is why it passes on macOS locally and only bites in CI. It will recur intermittently until fixed.
Fix
processVanished(error)treatsENOENTandESRCHalike and is exported so the classification is testable without staging a real/procrace.tests/eval-process-teardown.test.tspins both codes as gone andEACCES/EIO/absent as real failures that must still surface.Seal rebound
evals/harness.tsis in the release grader closure, so this fix invalidated the 9.0.0 seal — confirmed by running the verification and watching it refuse:Regraded the same original 8.3.0 campaign and canary offline, no model calls. New seal
sha256:5583ec12…, record rebound.The candidate artifact is unchanged. The harness is not in the packed file list, so the tarball still hashes to
2d7539bb…— the same value 9.0.0 was qualified against. This changes the evidence binding, not the thing being released.Verification
bun run check— 1220 pass, 1 skip, 0 fail.bun scripts/release.ts init … --feature evals/qualification/features/9.0.0.json— Release record verified.🤖 Generated with Claude Code