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
[Sad Catapella B6][Scientific calibration] Reused OME-Zarr copies are not checked for numeric pixel-scale correctness #92
Sad Catapella Batch 6; pinned main commit d7a538e56d41ac1093ba79adcad397c21b3dfd32. Confirmed source-path omission, with a concrete metadata-only counterexample; end-to-end tests were not run. Distinct from #87 (integrity of converted pixel chunks) and #88 (channel labels).
Evidence
copy_units_current(), lines 538–545 reads multiscales[0].axes and compares only units and the proprietary unknown_scale marker. It never verifies datasets[0].coordinateTransformations (nor any higher-level scales).
run_experiment(), lines 550–559 uses this unit-only predicate to reuse a previously converted TIFF's OME-Zarr copy without reconversion.
Convert TIFF with X=Y=0.25 µm/pixel to an OME-Zarr copy; save successful run/manifest.
Edit .zattrsmultiscales[0].datasets[0].coordinateTransformations[0].scale X from 0.25 to 0.5, retaining axes[*].unit, unknown_scale, source TIFF and channel labels.
On an unchanged rerun with convert_tiffs=True, copy_units_current returns True, so the copy is reused with a false 0.5 µm/pixel scale.
Impact
Downstream physical distances, areas and speeds from the converted image can be wrong even though pixel data and histogram counts are correct. Particularly important because MorphoBricks downstream bricks use calibration for spatial features.
Fix / acceptance criteria
Have the copy validation compare the effective numeric scale on level 0 for every known physical axis to the source PhysicalSizes with an explicit tolerance policy, and validate expected scale factor 2^level on X/Y in all pyramid levels. Respect/verify unknown_scale markers; reject missing/nonfinite/misordered/incorrect transformations instead of guessing. Consider a cryptographic metadata fingerprint/generation marker as part of #87, but do not rely on unit equality. Add altered level-0 and level-1 scale fixtures, unknown units, valid times, mixed X/Y units and no-change control. No Numba role; metadata validation is low-cost.
Obsolete in v0.4.0: convert_tiffs, zarr_export and OME-Zarr copy reuse were removed in PP-2 (#66, commit 3c2802d; plan question 46). Named-axis copies of images with axis errors are now the OME-TIFF convert step (PP-11, #124, merged as 8db1f4a). Closing as not planned (owner-approved triage, 2026-11-02).
PP-11's reuse compares the recorded pixel sizes and which sizes are unknown before reusing a copy.
Reopening: an independent review of commit 8db1f4a found the closure premature. The planned pixel sizes are compared exactly (value, unit, source), but the persisted copy's calibration is only protected by size + mtime, and _plan() compares only the keys of unknown_sizes, not their recorded reasons. Fix: the copy's content hash (#87) covers the written calibration; compare unknown_sizes fully. Tracked in PR PP-11c.
Activity
Review PP-11: check a copy's recorded scales before reusing it
guijacquemet commentedon Nov 2, 2026
Obsolete in v0.4.0:
convert_tiffs,zarr_exportand OME-Zarr copy reuse were removed in PP-2 (#66, commit 3c2802d; plan question 46). Named-axis copies of images with axis errors are now the OME-TIFFconvertstep (PP-11, #124, merged as 8db1f4a). Closing as not planned (owner-approved triage, 2026-11-02).PP-11's reuse compares the recorded pixel sizes and which sizes are unknown before reusing a copy.
Generated by Claude Code
guijacquemet commentedon Nov 2, 2026
Reopening: an independent review of commit 8db1f4a found the closure premature. The planned pixel sizes are compared exactly (value, unit, source), but the persisted copy's calibration is only protected by size + mtime, and
_plan()compares only the keys ofunknown_sizes, not their recorded reasons. Fix: the copy's content hash (#87) covers the written calibration; compareunknown_sizesfully. Tracked in PR PP-11c.Generated by Claude Code
PP-11c: conversion integrity (copy SHA-256, one metadata epoch, exact…
guijacquemet commentedon Nov 2, 2026
Fixed by PR #126, merged as 6ac81ad (fix commit 4312b5a). I checked in the code before closing:
same_plan()comparesunknown_sizesin full, roles and reasons (tuple(sorted(items))), where before it compared only the keys.review_conversionand byRunInputs.open.Generated by Claude Code