Skip to content

Expose same-run primary segmentation diagnostic artifacts (#214) - #215

Merged
trissim merged 13 commits into
mainfrom
feat/primary-segmentation-diagnostics-20260929
Sep 30, 2026
Merged

trissim merged 13 commits into
mainfrom
feat/primary-segmentation-diagnostics-20260929

Conversation

@trissim

@trissim trissim commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

References #214: expose threshold support, initial components, exact declump response/maxima/markers, and canonical unedited/small-removed filter evidence from the same IdentifyPrimaryObjects execution.

  • Extend the actual operation; no replacement segmentation or standalone approximate rerun.
  • Derive seven typed QA image sidecars and their ABI slot types from PrimaryObjectDiagnosticPlanes, using the existing CellProfiler module output hook and artifact path.
  • Preserve ordinary image/measurement/object values, main-flow dtype conversion and one primary object output. Diagnostic image projections do not become secondary seeds or measurement subjects.
  • Carry exact source/producer/coordinate relations. Decode validity once; share source masks and canonical variant arrays. Two pre-transform snapshots protect threshold/component stage identity.
  • Wholly invalid masks and float32 NaN response indicate declumping was not executed (disabled or empty foreground). One shared invalid mask and ON_DEMAND sidecars keep evidence and automatic viewer layers bounded.

Ownership / focused anti-pattern checks

Actual new source checks cover IMPL-1/2/3/7, MEMB-1/3, BOUND-1/2/7 and exact IDEN-5/6 relations. Evidence states own behavior through an ABC, the typed record owns stage membership/order/types, and existing ObjectLabelPayload owns variants. No additional registry, hand-maintained stage catalog, raw-key decoder, fallback reader or debug store.

The actual projection accepts a new nominal record field without catalog/dispatcher changes. A real new stage needs its field and same-run producer argument; names and ABI types derive automatically. The actual AST algorithm comparison against a0263e8 passes. Scope is focused new diagnostics + IPO capture points and their owners, not a full NRA audit.

Executed validation

  • Verified imports from the isolated worktree and all eight recorded submodule source paths using /home/ts/code/projects/openhcs/.venv/bin/python, overriding the shared environment's clean installed default source authority.
  • 9 lightweight tests passed in 1.76s: exact array/variant ownership, source placement, unexecuted masks/shared allocation/float32 response, on-demand non-main-flow artifact relations, annotation-derived slots, new-case extension, focused AST guards and unchanged segmentation body; actual image-output contextualizer and existing PURE_2D multi-plane aggregator included. Small typed-pickle roundtrip passes, not a substitute for persisted MCP/result review.
  • Two unrelated async pytest config warnings with plugin autoload disabled.
  • Three existing direct-call test files migrated to accept the appended diagnostic positions without changing their label/threshold assertions. The IPO-specific executor fixture now derives diagnostic specs from their typed owner without altering adapter bindings or production adapter source; its native test remains unrun.
  • Latest main 283b21275 merged normally into this feature branch as e6b2addc8; no rebase/reset/force push or installed package/skill changes.

Remaining acceptance (issue deliberately not closed)

Prepared native synthetic tests are not run. Current main requires a locally built _granularity_reconstruct extension before IPO imports in this new worktree. No native build, algorithm run, MCP, JVM or GUI started while the serialized slot is reserved.

After the parent's explicit handoff and nonblocking validation-lock/resource guard: build only the worktree extension; verify real registered IPO (empty/unclumping-disabled/watershed-disabled/intensity/shape), normal compiled runtime with stable secondary binding, persisted result review, fresh MCP discovery, and same-coordinate raw/intermediate/final viewer inspection on an allocated isolated display. Metadata checks are not live or biological acceptance.

Core artifact/runtime/adapter implementation files owned by Zeno are unchanged. The narrow IPO fixture migration had no conflicting edits in PR #205 or Zeno's worktree at the scope check. Shared implementation changes still require direct coordination; independent source work needs no comms route. Parent's #151/#212 is merged/installed; Confucius owns the current heavy slot and the installed package/skill is frozen. No competing native startup or installed baseline changes.

Independent #138 bootstrap work remains visible in draft #207, now with the independent MI correction at bd164a94f (53 provider-free tests and Python3.9 standalone diamond evidence); authorized bounded fresh environment/native acceptance still awaits the serialized slot.

Detailed receipt: docs/plans/primary_segmentation_diagnostics_checkpoint_20260929.md.

@trissim

trissim commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Parent now owns the remaining integration/native acceptance of this existing diagnostic feature; original author worktree is preserved, no competing implementation. Refreshed review at c4b7dc0: diagnostics derive stage names/ABI slots from PrimaryObjectDiagnosticPlanes and retain original ObjectLabelPayload variant identity. Read-only merge-tree against current mainc42d is conflict-free (tree6111f497), but that is not behavioral proof or a reason to skip IPO/compiled persistence checks. Current main includes declared-kernel preparation and renamed native extension, so historical missing _granularity_reconstruct is not the current acceptance boundary. A fresh context-isolated scientific author now owns the single native slot and installed c42d freeze; no install or shared primary_objects.py change during it. Next finite acceptance is coherent current-main source + actual IPO diagnostics/compiled main-flow/secondary-seed/persistence journey after author cleanup, preserving original source/reference boundaries. This PR stays visible/open until actual affected live path is proved; no full NRA or biological claim from source review.

@trissim

trissim commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Current-main checkpoint is now published in this existing PR at 1bc80d6 (normal main merge 3048eda; no rebase or force push). Both native extensions built locally via standard setup.py, without installation or copied binaries. Nine actual payload/ownership cases PASS in 1.26s against the integrated source, including same-source variant/coordinate identity, existing contextualization/aggregation, unexecuted masks, declaration-derived stage ABI and algorithm preservation. Original missing-extension collection failure is retained. Authoritative RST: docs/validation/primary_diagnostics_current_main_20260930.rst. Installed c42d and managed skill remain frozen for the resumed blind author. Actual registered IPO/compiled secondary identity/persisted sidecar/MCP-viewer acceptance still pending; this source checkpoint does not close issue214, establish full NRA compliance, or claim biological accuracy. Parent remains sole integration owner; no optional hosted CI wait after local/live acceptance.

@trissim

trissim commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Published the parent integration checkpoint on this existing PR (97195b9), including a normal merge of current main 616be7c. The real synthetic PipelineDocument → compile → execute → persist journey exposed a filename collision: all diagnostic stages defaulted to the same source-image name. Each stage now declares artifact-name TIFF materialization through the existing declaration-owned mechanism; no duplicate writer or registry. Native acceptance: 15 passing cases, including five registered IPO modes, all seven distinct TIFFs checked against their projected runtime pixels, canonical label variants, source address/pixel contributors, and primary-to-secondary seed identity. Original failed receipts are preserved. Packaged structural ratchet against current main completed successfully. Installed MCP/viewer acceptance remains pending; this is not a merge, installed-readiness, biological-QA or full-NRA claim. Hosted CI is not a waiting gate.

@trissim

trissim commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Integration checkpoint: the real installed MCP journey now reopens raw input, the persisted threshold-support TIFF selected as a result, and primary ROI archive on isolated display :91. I personally opened matched raw-only, result-only, combined and diagnostic-only captures; technical source alignment and visibility pass, not biological segmentation acceptance. Two earlier live failures exposed missing source publication for memory-main steps and source bindings dropped by result inventory selection; both are fixed through the existing metadata/source projection authorities. The metadata targets form an AutoRegisterMeta family with MI for shared produced-image behavior; legacy constructors and consumer rosters were deleted. Current main #289 is normally integrated. 171 focused/native cases pass in 22.22s; the original packaged structural guard passes 5155 metrics with no positive deltas. Failed runs and original guard failure remain retained. Durable source receipt: docs/validation/primary_diagnostics_current_main_20260930.rst. Merging this tested checkpoint without waiting for optional hosted CI, then activating integrated main for final installed confirmation.

@trissim
trissim marked this pull request as ready for review September 30, 2026 17:07
@trissim
trissim merged commit 992a479 into main Sep 30, 2026
1 of 3 checks passed
@trissim

trissim commented Sep 30, 2026

Copy link
Copy Markdown
Collaborator Author

Delivery closure: #215 is merged, remote main 992a479 independently verified and activated in the existing editable installation by normal fast-forward. Fresh installed MCP health plus raw and a different saved seed-marker result reopening pass on the isolated display; capture personally opened, owned viewer/server closed normally and endpoints released. No dependency/skill/Fiji changes. The concurrent main #291 manifest optimization was also checked through ordinary imports: 101 cases pass, 2 fail in 9.93s. Both failures exactly reproduce the independently recorded unchanged-main failures already retained by #291; they are not counted as passing. All native diagnostic journey cases pass. Earlier installed matched raw/result/combined/diagnostic captures remain preserved. This closes technical diagnostic delivery, not biological segmentation acceptance. A distinct fresh-context blind development repeat is assigned on the frozen merged harness; earlier abstentions and held-out boundaries remain unchanged.

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