Repository navigation
Widen CI: dev pushes, mne on macOS, weekly slow run - #290
Merged
Merged
Conversation
Adds push:dev alongside existing push:main/pull_request so post-merge drift on the integration branch is caught. macOS job now installs --extra mne too, so the AMICAICA/MNE tests run against Accelerate.
Schedule-only (Sunday cron, plus workflow_dispatch) job on macOS that runs the full suite with no -m filter: slow tests, and the Fortran-parity tests gated on PAMICA_NATIVE_BINARY/AMICA_RUN_FORTRAN/ AMICA_FORTRAN_BIN, none of which ran in CI before. Never triggers on push/pull_request, so it cannot block or slow a PR.
.rules/ci_cd.md gets a project-specific topology section describing the actual workflows; docs/changelog.md gets an Unreleased bullet summarizing the dev-push trigger, macOS mne coverage, and the new weekly full-suite job.
auto-bump-dev.yml/auto-tag.yml push a version-bump commit straight back to dev/main, which lands in ci.yml's own concurrency group and would cancel the real merge commit's in-progress run then test the trivial bump commit instead. lint/typecheck now skip on the same author-email + message-prefix guard those two workflows already use on themselves; every other job needs one of them, so the skip cascades to the whole run.
Open (or comment on) a tracking issue on failure via actions/github-script: this is the repo's only scheduled workflow, and GitHub's default notification (an email to whoever last edited the schedule) is otherwise the only signal. Header now also notes GitHub's 60-day schedule auto-disable and that timeout-minutes: 180 is a first estimate pending an actual run.
.rules/ci_cd.md's topology section now covers the auto-bump-dev.yml/ auto-tag.yml interaction guard on ci.yml and the weekly job's failure-tracking issue, timeout caveat, and 60-day auto-disable note.
Groups push events by github.sha instead of github.ref, so every commit landing on main/dev gets its own concurrency group and pushes never cancel each other. This closes the residual gap in the prior bot-bump fix: auto-bump-dev.yml/auto-tag.yml's follow-up push could still land in the same ref-keyed group as the merge commit's run and cancel it, even though the if: guard made that run a no-op. pull_ request keeps ref-based grouping (rapid PR pushes still supersede each other).
Updates the bot-bump interaction passage: per-SHA grouping means the bump push can never land in the merge commit's concurrency group, so the if: guard now only saves compute rather than preventing a cancellation.
Merged
neuromechanist
added a commit
that referenced
this pull request
Aug 25, 2026
From the PR #301 code-review pass: record the params-file backend divergence (wrapper-only Fortran reader; numpy params_file stays JSON-only, MLX has none) in the amica-differences backend table with the decision tracked as #304; add a cross-backend tuner-defaults agreement test so a drifted do_opt_block/blk_* default fails CI (the restart-policy pattern); list the three shared policy modules in AGENTS.md's architecture map and add AMICANative to its import-surface line; point the stale MLX-gaps sentences (AGENTS.md and backend_parity.md) at epic #278; widen typos.yml to dev pushes to match ci.yml's #290 change; and document the do_opt_block/blk_* pass- through in AMICA.fit's kwargs docstring. Tested: test_blocktune.py 43 passed; ruff and ty clean.
neuromechanist
added a commit
that referenced
this pull request
Aug 25, 2026
* Narrow numpy restart catch to LinAlgError
The multi-restart loop also caught bare RuntimeError, copied from the
torch/MLX loops where their linalg genuinely fails that way; numpy's fit
path has no RuntimeError-raising numeric failure, so the broad catch
could only swallow programming bugs as degenerate restarts. Covered by
the existing LinAlgError injection test; suite green.
* Refuse empty Fortran param files
read_fortran_param_file returned {} for an empty or comment-only file
(the zero-recognized guard short-circuited on content_lines == 0), so a
truncated or accidentally cleared input.param silently produced an
all-defaults run. Now a named ValueError, format-independent. Replaces
the test pinning the old behavior and adds a comment-only case; tested.
* Log skipped memory-cap queries at DEBUG
The three device-memory probes and host_memory_bytes disabled the
block-size tuner's memory cap silently on any query failure; each now
leaves a DEBUG line naming the exception, matching the logging
discipline of the rest of blocktune. Logging only; suites green.
* Catch Fortran timeout in precision experiment
subprocess.TimeoutExpired escaped the OSError-only catch as a raw
traceback; a hung binary now lands in the same structured
available=False result as every other failure mode. Research script,
not exercised by the suite.
* Test that non-bad annotations reject nothing
Boundary of the reject_by_annotation overlap computation: annotations
present, none bad_*, mask must stay all-True at full sample count.
Real sample EEG; passes.
* Sanction error-injection subclasses in testing rules
Names the pattern three test files already use (raise the trigger
exception at the real call site, everything else real) as an explicit
exception to the no-mock policy, per the release test review.
* Fix doc rot and Fortran citations from release review
Comment-accuracy pass on PR #301: validation.md's from_params_file
detection text matched neither the code nor its docstring (content
sniffing, never the extension); amica-differences row 5 cited ADR 0003
which disclaims that row; the do_opt_block paragraph referenced a
16-60% range and a table that exist nowhere (now cites the validation
guide's measured ~2.3x MPS gap); AGENTS.md cited amica15.f90:1898 (an
MPI_BCAST) for identify_shared_comps (declared at :1916). Standardized
citation ranges against the literal Fortran: 2617-2620 for the
loglik/modloglik allocation, 2231-2234 for the reject_data zeroing
block, and amica15 (the actual reference) lines for the restart-on-NaN
machinery previously cited from amica17. Also documented that the
keep_best guard covers do_reject alongside share_comps, and corrected
amica15_header.f90 line cites (109 is req1/req2, the defaults live at
24/74). Comments and docs only; ruff/format green, touched suites pass.
* Document PDFTYPE_NAMES export; add AMICANative to surface
The mlx_impl PDFTYPE_NAMES re-export (#265) had no doc coverage, and
AGENTS.md's public-import-surface line predated the AMICANative
top-level export. Docs only, from the release code review.
* Address code-review findings on the release delta
From the PR #301 code-review pass: record the params-file backend
divergence (wrapper-only Fortran reader; numpy params_file stays
JSON-only, MLX has none) in the amica-differences backend table with
the decision tracked as #304; add a cross-backend tuner-defaults
agreement test so a drifted do_opt_block/blk_* default fails CI (the
restart-policy pattern); list the three shared policy modules in
AGENTS.md's architecture map and add AMICANative to its import-surface
line; point the stale MLX-gaps sentences (AGENTS.md and
backend_parity.md) at epic #278; widen typos.yml to dev pushes to
match ci.yml's #290 change; and document the do_opt_block/blk_* pass-
through in AMICA.fit's kwargs docstring. Tested: test_blocktune.py
43 passed; ruff and ty clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ci.ymlnow triggers onpushtodevas well asmain, so post-merge drift on the integration branch is caught immediately (issue #241's precedent: a fix that was green on the PR failed right after landing on dev).The existing
concurrencygroup already cancels a superseded run on the same ref, so no separate change was needed there.The
test-macosjob installs--extra mnealongside--extra mlx, sopamica/tests/mne_tests(the AMICAICA/MNE wrapper) now runs against Accelerate as well as Linux/OpenBLAS.A new schedule-only
weekly-macos-slow.ymlworkflow runs the full suite on macOS every Sunday (plus manualworkflow_dispatch), including@pytest.mark.slowtests and the Fortran-parity tests, none of which had ever run in CI before..rules/ci_cd.mdanddocs/changelog.mdare updated to describe the new topology.What each trigger/job now covers
ci.yml(pull_request+pushtomain/dev):lint->typecheck->test(Linux,-m "not slow", coverage-gated) ->test-macos(Apple Silicon,--extra mlx --extra mne,-m "not slow") ->test-mne(Linux,--extra mne) ->build(sdist/wheel import matrix).weekly-macos-slow.yml(Sunday cron +workflow_dispatchonly, neverpush/pull_request): full suite, no-mfilter, on macOS.Parity-test gating wired for the weekly job
run_fortran_amica's defaultbinary_path=Noneresolves viaPAMICA_NATIVE_BINARY(pamica/native/resolver.py), which the job sets by building the dependency-free native engine (native/build.sh, same recipeci.yml'stest-macosjob already uses) -- this unlocks the slow end-to-end parity tests intest_ng_backend.pyand, combined withAMICA_RUN_FORTRAN=1, the opt-intest_ng_pdf_families.py::test_family_converged_ll_matches_fortran.test_fortran_adapter.py's three CI-skipped tests gate on a separate env var,AMICA_FORTRAN_BIN, which wants a different native build (benchmarks/fortran/build_amica.sh, a realmpif90single-rank singleton, perbenchmarks/fortran/README.md) -- the job builds that too and pointsAMICA_FORTRAN_BINat it.Neither native build needs Rosetta: both compile
amica15.f90/funmod2.f90from source for the runner's own arm64, unlike the legacy bundledpamica/sample_data/amica15macfixture (x86_64-only), which nothing in CI runs.Review follow-ups (addressed in this branch)
dev(deliberately PAT-authored so it triggers workflows) was landing in the sameci.ymlconcurrency group as the just-merged commit's run and cancelling it -- so a merge todevwould show "cancelled" on the real commit and test the trivial bump commit instead, doubling compute and misattributing the green check. Fixed in two layers: (a) theconcurrencygroup now keys ongithub.shaforpushevents instead ofgithub.ref(pull_requestkeeps ref-based grouping, so rapid PR pushes still supersede each other), so every commit landing onmain/devgets its own group and a later push can never cancel an earlier commit's run -- the bot's bump push cannot land in the merge commit's group at all, closing the cancellation gap completely; (b)lint/typecheckalso carry the same author-email +Bump version tomessage-prefixif:guardauto-bump-dev.yml/auto-tag.ymlalready use on themselves, with every other jobneeds-ing one of those two so the skip cascades to the whole run -- with (a) in place this now only saves compute (the bump run no-ops instantly) rather than preventing a cancellation. Documented inci.yml's header and.rules/ci_cd.md.weekly-macos-slow.ymlis the repo's only scheduled workflow; on failure GitHub only emails whoever last edited the schedule, and silently disables it after 60 days of repo inactivity. Added anif: failure()step (actions/github-script) that opens (or comments on, to avoid a fresh issue every week) a tracking issue titled "Weekly macOS slow run failed" linking the run. The workflow header now also notes the 60-day auto-disable so a future reader knows to check for it and re-enable via the Actions tab orgh workflow enable weekly-macos-slow.yml.timeout-minutes: 180is a first estimate. Noted as such in the workflow header (full suite + two from-source native builds + slow/parity tests, revisit against the actual wall-clock once a real run has completed). I'll dispatch a manualworkflow_dispatchrun once this PR is merged to get that first real number rather than guessing further.Deviations
None from the brief. One correction worth flagging: the issue's own comment worried the bit-exact parity tests "need Rosetta" -- that turned out not to apply to anything actually gated in CI.
run_fortran_amicaalready prefers the native (arm64-buildable) engine over the legacy x86_64 fixture (issue #228), so wiringPAMICA_NATIVE_BINARY+AMICA_FORTRAN_BINwas sufficient; no Rosetta step was added or needed.Test plan
python -c "import yaml; yaml.safe_load(...)",uvx yamllint, andactionlint) on both changed/new workflow files, after every round of edits.0 6 * * 0= Sunday 06:00 UTC).uv run ruff check ./uv run ruff format --check ./uv run ty check .all clean (no Python files touched).uv run pytest -m "not slow" -n auto --cov-fail-under=80: 417 passed, 25 skipped, 1 xfailed, coverage 86.55% -- reran clean after the review-fix commits too.mneextra, the weekly job's failure-issue step, and the bot-bump skip guard can only be fully verified by GitHub-hosted runners/real trigger events (not reproducible locally or viaactfor the macOS case); will confirm once this PR's owntest-macosjob runs and after the post-mergeworkflow_dispatchmentioned above.Closes #246