You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine: World3 unit-alias test passes or fails depending on test order #474
wrld3_resource_unit_alias_should_not_conflict sometimes failed when run with the rest of the suite and passed when run alone.
World3 declares Resource unit and Resource units as aliases, and the test checks that no unit diagnostic names both.
The cause was unit inference visiting constraints in HashMap order, so which variable a conflict was reported against changed from run to run.
This looks fixed: unit inference now sorts variables before generating constraints (src/simlin-engine/src/units_infer.rs, around line 981, from #1003, which closed #999), and the test runs un-ignored in every cargo test.
The alias bug the test guards against is #454, still open.
The test's doc comment still says it "currently FAILS", which is stale.
changed the title [-]engine: wrld3_resource_unit_alias_should_not_conflict is order-dependent / flaky[/-][+]engine: World3 unit-alias test passes or fails depending on test order[/+]on Oct 12, 2026
Unit inference sorts variables before generating constraints (src/simlin-engine/src/units_infer.rs:981-994, #1003) and the checker sorts too (units_check.rs:596-600), so the reported variable no longer depends on HashMap order. The underlying alias conflict is also gone (8bc2660, see #454), and wrld3_resource_unit_alias_should_not_conflict runs un-ignored in the default suite.
Activity
[-]engine: wrld3_resource_unit_alias_should_not_conflict is order-dependent / flaky[/-][+]engine: World3 unit-alias test passes or fails depending on test order[/+]bpowers commentedon Oct 12, 2026
Closing: already fixed on main.
Unit inference sorts variables before generating constraints (src/simlin-engine/src/units_infer.rs:981-994, #1003) and the checker sorts too (units_check.rs:596-600), so the reported variable no longer depends on HashMap order. The underlying alias conflict is also gone (8bc2660, see #454), and
wrld3_resource_unit_alias_should_not_conflictruns un-ignored in the default suite.