Skip to content

Close the ASL/perf parity family (+25 codes, 69→94)#4

Merged
neurolabusc merged 2 commits into
mainfrom
asl-parity-checks
Jun 22, 2026
Merged

Close the ASL/perf parity family (+25 codes, 69→94)#4
neurolabusc merged 2 commits into
mainfrom
asl-parity-checks

Conversation

@neurolabusc

Copy link
Copy Markdown
Contributor

The largest parity family yet — 25 ASL/perf rules.checks codes, closed via the crafted-fixture method established in the DWI/fmap/NIfTI PR.

Summary

Implemented-code coverage 69 → 94 (tests/parity/ISSUE_COVERAGE.md). Every code was confirmed 1:1 vs @bids/validator 2.4.1 on a synthetic tree (zero rust-only / deno-only divergence across all 25), then locked by a CI-gated Rust integration test — no Deno or external data needed at test time.

All 25 were fixture-only: the generic check_rules engine, the aslcontext + m0scan associations, the NIfTI header context, and the array/max/count/sorted/intersects expression ops already implemented them. Notably the m0scan association — which I worried Rust might not resolve — works at parity via the generic association arm.

Codes closed

  • Array length vs NIfTI / aslcontext: ASLCONTEXT_TSV_NOT_CONSISTENT, {POST_LABELING_DELAY,FLIP_ANGLE,LABELING_DURATION}_*_MATCHING_*, REPETITIONTIMEPREPARATION_NOT_MATCHING_ASLCONTEXT_TSV, REPETITIONTIME_PREPARATION_NOT_CONSISTENT, ECHO_TIME_NOT_CONSISTENT
  • M0Type trio: M0Type_SET_INCORRECTLY, _TO_ABSENT, _TO_ABSENT_IN_ASLCONTEXT
  • Range / monotonic: POST_LABELING_DELAY_GREATER, LABELING_DURATION_GREATER, BOLUS_CUT_OFF_DELAY_TIME_GREATER, BOLUS_CUT_OFF_DELAY_TIME_NOT_MONOTONICALLY_INCREASING, VOLUME_TIMING_NOT_MONOTONICALLY_INCREASING
  • VolumeTiming mutual-exclusive cluster: VOLUME_TIMING_AND_REPETITION_TIME_MUTUALLY_EXCLUSIVE, REPETITION_TIME_AND_ACQUISITION_DURATION_MUTUALLY_EXCLUSIVE, VOLUME_TIMING_AND_DELAY_TIME_MUTUALLY_EXCLUSIVE, VOLUME_TIMING_MISSING_ACQUISITION_DURATION, DEPRECATED_ACQUISITION_DURATION
  • Other: BACKGROUND_SUPPRESSION_PULSE_NUMBER_NOT_CONSISTENT, TOTAL_ACQUIRED_VOLUMES_NOT_CONSISTENT

Tests

crates/bids-core/tests/asl_checks.rs — 17 tests covering all 25 codes (selector-overlapping cases isolated). Uses the shared tests/common/mod.rs builder.

Validation

codespell, cargo fmt, clippy -D warnings, cargo test --workspace all green. Default parity sweep green on all 14 datasets.

🤖 Generated with Claude Code

neurolabusc and others added 2 commits June 22, 2026 11:50
The largest fixture-only family. Same crafted-fixture method as DWI/fmap/
NIfTI: the generic engine, the aslcontext + m0scan associations, the NIfTI
header context, and the array/max/count/sorted/intersects expression ops
already implement all of these. Confirmed 1:1 vs @bids/validator 2.4.1 on a
17-subject synthetic tree (25 codes, zero rust-only/deno-only divergence) —
including the m0scan association, which resolves via the generic arm.

- Add crates/bids-core/tests/asl_checks.rs (17 tests / 25 codes): array
  length vs nifti/aslcontext, M0Type_* trio, *_GREATER + monotonic checks,
  the VolumeTiming mutual-exclusive cluster, background-suppression, and
  total-acquired-pairs.
- Promote the 25 codes to RUST_CODES. ISSUE_COVERAGE.md: 69 -> 94
  implemented, 109 -> 84 missing (status table sums to 202).
- CLAUDE.md: note to run codespell before every commit (enforced by the
  new .github/workflows/codespell.yml from PR #1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- run.py: count datasets actually compared; print a summary and FAIL (exit 1)
  when zero ran (a clean checkout with no fetched corpus would previously
  exit 0 vacuously). Partial default runs print a coverage NOTE.
- ISSUE_COVERAGE.md: add the ASL/perf family (25 codes) to the
  crafted-fixture (Deno-confirmed-once, CI-asserted) evidence bucket.
- asl_checks.rs: drop redundant drop(ctx); accurate lifetime comment.
- audit_response.md updated; audit_temp.md removed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@neurolabusc neurolabusc merged commit ee9fa2e into main Jun 22, 2026
2 checks passed
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.

1 participant