Skip to content

Pin the 0.00s guard contract, not host speed - #309

Merged
neuromechanist merged 1 commit into
devfrom
fix/issue-308-slow-run-flake
Sep 1, 2026
Merged

neuromechanist merged 1 commit into
devfrom
fix/issue-308-slow-run-flake

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Fixes the first weekly macOS slow-run failure (issue #308). The failure was environmental, not a regression: test_run_fortran_rejects_sub_resolution_config assumed 8ch x 2000 samples always runs under amica's ~10 ms out.txt stamp resolution, and a loaded runner crossed one 0.01 stamp, so _run_fortran correctly returned a nonzero mean and the expected RuntimeError never fired. Nothing in the failing commit range touched this path.

The test now pins the guard's actual contract: _run_fortran either raises the named "rounds to 0.00 s" error (fast host) or returns a mean of at least one 0.01 stamp over the 7 timed iterations (loaded host) -- never a bogus 0.0 ms/iter, which is the bug the guard exists to prevent.

Tested by running the rewritten test against the real bundled amica15mac via AMICA_FORTRAN_BIN (passes on this machine through the raise branch); the weekly run exercises the built native binary. Test-only change.

Closes #308

test_run_fortran_rejects_sub_resolution_config bet that 8ch x 2000
samples always stamps 0.00 s per iteration; a loaded weekly-run
macOS runner crossed one 0.01 stamp and the guard rightly had
nothing to reject (issue #308, first weekly failure). The test now
asserts the guard's actual contract -- either the named
sub-resolution error, or a mean at least one stamp over the timed
iterations, never a bogus 0.0 -- so both legitimate outcomes pass.
Verified against the real bundled amica15mac binary locally.
@neuromechanist
neuromechanist merged commit 97cd7e6 into dev Sep 1, 2026
8 checks passed
@neuromechanist
neuromechanist deleted the fix/issue-308-slow-run-flake branch September 1, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weekly macOS slow run failed

1 participant