Three perry-runtime lib tests fail intermittently when the suite runs in parallel (the default). They have cost four gate runs across three PRs today, each time looking like the PR's fault:
gc::roots::stack_maps::decode_tests::tests::discovers_a_map_from_a_later_loaded_shared_object — the consistent offender; it dlopens a shared object
r#box::release_tests::completed_activation_residue_is_bounded_not_linear
symbol::get::own_data_ic_tests::composed_symbol_field_cache_reloads_mutated_final_slot
Evidence that it is not the change under test
Why it is worth fixing rather than re-running
The failure is indistinguishable at a glance from a real regression, so every occurrence costs someone a bisect-or-believe decision — and the cheap resolution ("just re-run") is exactly the habit that hides a genuine flaky-looking regression later.
Shapes worth considering: a shared-object load and a symbol-registry/IC cache are both process-global, so parallel tests contend on state that is not per-test. Serializing these three (a mutex, serial_test, or a --test-threads=1 lane for the modules that touch process-global registries) would remove the ambiguity.
https://claude.ai/code/session_012Ys25ni6VwDKE71o1NTYAT
Three
perry-runtimelib tests fail intermittently when the suite runs in parallel (the default). They have cost four gate runs across three PRs today, each time looking like the PR's fault:gc::roots::stack_maps::decode_tests::tests::discovers_a_map_from_a_later_loaded_shared_object— the consistent offender; itdlopens a shared objectr#box::release_tests::completed_activation_residue_is_bounded_not_linearsymbol::get::own_data_ic_tests::composed_symbol_field_cache_reloads_mutated_final_slotEvidence that it is not the change under test
2818 passed; 2 failedeach, with a different second test.origin/main:cargo test --release -p perry-runtime --lib -- --test-threads=1 <names>→ 3 passed.origin/mainreproduces it. Three parallel runs ofcargo test --release -p perry-runtime --libon main: runs 1 and 2 green, run 32819 passed; 1 failedondiscovers_a_map_from_a_later_loaded_shared_object.perry-codegenonly.Why it is worth fixing rather than re-running
The failure is indistinguishable at a glance from a real regression, so every occurrence costs someone a bisect-or-believe decision — and the cheap resolution ("just re-run") is exactly the habit that hides a genuine flaky-looking regression later.
Shapes worth considering: a shared-object load and a symbol-registry/IC cache are both process-global, so parallel tests contend on state that is not per-test. Serializing these three (a mutex,
serial_test, or a--test-threads=1lane for the modules that touch process-global registries) would remove the ambiguity.https://claude.ai/code/session_012Ys25ni6VwDKE71o1NTYAT