Add reproducibility floor + TrackRAD ingestion & integrity harness (Charter Phase 0/1) - #7
Open
vidyuthdev wants to merge 4 commits into
Open
Conversation
Deterministic run logging with pinned RNGs, git SHA, package versions, and a stable reproducibility checksum written per run. tests/test_repro.py proves determinism across calls and seed-sensitivity (5/5).
Typed TrackRADCase loader reading real fields only (cine frames, tumour mask, JSON sidecars), deterministic case_checksum, patient-level enumeration. Placeholder quarantine: to_smoke_test_bundles refuses without acknowledge_synthetic=True and stamps PLACEHOLDER_TRACKRAD_*. Canonicalises .mha to (T,H,W) and suffix-matches the b-field-strength sidecar — two card-vs-reality discrepancies found by reading real bytes. Charter §3: TrackRAD is an ingestion smoke-test only, never a dose benchmark. tests/test_trackrad_loader.py 10/10, including on real data.
Per-case ingestion checks (loads, frames finite/3D, in-plane isotropic + ~1mm, sidecars present, mask geometry matches frames) with patient-level uniqueness asserted in code, not comment (Charter §2.4). Reproducible per-center scorecard logged to runs/ with a stable sweep_checksum. Verified 12/12 patients clean across 3 centres / 2 field strengths; the gate earned its keep by catching real header rounding on B_002 (fixed the check, not the data). tests/test_trackrad_integrity.py 5/5 (incl. catches injected NaN + mask/frame mismatch).
Charter (CLAUDE.md) defining integrity rules and phase gates, PROGRESS.md tracking phase status against demonstrated evidence, BACKLOG.md for deferred items (MRI-as-geometry-input, tracking service). Ignore runs/ (regenerated provenance logs).
vidyuthdev
force-pushed
the
feat/charter-trackrad-phase01
branch
from
August 9, 2026 19:05
d0c022e to
6b5d20c
Compare
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
Establishes the Charter-driven reproducibility and data-integrity foundation, plus a real-data ingestion path for the TrackRAD2025 asset. Four self-contained commits:
TrackRADCasereading real fields only (cine frames, tumour mask, JSON sidecars), deterministiccase_checksum, patient-level enumeration, and a placeholder quarantine (to_smoke_test_bundlesrefuses withoutacknowledge_synthetic=True, stampsPLACEHOLDER_TRACKRAD_*).sweep_checksum.CLAUDE.md(charter),PROGRESS.md,BACKLOG.md; ignore regeneratedruns/.Scope & integrity notes
b-field-strength.json(suffix-matched), and.mhastores time as the last numpy axis (canonicalised to(T,H,W)).Verification
tests/test_repro.py5/5tests/test_trackrad_loader.py10/10 (incl. on real data)tests/test_trackrad_integrity.py5/5 (incl. catches injected NaN + mask/frame mismatch)Independent of #6 (rebased onto
master); no overlap with the CI-fix PR.