Skip to content

Port to the siblings' current mains, and the agent benchmark's projection task fix - #1374

Merged
trissim merged 28 commits into
mainfrom
port/siblings-latest
Nov 22, 2026
Merged

trissim merged 28 commits into
mainfrom
port/siblings-latest

Conversation

@trissim

@trissim trissim commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Merges port/siblings-latest (28 commits, 232 files) into main.

What it holds, in order:

  • 2026-11-17: structural repairs (benchmark imports, AbstractStep lazy config defaults, shared threshold backend bases, MethodKeyedStrategy ordering, runtime NameErrors).
  • 2026-11-22: the port to the siblings' current mains (arraybridge 0.5 devices, objectstate's global config holder, tests in the siblings' names), plain TIFF folders without Java, run says why a stage failed.
  • 2026-11-22: the agent benchmark: a task is written so a check can read it, built by its id, has its own command.
  • Last commit 695fcfc2: the projection task's planes are written as images and its answer is the one plane the projection leaves (the planes were bare rows, so six planes assembled to a (6,6) array that OpenHCS refuses as an image payload).

Why now: pm-trainer-e's practice parts for the agent benchmark's OpenHCS kinds were played on this branch, and their host check asks the library to build the task and look at its planes, so the library the parts were played on needs to be the one on main.

Merged with a merge commit so the hashes the parts recorded (695fcfc2 and its ancestors) stay ancestors of main.

Maintainer instruction to merge: Tristan, bus message 32383 (5f618fde8035), "you need to merge, you're dash dash admin".

🤖 Generated with Claude Code

https://claude.ai/code/session_016gZLdxS38RuoZjQTydVqFS

Module moves left benchmark/ importing names from their old homes:
measurement markers and the row-identity contract now live in
measurement_declarations; ComponentGroupScope, AliasProperty and
PartitionFilterProcessor moved out of axis_declarations/pipeline_config.
The smoke job's test_agent_observation_export_zmq died importing
benchmark.adapters.cellprofiler on this chain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
7a012ae called the eight Lazy* step configs phantom and replaced their
defaults with None. They are real: pipeline_config generates them at
runtime, so grep finds no class line. The None default for
source_bindings then failed AbstractStep's own isinstance check, so every
FunctionStep built without explicit bindings raised TypeError. That broke
all 7 smoke tests. The original NameError came from the missing import,
not from missing classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
bc15c96 pulled CellCountMeasurementFields out as a plain @DataClass
shared by mutable CellCountResult and frozen CellCountMeasurementRow.
Python rejects a frozen dataclass inheriting a non-frozen one, so
cell_counting_cpu failed to import and took function registry
preparation down with it, which is why every set_dataset_pipeline in
smoke was rejected. Nothing assigns to these fields after construction,
so the base and CellCountResult are now frozen too.

29c3d7a deleted the Session.invoke forwarder; the benchmark session
runner still called it. It now calls operation.invoke(session, request).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
e009fc2 removed slots=True from 91 dataclasses on the claim that
slots calls get_type_hints() and raises NameError on forward refs.
dataclass(slots=True) does not call get_type_hints(). What slots did do
was make the field `data` a slot descriptor that overrides the inherited
abstract `data` property. Without it the annotation alone leaves the
abstract property in place, so PlainImagePayload, ImageMetadataPayload
and MaskedImagePayload became abstract. Every ImagePayload.of() raised,
and function-registry preparation failed with it. A scan of all 91 finds
exactly these three; they get slots=True back and import cleanly.

29c3d7a also deleted the Session.view forwarder; the benchmark runner
now calls DatasetListView.state_of(session).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
47fcfbf deleted core.materialization.presets and
materialize_segmentation_masks; these three pipelines (and the BBBC021/022
nuclei pipelines that import them) failed at import. Their CSV output is now
MaterializationSpec(CsvOptions(fields=...)); analysis_type went with the old
preset API. The mask output is MaterializationSpec(ROIOptions()), which is
cell_counting_cpu's own segmentation_masks spec.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
…hain

f6e76e7 made CentrosomeNumpyThresholdPrimitiveBackendStrategy a subclass
of the Numba strategy to reuse its primitives. That also handed it
NumbaNumpyDefaultBackend.is_default_backend = True, since the Centrosome
mixin never sets that flag. Two numpy defaults then registered, and
DefaultBackendSelection raised during function-registry preparation.
Every pipeline in smoke was rejected because of it.

