Skip to content

List and report disk-passthrough saves as zarr backend files - #34

Merged
trissim merged 3 commits into
mainfrom
fix/zarr-list-passthrough-saves
Oct 10, 2026
Merged

trissim merged 3 commits into
mainfrom
fix/zarr-list-passthrough-saves

Conversation

@trissim

@trissim trissim commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Cause

ZarrStorageBackend stores .json/.csv/.txt/.roi.zip/.zip outputs through the disk backend. save(), load(), exists() and delete() already follow those files. list_files() and is_dir() only looked inside the zarr store, so the backend that wrote a directory of CSV tables and ROI archives then said that directory was missing and empty.

In OpenHCS this made zarr-mode result-only directories (results/, published on purpose since OpenHCS #134) fail publication. The step-time check (exists) admitted the directory and wrote an empty projection entry. The completion check (is_dir + list_files) then skipped writing its header fields, so openhcs_metadata.json ended up with a results entry that had no image_files, available_backends or microscope_handler_name.

Fix

  • list_files() also returns the passthrough files saved in the directory, filtered the same way as array outputs and never including the store's own metadata files (zarr.json, .zgroup, …). A directory that holds only passthrough saves is listed without opening a zarr store.
  • is_dir() is true for a directory that holds passthrough saves.

Tests

Two regression tests in tests/test_zarr_backend.py. Full suite: 591 passed, 2 skipped.

Consumed by the OpenHCS B2 PR (submodule bump).

🤖 Generated with Claude Code

ZarrStorageBackend saves .json/.csv/.txt/.roi.zip/.zip outputs through the
disk backend, and exists() already answers for them, but list_files() and
is_dir() only looked inside the zarr store. A directory holding only such
saves (for example a result directory of CSV tables and ROI archives) was
therefore reported as missing and empty by the backend that wrote it.

list_files() now includes passthrough files beside the arrays (never the
store's own metadata files), and is_dir() is true for a directory holding
passthrough saves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

delete() kept its own extension list (.json/.csv/.txt) instead of the
declared DISK_PASSTHROUGH_EXTENSIONS, so .roi.zip and .zip files this
backend saved on disk were opened as zarr groups and failed to delete.
Re-running a pipeline over existing zarr-mode outputs therefore failed when
it replaced a saved ROI archive.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim merged commit 1e5e672 into main Oct 10, 2026
11 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.

2 participants