Skip to content

Preserve MCP call-boundary failures without post-dispatch transport fallback #178

Closed

Description

@trissim

Owner: OpenHCS blind-analysis coordinator (this thread). Reproduced through the owned installed OpenHCS 0.8.6 MCP dev-client/resident socket; reviewed production code 9f37cb6, equivalent to merged #177 on main abb8b61.

A first source artifact-plan inspection of one 128x128 synthetic field with one registered callable hit the existing 10-second transport-inactivity limit at call_tool. Server PID 4141724 remained healthy and the warmed exact readonly inspection returned a sound plan later. This is not evidence that increasing the timeout fixes the latency.

The following one-worker compile-only submission reached runtime server :5791 and completed (execution/compile artifact c4eeb807-0fe0-4da4-87db-72ae433f9eb4, 3.1266s server compile), but the client lost the receipt and reported RuntimeError: generator didn't stop after athrow(). Server status recovered through public openhcs_get_runtime_server_execution_status confirmed complete. No compile resubmission was issued.

Source defect: open_mcp_dev_session in openhcs/mcp/dev_client_core.py wraps yield session inside the socket-establishment exception handler. An OSError escaping after tool dispatch enters startup/fallback code and attempts a second yield; daemon log records an unnecessary second startup rejected because the resident socket is already served. This obscures the true call-boundary failure and loses the ordinary job handle. After dispatch, never enter a different transport, start another server, or replay uncertain input.

Acceptance:

Persistent reproduction requests/source/receipts are retained under /home/ts/wt/openhcs-live-point-evidence-20260929/native-pipeline-reopening-20260929. Frozen H002 science was not changed.

Activity

  1. trissim commented on Sep 29, 2026

    @trissim
    CollaboratorAuthor

    PR #181 is merged on remote main and installed in the owned MCP test environment. Source and installed focused tests pass (21 each); the actual resident-server journey preserves a caller exception after dispatch and reconnects to the same healthy process without spawning a replacement. This fixes post-dispatch fallback only. Cold/preparation latency remains open and is coordinated with the existing catalog/docstring performance owners. The accepted compile was recovered through runtime status without resubmission.

  2. trissim commented on Sep 29, 2026

    @trissim
    CollaboratorAuthor

    PR #212 is merged and installed. The actual fresh MCP cold inspection exceeded the unchanged 10-second boundary because InProcessCompileInspectionGateway forced global catalog preparation after the document already normalized its declared callables. Deleting that redundant initialization gives a successful 1.19-second source and 2.19-second installed one-field inspection. Nine focused/real gateway tests pass, including a prohibition on global catalog preparation for the registered declaration. The post-dispatch fallback fix remains unchanged; this is not a universal runtime startup latency claim. Complete source and installed receipts are retained in /home/ts/wt/openhcs-issue-batch-20260929.

  3. trissim commented on Sep 30, 2026

    @trissim
    CollaboratorAuthor

    Parent-owned new acceptance witness, separate from the post-dispatch fallback repair: cold openhcs_stream_plate_files_to_viewer on current-main+PR309 exceeds the default10s stdio observation and returns mcp_transport_failed/TimeoutError. No resend. Subsequent read-only viewer state proves the intended A01 image mounted (one item,96x96, calibrated0.65XY). Original request16 and response16; reconciliation state18, under /home/ts/wt/openhcs-issue-batch-20260929/viewer-reset-parent-20260930/attempt02. Exact MCP4138179, owned execution4140464/5995; viewer5595 on isolated91. Parent owns latency/bootstrap follow-through after this viewer acceptance. Need separate bounded viewer preparation/start/status through existing startup owners, not larger observation timeouts or late mutation replay. No source diagnosis/latency improvement is claimed yet.

  4. trissim commented on Oct 1, 2026

    @trissim
    CollaboratorAuthor

    Completed on main by PR #181, with the registered cold-inspection follow-up in PR #212. PR #181 now explicitly links this issue as a closing reference.

    The actual installed resident-session witness preserves the exact post-dispatch caller exception, starts no replacement/fallback transport, and reconnects to the same healthy process; 21 source and 21 installed controls passed. The accepted compile was recovered without resubmission. The installed cold-inspection witness removes redundant unrelated catalog preparation and completes the one-field registered route in 2.19s, with nine gateway controls and the unchanged inactivity limit.

    Closing the post-dispatch fallback defect and that registered cold-inspection acceptance. The later cold viewer-start timeout is explicitly a separate startup/preparation witness, reconciled without resend; ongoing GUI/viewer bootstrap/liveness is tracked under #355/#385 and is not claimed fixed by this closure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions