This evidence record retains the historical Phase 1 label.
Audit identity¶
Audit date: 2026-07-19
Committed implementation baseline under audit:
5365d184fb3c712e22e79b4b211c474cbebbbb57(fix: defer ANTs during transform inspection), committed 2026-07-19 at 16:39:22 -05:00.Acceptance-gate commit: this document is committed as part of the acceptance gate, and a commit cannot contain its own commit hash. The resulting gate commit is identified by repository history and the audit handoff rather than by inventing a future SHA.
The audit used the locked project environment on Linux and exercised only portable unit and bounded integration work. It did not select HPC tests or access lab storage.
Runtime and tool versions¶
| Component | Measured version | Provenance |
|---|---|---|
| Python | 3.12.11 | CPython in the uv-managed project environment |
| ANTSpyX | 0.6.3 | Installed antspyx distribution and ants.__version__ |
| ITK | 5.4.5 | /ITKVersion in an HDF5 image written by the installed ANTSpyX native binary |
| NumPy | 2.3.5 | Installed numpy distribution |
| SciPy | 1.15.3 | Installed scipy distribution |
| tifffile | 2026.7.14 | Installed tifffile distribution |
| uv | 0.7.13 | uv --version; required by project and CI configuration |
| pytest | 9.1.1 | uv run pytest --version |
| Ruff | 0.15.22 | uv run ruff --version |
| BasedPyright | 1.38.3 (Pyright 1.1.408) | uv run basedpyright --version |
| pre-commit | 4.6.0 | uv run pre-commit --version |
ITK is not installed as a standalone itk or SimpleITK Python distribution in
this environment. The recorded version therefore comes from the linked implementation
used by ANTSpyX itself, not from unrelated package metadata.
The required uv version is pinned to exactly 0.7.13 in both
[tool.uv].required-version and the setup-uv action input. This makes the measured
resolver and lock behavior reproducible locally and in CI.
Portable validation results¶
All commands below ran on 2026-07-19 using the project’s configured cache and managed-Python locations, as required by repository policy.
| Command | Fresh result |
|---|---|
uv lock --check | Exit 0; 133 packages resolved |
uv sync --locked --group dev --extra examples | Exit 0; 133 packages resolved and 130 packages audited |
uv run pytest -m "unit and not hpc" tests/unit -v | 604 passed, 0 skipped, in 6.72 s |
uv run pytest -m "integration and not hpc" tests/integration -v | 40 passed, 0 skipped, in 4.07 s |
uv run ruff format --check . | Exit 0; 59 files already formatted |
uv run ruff check . | Exit 0; all checks passed |
uv run basedpyright | Exit 0; 0 errors, 0 warnings, 0 notes |
uv run pre-commit run --all-files | 4 of 4 hooks passed |
uv run pytest tests/unit tests/integration -q | 644 passed in 8.77 s |
uv run pre-commit validate-config .pre-commit-config.yaml also exited zero. The
pre-commit configuration and GitHub workflow both parsed as YAML using the already
locked environment; no YAML package was added as a direct Cy-ExM dependency. The CI
action refs were confirmed to exist: actions/checkout@v7 and
astral-sh/setup-uv@v8.3.2.
CI fixes all six native-thread variables at the job level before Python starts:
ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS, OMP_NUM_THREADS,
OPENBLAS_NUM_THREADS, MKL_NUM_THREADS, NUMEXPR_NUM_THREADS, and
VECLIB_MAXIMUM_THREADS. Its selectors are explicitly unit and not hpc and
integration and not hpc; the workflow contains no external-source dependency, Dask, SLURM, lab path,
or lab-storage access.
Collection-time policy requires every test to have exactly one unit, integration,
or hpc marker matching its first directory. Fresh collection selected all 604 unit
tests with -m unit, all 40 bounded integration tests with integration and not hpc,
and all 644 portable tests together. The marked module inventory was 16 unit modules
and 7 integration modules.
Acceptance evidence¶
Legacy parity: historical extraction evidence records the retained source snapshot comparison, tolerances, source pin, and characterized corrections.
Import side effects: all four tests in
test_import_contract.pypassed. They confirmed lightweight package/runtime/registration imports, unchanged environment and root logging state, no filesystem work during construction, and no eager ANTs, NumPy, SciPy, or tifffile import. Object-based affine inspection configures native threads and imports NumPy/SciPy without importing ANTs; only a transform path needs the deferred ANTs reader.Thread defaults and overrides: all 38 tests in
test_threads.pypassed. They confirmed one thread for every native runtime by default, explicit values over inherited values, inherited values over defaults per variable, stable reporting, idempotent reapplication, and rejection of a late change. Strict explicit thread counts accept only exact built-in positive integers: booleans, floats, strings, and integer subclasses are not coerced. Inherited environment counts keep their documented base-10 string grammar and invalid updates remain atomic.External ZYX geometry boundary: anisotropic, non-cubic tests confirmed that TIFF arrays, shapes, chunk bounds, and crop bounds remain external ZYX while ANTs arrays and physical metadata remain native XYZ. Whole-image and serial-chunk workflow cache requests, plus the schema-version-2 chunk manifest, record
external-zyx-ants-xyz-v1and must match it before reuse.Fail-closed TIFF validation: TIFF geometry metadata is parsed with strict schema, numeric, finite, dimensional, and direction-matrix validation. A malformed, truncated, unsupported, or disguised semantic Cy-ExM marker is rejected. When no Cy-ExM marker is present, the documented zero-origin, supplied-spacing fallback is limited to an allowed grayscale ZYX, QYX, or singleton-Z layout; unrelated metadata may coexist with that fallback.
Source snapshot identity: whole-image and serial-chunk runs snapshot both inputs before either load and revalidate the same path, size, and nanosecond-mtime identities after loading and around every artifact reuse or commit. A changed source fails the run closed, including exceptional exits, and a just-promoted record is rejected if the source changed during commit.
Affine resume: the focused unit test proved that an affine artifact survives an injected nonlinear failure and is reused. The bounded real-library integration test
test_resume_reuses_affine_after_injected_nonlinear_failurealso passed.Chunk resume: the focused unit test
test_resume_reuses_completed_chunkpassed, proving a valid completed chunk is reused after a later chunk fails.Serial chunk scalar parity: scalar chunk output is reconstructed from each committed local warp using local histogram matching, float32 core extraction, and a single core stitch under
serial-chunk-local-histogram-match-core-stitch-v1. Fresh and resumed execution use the same policy; the whole-image path retains its distinctwhole-global-histogram-match-v1policy, and records from the earlier global-rematch behavior fail closed rather than being silently reused.Transform provenance chain:
transform_directory.ipynbvalidates affine, nonlinear, and optional fixed/moving crop records and then validates their complete chain before reading bounds, loading images, or applying transforms. The chain must agree on exact fixed and moving inputs, fixed geometry, immediate upstream artifact, round, crop, axis convention, XYZ pixel spacing, stage and role, and current fixed-image identity.Examples migrated: the exact inventory test passed for five parameterized scripts and six cleared notebooks. The all-files policy checks also confirmed that examples use Cy-ExM and contain no lab paths, external-source imports, Dask, SLURM, or YAML workflow configuration.
Forbidden dependencies and exports: executable audits confirmed that
cyexm.registrationdoes not exposeParallelChunkedImageRegistrationand that Cy-ExM declares no direct Dask, distributed, dask-jobqueue, or PyYAML dependency. The prescribed source search returned ten hits; inspection found only negative tests andAGENTS.mdpolicy text, with no runtime import or dependency.
The complete portable unit and bounded integration suites above supersede the earlier focused audit count; every focused import, thread, inventory, affine-resume, chunk-resume, geometry, TIFF, source-identity, scalar-parity, and provenance-chain test is included in the recorded 644-test result.
Deferred Phase 2 scope¶
YAML dataset manifests, Dask or distributed execution, SLURM orchestration, and parallel chunk registration remain deferred to a separately designed Phase 2. No placeholder implementation or runtime dependency for that scope was added in Phase 1.