fix(tests): key the corpus-column scratch dir per call, not per process - #2969
fix(tests): key the corpus-column scratch dir per call, not per process#2969gHashTag wants to merge 2 commits into
Conversation
Closes #2968 `tri harness scratch --gate` has been red on master since `994f3c8a3`. `bootstrap/tests/corpus_zig_bodies.rs:86` keys its scratch directory by `std::process::id()` -- one value for the whole test binary -- and the test that uses it ends with `remove_dir_all(&dir)`. Measured, and stated as measured: only one of that file's three tests touches the directory today, so nothing collides on this tree. The gate is structural and right to be: the second test to use that key would collide, and it would pass the first time it ran. Fixed as the gate's own message prescribes -- an `AtomicUsize` counter, unique per call. `tri harness scratch --gate` prints `none` and exits 0; the three tests in that file still pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
PR DashboardGenerated at: 2026-08-30 18:09:30 UTC
Summary
Seal Status
|
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
Refs #2968 `git add -A` in this branch's first commit swept in 44 lines of `bootstrap/src/compiler.rs` and its `FROZEN_HASH` that I did not write: a C and Rust emitter fix for string literals (`extra_kind == "string"`), belonging to another session. How it got into a clean worktree: the stash stack is **shared across every worktree of a repository**. An earlier command of mine ran `git stash -q -u` on a tree with nothing to stash -- which pushes nothing -- and then `git stash pop -q`, which popped the top of the shared stack: somebody else's work in progress. Both files are restored to master's version, so this branch is again the one line it claims to be. Their work is not lost: it is the diff of this branch's first commit `1c00afecb`, and a copy is attached to #2968. Measured before and after: with a release build of this branch, `tri seals drift` read 152 drifted seals; on master it reads 0. After this revert it reads 0 -- the drift was the swept-in emitter change, not my test file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
|
Superseded by #2973, which landed the same repair (an
The one thing here worth keeping is on #2968 and not in this diff: the 44 lines of |
Closes #2968
tri harness scratch --gatehas been red on master since994f3c8a3.bootstrap/tests/corpus_zig_bodies.rs:86keyed its scratch directory bystd::process::id()— one value for the whole test binary — and the test thatuses it ends with
remove_dir_all(&dir).Measured, and stated as measured: only one of that file's three tests creates
or deletes the directory today, so nothing collides on this tree. The gate is
structural and right to be — the second test to use that key would collide, and
it would pass the first time it ran.
Fixed as the gate's own message prescribes: an
AtomicUsizecounter, unique percall.
Verify
none, exit 0.cargo test --manifest-path bootstrap/Cargo.toml --test corpus_zig_bodies→ 3 passed.Not mine to have written, and one line to repair — the gate caught it on new code
within an hour of being wired, which is the reading worth keeping.
🤖 Generated with Claude Code