Skip to content

Strengthen do_approx_sphere regression guard#146

Merged
neuromechanist merged 1 commit into
mainfrom
fix/strengthen-do-approx-sphere-guard
Jul 16, 2026
Merged

Strengthen do_approx_sphere regression guard#146
neuromechanist merged 1 commit into
mainfrom
fix/strengthen-do-approx-sphere-guard

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Summary

  • Follow-up to Address JOSS reviewer feedback on paper and Figure 1 #138's PR review: the pr-test-analyzer agent found that test_end_to_end_correlation_vs_fortran_from_sample_params_json's correlation/Amari thresholds at max_iter=100 don't reliably catch a reintroduced do_approx_sphere=false regression (measured 0.9986 correlation / 0.0049 Amari with the bug present at 100 iterations, only marginally failing by 500).
  • Adds a direct, deterministic assertion on the resolved do_approx_sphere value, independent of optimization dynamics, as the actual regression guard.
  • Bumps max_iter to 300 so the existing fit-based checks stay a meaningful secondary sanity check.

Test plan

  • Verified locally: the new assertion fails immediately when do_approx_sphere is False (tested via an in-memory params override, not touching the committed JSON).
  • Full test passes at max_iter=300 in ~75s.
  • ruff check, ruff format --check, ty check all pass.

The pr-test-analyzer review found that
test_end_to_end_correlation_vs_fortran_from_sample_params_json's
correlation/Amari thresholds at max_iter=100 don't reliably catch a
reintroduced do_approx_sphere=false: measured 0.9986 correlation and
0.0049 Amari with the bug present, comfortably passing, only
marginally failing by max_iter=500. Add a direct, deterministic
assertion on the resolved do_approx_sphere value (independent of
optimization dynamics) as the actual regression guard, and bump
max_iter to 300 so the fit-based checks stay a meaningful secondary
sanity check.
@neuromechanist
neuromechanist merged commit 1cf287a into main Jul 16, 2026
6 checks passed
@neuromechanist
neuromechanist deleted the fix/strengthen-do-approx-sphere-guard branch July 16, 2026 02:56
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.11%. Comparing base (0ef9428) to head (75cc6e0).
⚠️ Report is 2 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #146      +/-   ##
==========================================
- Coverage   80.20%   80.11%   -0.10%     
==========================================
  Files          14       14              
  Lines        2102     2102              
  Branches      357      357              
==========================================
- Hits         1686     1684       -2     
- Misses        302      303       +1     
- Partials      114      115       +1     

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants