Skip to content

B1: Store and folder inputs #135

Backlog
Backlog

Description

@Claptar

Part of #149.

wave 1 · 0.17.11 · size M · starts after: B0 (both edit storage/__init__.py)

Goal. What a store or a folder of outputs holds outside itself never reaches an output, and convert checks every input and its disk before writing.

Owns: storage/__init__.py (the HDF5 guard and copy_path), commands/convert.py, conversion/xenium.py, util/path.py

Approach:

  • Zarr links: datalad, git-annex and DVC stores are all symlinks, so links are read through, as anndata reads them. A copy never turns a link into a regular file outside an element, and never walks out of the store. Decided in this batch, with the trade-off in the PR.
  • The HDF5 guard's remaining gaps are closed (details in the PR once released).
  • convert runs the HDF5 guard on the source and --raw before any sniffer opens them, and passes every input, --raw included, to check_output.
  • Free space for folder sources, estimated from the converter's matrix and table files.
  • Xenium reads its analysis tables inside staging, after the checks, and removes what it unpacked in a finally. Other finalizer-based cleanups are audited at the same time.
  • A 10x-mtx output inside a Zarr input is refused by the shared check.

Findings

Ref Sev Finding Where
F166 M convert sniffs a file's format before the HDF5 guard runs commands/convert.py:59
F167 M An output naming CellBender's --raw input replaces it (exit 0) commands/convert.py:74
F168 M convert never checks free space for folder sources (Visium, Xenium, MTX, Parse -> .h5ad) commands/convert.py:95
F169 M Xenium unpacks analysis.tar.gz while planning, before the output check, and leaves .adata-xenium-* behind on a refusal or a failed run cli.py:1836, conversion/xenium.py:167
F170 M Some HDF5 object references escape the 0.17.5 guard storage/__init__.py:348
F171 M The HDF5 guard's memory is not bounded on a crafted file storage/__init__.py:349
F172 M Symlinks inside an input .zarr are followed: a linked-out file is copied into import's output, and convert reads a linked-out chunk storage/__init__.py:1783
F173 L A 10x-mtx output inside a Zarr input is written, never reaching check_output commands/convert.py:73

Done when one PR on fix/b1 closes this, with a regression test against an oracle for every finding, and docs and changelog in the same PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions