Skip to content

Drop the run-level cell count and read acquisitions from the registry - #32

Merged
peter-grotz merged 3 commits into
devfrom
fix/packaging-count
Sep 23, 2026
Merged

peter-grotz merged 3 commits into
devfrom
fix/packaging-count

Conversation

@peter-grotz

@peter-grotz peter-grotz commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

No run-level cell count. Every asset is a single cell, so cells_packaged said nothing about the asset it sat in. build_packaging_process no longer takes cell_count.

package_cells still takes a factory, now Callable[[datetime], DataProcess], because the second defect stands on its own: end_date_time was stamped before any packaging ran, so the recorded interval excluded the work. Cells are resolved first, then the record is built with the real finish time.

Acquisitions resolve from the registry. New acquisition.py walks DocDB v2 → v1 → S3, matching default_sources, and writes the document to a file for the ANTs API. docdb_fetcher and s3_fetcher are generalised from data_description to any core field.

Verified live: 826509 and 794492 both resolve from DocDB v1 with axes present; neither is in v2.

169 tests, 100% coverage.

build_packaging_process was called before package_cells with
cell_count=0, and the record was embedded verbatim in every cell, so
every processing.json claimed zero cells packaged. Its end_date_time was
also stamped before any packaging work ran.

package_cells now resolves every cell before writing any, then builds
the record from the resulting count and the actual finish time. It takes
a factory rather than a record because neither value is known at the
call site.
Every asset is a single cell, so recording how many cells the run
produced says nothing about the asset it sits in. build_packaging_process
no longer takes cell_count and package_cells' factory needs only the
finish time, which remains necessary so the record does not claim to have
finished before the work ran.

The acquisition now resolves DocDB v2 -> v1 -> S3, matching
default_sources, with a staged copy only as a last resort. The registry
holds what the indexer published; a mounted bundle may carry a stale copy
or none. check_orientation reads the axes from it, so a wrong one
mis-registers every cell without failing. Both fetchers are generalised
to any core field.
@peter-grotz peter-grotz changed the title Record the real cell count and finish time for packaging Drop the run-level cell count and read acquisitions from the registry Sep 23, 2026
Packaging hardlinks reconstructions and writes metadata; the SWCs that
come out are byte-identical to the ones that go in. A DataProcess for it
describes assembling the asset rather than producing the data, in a
document meant for the latter.

Where the parent metadata came from stays on DataDescription.tags, which
is indexed and so searchable, unlike output_parameters. Removing the
step also removes the need for the finish-time factory, so package_cells
returns to a single pass.
@peter-grotz
peter-grotz merged commit dbfbb65 into dev Sep 23, 2026
0 of 3 checks passed
@peter-grotz
peter-grotz deleted the fix/packaging-count branch September 23, 2026 17:24
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.

1 participant