Skip to content

Admit viewer reuse inside atomic acquisition without restarting external viewers - #7

Merged
trissim merged 2 commits into
mainfrom
fix/viewer-acquisition-admission-20260929
Sep 30, 2026
Merged

trissim merged 2 commits into
mainfrom
fix/viewer-acquisition-admission-20260929

Conversation

@trissim

@trissim trissim commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Paired backend correction for OpenHCS PR159/issue135 and its independent review:
OpenHCSDev/openhcs#159 (comment)

ViewerStateManager remains the only viewer registry and atomic acquisition owner.
An application-owned nominal ViewerReuseAdmissionABC now admits a healthy
existing instance under its lock, before returning it. The generic declaration
requires only the existing health contract; OpenHCS always supplies its concrete
process-launch admission. There is no viewer-kind switch, second cache, callback
policy predicate or acquisition pre-check.

Rejection leaves the existing viewer registered, running and unchanged. It does
not silently replace it or kill a process. A factory returning an already-live
external lifecycle is registered without calling start; callers retain the
existing readiness check. Ordinary new/stale acquisitions still start normally.

Evidence and limits

  • Six focused provider-free viewer-state tests pass in0.04s.
  • A second thread cannot acquire the manager lock while admission executes.
  • Rejected reuse invokes no factory/restart/stop and preserves the existing entry.
  • External attachment is registered without start; original startup-failure,
    force-stop, readiness and subscription cases remain passing.
  • Paired OpenHCS source journey:14 focused lifecycle/process-launch tests pass
    in4.84s, exercising real atomic acquisition for Napari and Fiji. Physical
    process/network operations are controlled in those tests, not live readiness.
  • After normal current-main integration,50 OpenHCS lifecycle/Fiji/control and real
    data/control socket tests pass in5.34s (57 deselected); no GUI/JVM started.
  • Source base1d3b32f; independent waiter PR6 edits disjoint files. No source merge,
    package installation or active blind runtime mutation has occurred.

Fresh actual viewer/MCP acceptance is pending the current frozen blind run's
released runtime slot. This draft does not claim all concurrent fresh/release
races or foreign endpoint shutdown authority are solved.

@trissim

trissim commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

Parent paired integration checkpoint: normally merged main3374aa8 into existing PR7, exact2c68a114.26 viewer-state/ACK/progress source cases PASS2.61s. Installed this reviewed source with paired OpenHCS159, offline in the existing venv; real fresh MCP stream/state/screenshot on isolated:88/5794 works with actual loopback data/control listeners. Second fresh MCP successfully externally attaches, streams and captures; exposed close succeeds, owned PID/listeners independently gone.113 paired final installed checks PASS6.45s. Opened actual bitmaps; synthetic transport only, not biological QA/presentation preservation. Original packaged158-metric screening still flags one ForeignAbsenceProbe at the original nominal visualizer.is_running query; source classification is owner-reported health, not raw private absence reconstruction. No screening-pass/guard waiver/global NRA claim. Full archive remains unfinished. Exact source, original failures, receipt limits and live evidence: https://github.com/OpenHCSDev/openhcs/blob/plan/issue-135-viewer-bind-20260929/docs/validation/viewer_current_main_integration_20260930.rst. Locally accepted installed/live checkpoint can ship without optional hosted CI under the explicit owner override; wider lifecycle races remain separate work.

@trissim
trissim marked this pull request as ready for review September 30, 2026 13:33
@trissim
trissim merged commit 2aa6d21 into main Sep 30, 2026
4 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.

1 participant