Skip to content

G2: kernel modules spell no microscopy axis member - #1185

Merged
trissim merged 5 commits into
mainfrom
refactor/G2-derived-member-references
Oct 10, 2026
Merged

trissim merged 5 commits into
mainfrom
refactor/G2-derived-member-references

Conversation

@trissim

@trissim trissim commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Surface G2 (receipt): kernel modules no longer spell a microscopy axis member.

Census. At 66a0b30a0, kernel modules had 134 spellings of a microscopy axis name, collection key or multi-letter label in 22 files, as string literals, attributes or class fields. After this PR there is one: the Fiji slot's ImageJ "channel", which saved configs persist as FijiDimensionMode.CHANNEL. The guard pins it exactly.

What changed

  • The plate-file filter well is now partition (kernel query, MCP DTOs, services, dev client --partition). Synthetic-plate and compile-request wells are now partition_values (--partition-value). The runtime tree's partition node is PartitionProgressTreeNode (node_kind="partition").
  • NGFF axis types now come from the axis name in PolyStore 0.5.0. This is a lockstep change: Derive the NGFF axis type from the axis name (0.5.0) PolyStore#36, submodule pointer bumped, pin polystore>=0.5.0,<0.6. The Zarr projection leaves are named by role.
  • Fiji hyperstack coordinates are now ImageJ's c/z/t, iterated through one axes() helper. Progress declarations use progress_channel. Other renames: ColorToGray fixed_channels and numbered_channels, InvertForPrinting rgb_channels, ImagePlaneSource.colour_sample, SaveImages TIME/SLICE, PlatemapData.well_name. CellProfiler's Plate/Well tags are declared once in interop.
  • The MetaXpress experimental-analysis format modules move from openhcs/formats/ into processing/backends/experimental_analysis/. The domain allowlist loses one entry.

Guard. tests/unit/test_axis_family_guards.py::test_kernel_modules_spell_no_microscopy_member scans every module outside the domain allowlist and interop/ (the CellProfiler domain). The set of found spellings must equal the single pinned Fiji declaration. test_domain_allowlist_names_existing_domain_modules checks that every allowlist entry exists.

Witness. A new test_zarr_layout_follows_roles_and_ngff_types checks that the remote-sensing family's Zarr layout follows its roles. The end-to-end subprocess witness (no domain module loaded) still passes.

Minimal edits outside the kernel (coordination with U1). In openhcs/agent, only dto/plate.py, services/plate_inspection_service.py, services/plate_streaming_service.py and services/synthetic_plate_service.py changed: the field renames that PlateFileInventoryQuery.partition and SyntheticPlateGenerationParameters.partition_values force. Nothing in openhcs/pyqt_gui changed.

Durable state. Saved pipelines that set ImagePlaneSource(channel=…) or a non-default SaveImagesSeriesAxis no longer load. Both parameters were never read. Decision G2-Q1 in the index defaults to no cutover tool.

Handoffs (recorded in the receipt):

  • G7: well_filter/WellFilterConfig/owned_wells/total_wells identifiers.
  • U1: the plate view widget's coord_to_well, and component_filters.
  • P/P1: moving the consolidation, experimental-analysis and CellProfiler backend packages into domains/.

Verified locally: guards 10/10 (axis-family + dataset-source), witness 11/11, official30 parity 29/30 (baseline; cp_tutorial_3d_monolayer .pkl), test_main disk+zarr direct 6/6. Touched tests: 724 passed; the 18 failures also fail on origin/main in the same environment, apart from one flaky progress-tree test that passed on 3 reruns.

G2 · PR #1185 · guards 5/5 · production −294 +264 · tests −68 +198

🤖 Generated with Claude Code

trissim and others added 3 commits October 10, 2026 14:56
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every remaining kernel spelling of a microscopy axis (name, collection key,
multi-letter label) as a string literal, attribute or class field is now
asked of the family, declared by its external owner, or renamed for what
it is:

- MCP/kernel plate file filter well -> partition; synthetic plate and
  compile request wells -> partition_values; runtime-tree partition node.
- NGFF axis types derive from the axis name in PolyStore 0.5.0
  (lockstep); the Zarr projection leaves are named by role.
- Fiji hyperstack coordinates use ImageJ's c/z/t; slice labels derive
  from the dimension name.
- Progress streams declare progress_channel; ColorToGray fixed planes are
  fixed_channels; ImagePlaneSource.colour_sample; SaveImages TIME/SLICE;
  CellProfiler's Plate/Well metadata tags are declared once in interop.
- The MetaXpress experimental-analysis format modules move into their
  domain package; the domain allowlist loses formats/.

Guard: test_axis_family_guards finds zero kernel spellings besides the
Fiji slot's ImageJ "channel".

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

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.

trissim and others added 2 commits October 10, 2026 15:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trissim
trissim merged commit 89b8fdb into main Oct 10, 2026
1 of 4 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