The primitives now live on NumpyThresholdPrimitives, which declares no
memory type and so is never registered. Numba and Centrosome are siblings
that each add only their provider mixin, the same shape morphology and
watershed already use. The registry has one numpy default (Numba);
Centrosome is non-default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
NativeSecondaryPropagationBackendStrategy subclassed the Numba strategy and
inherited is_default_backend = True from NumbaNumpyDefaultBackend: a second
numpy default, the same bug as the threshold family. The propagation code
moves to NumpySecondaryPropagation (no memory type, unregistered); Numba and
Native are siblings. A sweep of all 26 CellProfiler strategy families now
finds no memory type with more than one default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
1047d57 extracted MethodKeyedStrategy (__enum_member_attr__ = "method")
but every family listed it after EnumKeyedStrategyMixin, whose own
__enum_member_attr__ = "strategy_key" then wins in the MRO. No strategy
declares strategy_key, so every concrete strategy was skipped as keyless
and these 16 registries came out empty. FeatureOperationStrategy
raised KeyError: 'Enhance' during function-registry preparation, which
rejected every pipeline in smoke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
98cbd69 deleted SourceSpatialDomainAdapter.for_value's bare-ndarray
branch as dead. It only looked dead because PlainImagePayload had been
abstract since e009fc2. Object-label relationships pass raw label arrays
(identify_tertiary_objects -> object_label_parent_child_payload), so
registry preparation raised "requires a registered nominal adapter for
ndarray".

The branch comes back as the decoder boundary. A local import of
PlainImagePayload would hide a cycle, since runtime_image_values imports
this module. So the family resolves its own member instead:
BareArraySourceSpatialDomainAdapter declares adapts_bare_arrays, and
for_value finds it through subclasses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
362ff2b extracted _validate_context_matches_source but inserted the new
def directly after adopt_compiled_execution's docstring. adopt became a
docstring-only method returning None, and its body became the tail of the
validator. Every compiled run then raised "'NoneType' object has no
attribute 'execution_id'" in _initialize_orchestrator. That was all 6
smoke failures on 6e65855.

The validator now sits after adopt, which ends in `return self` again. An
AST scan of openhcs finds no other non-abstract docstring-only method with
a return annotation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
function_runtime.py:720 read `request.source_binding_plan` inside
PatternGroupExecutionRequest.load_input_stack, where the request is
`self`. Any step with no producer records hit a NameError there.

viewer_protocol.py uses zmq.Context, zmq.REQ and zmq.ZMQError but never
imported zmq. The except tuple at :1837 is only evaluated when an exception
is already in flight, so a real viewer-launch error became a NameError
that hid it.

A ruff F821 scan filtered to runtime-evaluated names (not postponed
annotations) leaves only pipeline_config's runtime-generated Lazy* and
global_pipeline_config globals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
18d0634 removed "annotation-only" imports, but python_introspect's
project_dataclass / validate_annotated_dataclass call get_type_hints()
on these classes at runtime. BundleExecutionRequest and
WorkerLaneExecutionContext lost seven names, so every compiled run raised
"name 'CompiledExecutionBundle' is not defined".

A scan of every dataclass python_introspect resolves (project_dataclass /
validate_annotated_dataclass targets, including self-validating
__post_init__) finds only these seven. Restoring all 274 removed
dataclass-annotation imports instead re-closes import cycles: 261 modules
failed to import. With just these seven, an import of every openhcs module
shows only the 12 torch-only backends missing, and get_type_hints resolves
both classes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
SourceFilterClause.__post_init__ calls
self.match_type.normalize_clause_value(self), and match_type holds the
match-type class, not an instance. As an instance method the clause was
bound as `self`, so every SourceFilterClause raised "missing 1 required
positional argument: 'clause'". Importing openhcs.mcp.installed_demo
already failed this way. The base method and TextMatchType's override are
now classmethods; `matches` already was one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
18d0634 removed 285 "annotation-only" imports. Dataclass field
annotations are resolved at runtime by get_type_hints (python_introspect
projection, codecs, the metadata writer), so smoke kept failing one name at
a time: CompiledExecutionBundle, then SourceProjectionRole.

For every undefined name in a dataclass field annotation, this restores the
exact import 18d0634 removed from that file (or the name's unique
definition), but only when a static module-level import graph shows the
target cannot reach the importing module: 194 names in 74 files. The 18
that would close a cycle are left for declaration moves. Restoring all of
them broke 261 modules. An import of every openhcs module now fails only
on the 11 torch-only backends.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLduzEngvw2qQf1Qx8mC
…e planner speaks arraybridge devices

Work in progress. OpenHCS dropped the caps on its sibling packages on 16 November
and never followed them: arraybridge 0.5 removed MEMORY_TYPE_*, the CPU/GPU sets,
array_operations and integer gpu ids. This moves the bundled copies under external/
to each sibling's latest main and ports the first two owners:

- FrameworkDeviceAssignment.device_for answers an arraybridge Device (main memory
  for a library with no accelerators); a binding keeps its integer index and
  says its device.
- A compiled invocation carries input_device and execution_device.

Not yet ported: the payload module, the processors' ArrayOperations, constants
re-exports, the objectstate, ui-theme and pyqt-reactive names.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
…idge 0.5

