rule: &str and rule: String across runsOpen and answer this issue on GitHub.
ready · opened 2026-11-02 · updated 2026-11-02 · 1 comment
Running nikaia lower-std again with fold_bound.nika unchanged writes lowered/fold_bound.rs differently. Between runs, the parameter type flips between rule: &str and rule: String. The result is that crates/nikaia/src/fold_bound.rs:61 stops compiling with E0308 (expected String, found &str).
This was found by the M14 emit lane. The binary from before that lane’s change shows the same flip, so the emit change did not cause it.
The lowering is not deterministic here. A likely cause is an iteration order, such as a map or a parallel pass, that decides whether the borrowed form or the owned form is chosen. The sysroot test the_tools_lower_the_same_on_one_thread_as_on_every_core may catch the flip only some of the time.
Probe
for i in 1 2 3 4 5; do target/fast/nikaia lower-std >/dev/null; md5sum crates/nikaia-std/src/tools/lowered/fold_bound.rs; done
The hashes differ between runs.
To build
tests/compiler or as an extension of the existing sysroot comparison.Not reproduced on a clean git archive HEAD copy (bug lane, 2026-11-02). Two suspects to check next:
build.rs compiler_fingerprint hashes lowered/*.rs while another agent runs lower-std in the shared tree, so the fingerprint changes during a build.A probe needs two runs racing a lower-std on the same tree.
Generated by Claude Code