Test runner: fail loud when src/eigenscript changes mid-run (fixes #681)#690
Merged
InauguralPhysicist merged 1 commit intoJul 22, 2026
Conversation
…ld (InauguralSystems#681) All build variants write to the same path, so a rebuild while the suite is running silently swaps the binary under the runner. Record cksum+size+mtime at suite start, re-check at section boundaries (inside check_eigs_suite and at the major inline section headers), and re-check at the end. On mismatch, fail loudly with the exact error message and exit nonzero. Add [99d] self-test that swaps the binary from a background step and asserts the guard aborts with the expected message. Co-Authored-By: Kimi K2.7 Code <noreply@kimi.com>
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.
Implements the cheap, loud option from #681 (the per-variant-output-paths alternative is deliberately not taken, per the issue's own framing).
What
tests/run_all_tests.shrecords a fingerprint ofsrc/eigenscriptat suite start — POSIXcksum+ file size + mtime (stat -cwith astat -fmacOS fallback) — re-checks it at section seams (insidecheck_eigs_suite()and at the major inline section headers) and once more before the summary, and on mismatch aborts immediately with a nonzero exit and exactly:Adds
[99d] Binary-fingerprint guard self-test (#681): runs a tiny suite subset, swaps the binary from a background step mid-run, and asserts the exact error message and nonzero exit — same pattern as the tests: permanent runaway-guard self-test with inverted expectation (fixes #651) #653 runaway-guard self-test.One file changed, +97 lines, no existing test touched.
Verification
RESULTS: 3131/3131 passed, 0 failed.check_binary_fingerprintmakes[99d]fail (3130/3131, 1 failed) — the self-test is not vacuous.Known bounds (inherent to the cheap option)
Both seem acceptable for turning a silent-wrong result into a loud failure; if you'd rather kill the whole footgun class, the heavier per-variant-paths option from the issue still stands.
Generated by Claude Fable 5 (brief, review), Kimi K2.7 Code (implementation)