You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Audit/Correctness] XY-ordered mask headers pass preflight but fail read_mask #68
_known_axes accepts both YX and XY because it checks membership and uniqueness, not plane order.
_header_issues then accepts an XY mask if the image's physical Y/X sizes match by role; mask_size_issues similarly compares sizes by the declared roles.
read_mask preserves the pixel plane's axis order, then unconditionally requires axes == 'YX'. Thus an accepted XY mask cannot be read.
A preflight and histogram run can accept and record masks that the public reader and optional mask relationship scan later refuse. This violates the input contract's intent that accepted named axes are usable; it gives late failures rather than a clear preflight diagnosis.
Fix / acceptance
Choose and document one policy explicitly: (a) if masks are never reordered, reject XY (and any non-YX retained order) in mask header validation with a named error, or (b) transpose the selected pixel plane to YX in a documented, audited reader. Do not silently reorder. Add XY and XY-with-T/Z fixtures testing preflight, run and read agreement and non-square shapes.
Classification: confirmed source-level contract inconsistency; actual fixture execution still needed.
A mask whose header stores X before Y is now refused at preflight with mask_layout ("X is stored before Y"), so preflight and the reader agree. The fix came in PP-5 (88a14b8, #111) and PP-8b (#115):
the check is in masks/stated.py:86-88;
mask_checks.py:118-134 keeps the refusal;
the regression test is tests/test_masks_v040.py:195.
Closing as completed (owner-approved triage, 2026-11-02).
Activity
guijacquemet commentedon Nov 2, 2026
Fixed in v0.4.0.
A mask whose header stores X before Y is now refused at preflight with
mask_layout("X is stored before Y"), so preflight and the reader agree. The fix came in PP-5 (88a14b8, #111) and PP-8b (#115):masks/stated.py:86-88;mask_checks.py:118-134keeps the refusal;tests/test_masks_v040.py:195.Closing as completed (owner-approved triage, 2026-11-02).
Generated by Claude Code