Every call OpenHCS made on a MemoryType goes to its library; integer gpu ids
that crossed into arraybridge are Device values (main memory is HOST); the
removed MEMORY_TYPE_* and CPU/GPU sets are gone from openhcs.constants, with
their four users asking MemoryType or the library; the processors take an
ArrayLibrary where they took ArrayOperations. Work in progress: not yet run.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
…e or saved by name

objectstate 4 removed ensure_global_config_context, set_global_config_for_editing,
get_current_global_config and rebuild_lazy_config_with_new_global_reference. Each
call now names what it meant: set the process's global config, read the live one,
or read the saved one (the plate inspector asked for saved). The benchmark's
'rebuild' was a copy plus that same set; a lazy config reads the one global at
resolution, so the copy is gone.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
Four callers stacked or unstacked with a bare 0 where arraybridge now takes a
Device. unplanned_device(memory_type) in openhcs.core.memory owns the answer:
main memory, or the first accelerator of a library that has them, which is what
the integer meant.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
…ed global config

MemoryType.X.library carries the array operations, a placement is a Device value
(HOST, AcceleratorDevice(n)), a child's environment is ArrayLibrary.child_environment,
and the global config is set, read live or saved, and forgotten through objectstate's
own functions. Fakes patch the library class that owns the method (on_every_library).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
…ort/siblings-latest

# Conflicts:
#	openhcs/core/payload/runtime_image_values.py
…that only running shows

pyproject names the sibling releases this code runs on (arraybridge 0.5.2, objectstate
5.0.1, formbridge 0.2.1, ...): a stale environment now fails at install, not at import.

formbridge's dispatcher shuts down with close_dispatch (close is the widget's): the MCP
server listed its tools and then died stopping. Six call sites.

MeasurementSparseColumnarRows had fields and a __post_init__ and no @DataClass, so it took
no arguments. ProducedImageStack lost slots=True, so its memory_type field ran into the
image payload's read-only property; its parent is a slots dataclass and its __post_init__
already spells super() the way slots needs.

Two tests named modules by their pre-move paths; one read the saved global config through
the live reader.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
…y says

GroupingDeclaration's docstring declares it ("a declaration's boundary name is its JSON
spelling") and the family decodes it (AxisFamily.grouping_named), but nothing told the
serializer. Axis classes share AutoRegisterMeta with the registered families and hold no
registry key, so python-introspect asked Site for a __registry_key__ it never had and
every pipeline run died on its first axis.

Seen: test_count_cells_simple_dual_channel (a two-well synthetic plate through the
execution server) and the callable-authoring page's code blocks, 2 passed. The page
imported runtime_stores from its pre-move package.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
…n; teach live names in the source-binding docs

- BioFormatsJavaAdapter.discover_stores asked for the Java context before
  looking at any file, so an install without the bioformats extra could not
  open a folder of plain TIFFs. The context is now asked for only by a path
  that needs Java, through the conversion _declares_path already owned.
- dev_client_session.run_source unpacked the scope ids add_datasets returned;
  a resident session that already holds the folder adds nothing, and the
  ValueError was reported as a transport failure. The run now finds the
  dataset by its root.
- image_sources.rst and quick_start.rst taught enum members that became
  classes (SourceFilterSubject.FILE, SourceFilterMatchType.EQUALS,
  MetadataSource.FILE_NAME, InputSource.PIPELINE_START). Their code blocks
  now run.
- test_source_binding_path_admission read two files at paths they moved from.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
A failed initialize or compile printed its status and nothing else: the reason
is published as a session event, which run_source read while waiting and threw
away. Each stage now says where its failure is explained: initialize and compile
put the events since the stage started into the journey, and a finished run's
error is printed from its dataset row, which already carried it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
python -m benchmark.agent_validation check TASK_ROOT reads the one output
plate beside a blind task's inputs, takes each case's planes by the site
OpenHCS's own plane filenames give, and makes the task's held-out assertions
on them: one JSON line an assertion, exit 0 only when every one passes. A
case is a site in one place now, where inputs are written and results read.

It reads image planes, so the two number tasks and the table task fail here
until their results have a plane to be read from.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
build-task TASK_ROOT --pick N writes one blind task whose result is image
planes: of those, in declaration order, the one N lands on. Whoever runs
attempts picks by number and keeps no list of this benchmark's tasks.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
A runner that owns one task and how it is done names the task; a position in
declaration order was a second copy of that order. build-task takes the id and
refuses one whose result is not checked as a plate, naming those that are.
openhcs-agent-validation is the benchmark's command on PATH.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
stack_axis wrote each plane as a bare row (6,), so six planes assembled to a (6,6)
array, and OpenHCS refuses an image payload with no leading plane axis
(runtime_image_values.py: _leading_plane_count). A plane is written at least 2-D, and the
task's answer is the one plane the projection leaves, (1, 6). The registry's own
max_projection now passes the benchmark's check on the declared source.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016gZLdxTa9e8d6J4PvBWMM9
@trissim
trissim merged commit 9404325 into main Nov 22, 2026
2 of 5 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