From 729e89095d55aad7c09afef923cb738c079bd7ee Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Tue, 29 Sep 2026 22:14:59 -0400 Subject: [PATCH 01/10] Add canonical exclusive endpoint bootstrap and native identity handle --- .../validation/issue251_bootstrap_20260930.md | 14 +++ src/zmqruntime/client.py | 83 ++++++++++++++++ src/zmqruntime/messages.py | 6 ++ src/zmqruntime/transport_modes.py | 26 +++++ tests/test_execution.py | 2 + tests/test_owned_startup.py | 99 +++++++++++++++++++ tests/test_startup.py | 4 +- 7 files changed, 233 insertions(+), 1 deletion(-) create mode 100644 docs/validation/issue251_bootstrap_20260930.md create mode 100644 tests/test_owned_startup.py diff --git a/docs/validation/issue251_bootstrap_20260930.md b/docs/validation/issue251_bootstrap_20260930.md new file mode 100644 index 0000000..0037a7c --- /dev/null +++ b/docs/validation/issue251_bootstrap_20260930.md @@ -0,0 +1,14 @@ +# Canonical exclusive startup owner (OpenHCS issue251) + +Extends the existing ZMQClient startup owner with explicit local empty-pair +startup, exact native ProcessIdentity capture, and pre-bind reservation in the +existing transport startup lock. No new launcher, registry, future, catalogue +warmup, takeover/kill/retry, or timeout increase. Post-spawn reservation failure +preserves the exact native handle as uncertainty. Existing fake nominal process +implementations migrated with their identity contract; no NotImplemented stub. + +Paired OpenHCS draft will link https://github.com/OpenHCSDev/openhcs/issues/251. +Combined source shard62 passed including7 native-owner focused cases and existing +startup cases; no native runtime launched. Full native/installed acceptance and +endpoint-pair concurrency hardening remain explicit pending released serial slot. +Parent integrates paired revisions; worker does not merge or install. diff --git a/src/zmqruntime/client.py b/src/zmqruntime/client.py index 3e17646..85a26b5 100644 --- a/src/zmqruntime/client.py +++ b/src/zmqruntime/client.py @@ -27,6 +27,7 @@ EndpointControlCapability, MessageFields, PongResponse, + ProcessIdentity, ProcessExit, ResponseType, ) @@ -86,6 +87,14 @@ class EndpointConnectionCancelledError(RuntimeError): """Raised when the owner cancels one exact endpoint connection attempt.""" +class EndpointStartupUncertainError(RuntimeError): + """The child exists, but publishing its pre-bind reservation failed.""" + + def __init__(self, process: EndpointProcess) -> None: + self.process = process + super().__init__("Child spawned; reservation publication uncertain. Do not replay startup.") + + class EndpointConnectionAttempt: """One cancellable invocation of a declared endpoint connection policy.""" @@ -180,6 +189,11 @@ def handshake_response(self) -> PongResponse: class EndpointProcess(ABC): """Nominal process operations required by an owned endpoint connection.""" + @property + @abstractmethod + def identity(self) -> ProcessIdentity: + """Return the exact process incarnation captured from the native handle.""" + @abstractmethod def is_alive(self) -> bool: """Return whether the exact spawned process remains alive.""" @@ -245,14 +259,24 @@ class _ObservedEndpointProcess(EndpointProcess, ABC): repr=False, compare=False, ) + _identity: ProcessIdentity = field(init=False, repr=False) def __post_init__(self) -> None: + object.__setattr__(self, "_identity", self._capture_identity()) object.__setattr__( self, "_exit_observation", _EndpointProcessExitObservation(self._wait_and_resolve_exit), ) + @property + def identity(self) -> ProcessIdentity: + return self._identity + + @abstractmethod + def _capture_identity(self) -> ProcessIdentity: + """Capture identity before the owned process reaper can release the PID.""" + @abstractmethod def _wait_and_resolve_exit(self) -> ProcessExit: """Perform the platform wait and resolve its exact terminal status.""" @@ -270,6 +294,9 @@ class MultiprocessingEndpointProcess(_ObservedEndpointProcess): process: BaseProcess + def _capture_identity(self) -> ProcessIdentity: + return ProcessIdentity.for_pid(self.process.pid) + def _wait_and_resolve_exit(self) -> ProcessExit: self.process.join() returncode = self.process.exitcode @@ -302,6 +329,9 @@ class SubprocessEndpointProcess(_ObservedEndpointProcess): process: subprocess.Popen + def _capture_identity(self) -> ProcessIdentity: + return ProcessIdentity.for_pid(self.process.pid) + def _wait_and_resolve_exit(self) -> ProcessExit: return ProcessExit(self.process.wait()) @@ -783,6 +813,56 @@ def connect_existing( ) raise + def start_owned_process( + self, + *, + operation_deadline: OperationDeadline, + ) -> EndpointProcess: + """Spawn once at an empty local pair, without attaching or warming. + + The returned platform handle remains authoritative even before readiness. + Unlike connect(), this operation never replaces, cleans, or adopts an + existing address. Readiness is a subsequent read-only observation. + """ + declaration = self.transport_mode.declaration + if not declaration.endpoint_is_local(self.host, self.port): + raise ValueError("Explicit startup requires a local endpoint") + with self._ensure_connection_attempt(), self._lock: + if self._connection is not None: + raise RuntimeError("Explicit startup cannot adopt an existing connection") + with endpoint_startup_lock( + self.port, + self.transport_mode, + self.config, + operation_deadline=operation_deadline, + cancellation=self._connection_cancellation.get(), + ) as acquired: + if not acquired: + raise EndpointConnectionCancelledError("Startup cancelled before spawn") + operation_deadline.remaining_seconds() + prior_owner = declaration.startup_owner(self.port, self.config) + if prior_owner is not None and prior_owner.is_alive() is not False: + raise RuntimeError("An existing startup owner reserves this endpoint") + if self.endpoint.occupied_ports(self.config): + raise RuntimeError("Explicit startup requires an empty data/control pair") + if not declaration.data_control_pair_is_available( + self.port, + self.control_port, + self.host, + self.config, + ): + raise RuntimeError("Execution endpoint pair is unavailable") + self._emit_connection_status( + EndpointStartupPhase.STARTING_PROCESS, + f"Starting explicitly owned server on port {self.port}", + ) + process = endpoint_process(self._spawn_server_process()) + try: + declaration.record_startup_owner(self.port, self.config, process.identity) + except Exception as error: + raise EndpointStartupUncertainError(process) from error + return process + def _connect_locked( self, timeout: float, @@ -832,6 +912,9 @@ def _connect_locked( time.sleep(min(0.5, operation_deadline.remaining_seconds())) if self._connection_cancelled(): return self._cancelled_connection_result() + prior_owner = self.transport_mode.declaration.startup_owner(self.port, self.config) + if prior_owner is not None and prior_owner.is_alive() is not False: + return False self._emit_connection_status( EndpointStartupPhase.STARTING_PROCESS, f"Starting server process for port {self.port}", diff --git a/src/zmqruntime/messages.py b/src/zmqruntime/messages.py index a1990ba..a43a69a 100644 --- a/src/zmqruntime/messages.py +++ b/src/zmqruntime/messages.py @@ -315,6 +315,12 @@ def current(cls) -> "ProcessIdentity": process = psutil.Process() return cls(pid=process.pid, create_time=process.create_time()) + @classmethod + def for_pid(cls, pid: int) -> "ProcessIdentity": + """Capture the OS creation time at the process-handle boundary.""" + process = psutil.Process(pid) + return cls(pid=process.pid, create_time=process.create_time()) + def to_dict(self) -> Dict[str, Any]: return {"pid": self.pid, "create_time": self.create_time} diff --git a/src/zmqruntime/transport_modes.py b/src/zmqruntime/transport_modes.py index 8061d00..ad763cc 100644 --- a/src/zmqruntime/transport_modes.py +++ b/src/zmqruntime/transport_modes.py @@ -3,6 +3,7 @@ from __future__ import annotations import platform +import json import socket from abc import ABC, abstractmethod from collections.abc import Iterator @@ -17,6 +18,7 @@ from .config import TransportMode, ZMQConfig from .timeouts import OperationCancellation, OperationDeadline +from .messages import ProcessIdentity class TransportDeclaration(ABC, metaclass=AutoRegisterMeta): @@ -150,6 +152,30 @@ def startup_lock( finally: portalocker.unlock(lock_file) + @classmethod + def startup_owner(cls, port: int, config: ZMQConfig) -> ProcessIdentity | None: + """Read the exact pre-bind reservation from the existing startup lock. + + Call under startup_lock. Invalid records fail closed, never as absence. + """ + path = cls.startup_lock_path(port, config) + source = path.read_text(encoding="utf-8") if path.exists() else "" + return ProcessIdentity.from_dict(json.loads(source)) if source else None + + @classmethod + def record_startup_owner( + cls, + port: int, + config: ZMQConfig, + owner: ProcessIdentity, + ) -> None: + """Publish one spawned child while holding the existing startup lock.""" + with cls.startup_lock_path(port, config).open("r+b") as stream: + stream.seek(0) + stream.write(json.dumps(owner.to_dict()).encode("utf-8")) + stream.truncate() + stream.flush() + @classmethod @abstractmethod def data_control_pair_is_available( diff --git a/tests/test_execution.py b/tests/test_execution.py index b27017f..d838cf6 100644 --- a/tests/test_execution.py +++ b/tests/test_execution.py @@ -84,6 +84,8 @@ def _interrupt_execution(self, execution_id: str) -> int: class StubEndpointProcess(EndpointProcess): + identity = ProcessIdentity(pid=1, create_time=1.0) + def __init__(self) -> None: self.alive = True self.stop_count = 0 diff --git a/tests/test_owned_startup.py b/tests/test_owned_startup.py new file mode 100644 index 0000000..71bf806 --- /dev/null +++ b/tests/test_owned_startup.py @@ -0,0 +1,99 @@ +"""Source-only tests of the canonical exclusive-spawn boundary.""" + +from unittest.mock import Mock +from dataclasses import replace + +import pytest + +from zmqruntime.client import EndpointProcess, ZMQClient +from zmqruntime.config import TransportMode, ZMQConfig +from zmqruntime.messages import ProcessIdentity +from zmqruntime.timeouts import OperationDeadline + + +class Process(EndpointProcess): + identity = ProcessIdentity.current() + + def is_alive(self): + return True + + def exit(self): + return None + + def wait_for_exit(self, timeout): + return None + + def stop(self, timeout=5, kill_timeout=2): + raise AssertionError("Exclusive startup must never stop a process") + + +class Client(ZMQClient): + def _spawn_server_process(self): + return self.spawn() + + def send_data(self, data): + raise AssertionError("No source dispatch in bootstrap") + + +@pytest.fixture +def client(tmp_path, monkeypatch): + monkeypatch.setenv("HOME", str(tmp_path)) + result = Client( + port=5913, host="127.0.0.1", transport_mode=TransportMode.TCP, config=ZMQConfig() + ) + result.spawn = Mock(return_value=Process()) + return result + + +def start(client): + return client.start_owned_process( + operation_deadline=OperationDeadline.after_milliseconds(500, operation="test bootstrap") + ) + + +@pytest.mark.parametrize("occupied", [(5913,), (5914,), (5913, 5914)]) +def test_occupied_pair_never_attaches_kills_or_spawns(client, monkeypatch, occupied): + monkeypatch.setattr(type(client.endpoint), "occupied_ports", lambda *_: frozenset(occupied)) + client._kill_processes_on_port = Mock(side_effect=AssertionError("foreign kill")) + client._attach_existing_endpoint = Mock(side_effect=AssertionError("foreign attach")) + with pytest.raises(RuntimeError, match="empty data/control"): + start(client) + client.spawn.assert_not_called() + + +def test_local_empty_pair_spawns_once_and_reserves_prebind_child(client, monkeypatch): + declaration = client.transport_mode.declaration + monkeypatch.setattr(type(client.endpoint), "occupied_ports", lambda *_: frozenset()) + monkeypatch.setattr(declaration, "data_control_pair_is_available", lambda *_: True) + process = start(client) + assert process.identity == ProcessIdentity.current() + assert declaration.startup_owner(client.port, client.config) == process.identity + with pytest.raises(RuntimeError, match="startup owner"): + start(client) + client.spawn.assert_called_once() + + +def test_foreign_host_rejected_before_lock_or_spawn(client): + client.endpoint = replace(client.endpoint, host="203.0.113.7") + with pytest.raises(ValueError, match="local endpoint"): + start(client) + client.spawn.assert_not_called() + + +def test_malformed_startup_reservation_fails_closed(client): + path = client.transport_mode.declaration.startup_lock_path(client.port, client.config) + path.parent.mkdir(parents=True) + path.write_text("unknown partial reservation", encoding="utf-8") + with pytest.raises(ValueError): + start(client) + client.spawn.assert_not_called() + + +def test_unavailable_pair_never_spawns(client, monkeypatch): + monkeypatch.setattr(type(client.endpoint), "occupied_ports", lambda *_: frozenset()) + monkeypatch.setattr( + client.transport_mode.declaration, "data_control_pair_is_available", lambda *_: False + ) + with pytest.raises(RuntimeError, match="unavailable"): + start(client) + client.spawn.assert_not_called() diff --git a/tests/test_startup.py b/tests/test_startup.py index bee6d54..253955b 100644 --- a/tests/test_startup.py +++ b/tests/test_startup.py @@ -13,7 +13,7 @@ EndpointProcess, ZMQClient, ) -from zmqruntime.messages import PongResponse, ProcessExit, ServerRole +from zmqruntime.messages import PongResponse, ProcessExit, ProcessIdentity, ServerRole from zmqruntime.startup import ( EndpointStartupCancellationObserver, EndpointStartupObserver, @@ -46,6 +46,8 @@ def _present(self, state: str, message: str) -> None: class _EndpointProcess(EndpointProcess): + identity = ProcessIdentity(pid=1, create_time=1.0) + def is_alive(self) -> bool: return True From b7f6f5d22f44a24878314192d4d32963b8423c04 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Tue, 29 Sep 2026 22:24:22 -0400 Subject: [PATCH 02/10] Reserve both native startup addresses before spawn and preserve uncertainty --- .../validation/issue251_bootstrap_20260930.md | 12 +++--- src/zmqruntime/client.py | 43 +++++++++++++------ tests/test_owned_startup.py | 25 +++++++++++ 3 files changed, 61 insertions(+), 19 deletions(-) diff --git a/docs/validation/issue251_bootstrap_20260930.md b/docs/validation/issue251_bootstrap_20260930.md index 0037a7c..37f9bc4 100644 --- a/docs/validation/issue251_bootstrap_20260930.md +++ b/docs/validation/issue251_bootstrap_20260930.md @@ -1,14 +1,16 @@ # Canonical exclusive startup owner (OpenHCS issue251) Extends the existing ZMQClient startup owner with explicit local empty-pair -startup, exact native ProcessIdentity capture, and pre-bind reservation in the +startup, exact native ProcessIdentity capture, and both-address pre-bind reservation in the existing transport startup lock. No new launcher, registry, future, catalogue warmup, takeover/kill/retry, or timeout increase. Post-spawn reservation failure preserves the exact native handle as uncertainty. Existing fake nominal process implementations migrated with their identity contract; no NotImplemented stub. -Paired OpenHCS draft will link https://github.com/OpenHCSDev/openhcs/issues/251. -Combined source shard62 passed including7 native-owner focused cases and existing -startup cases; no native runtime launched. Full native/installed acceptance and -endpoint-pair concurrency hardening remain explicit pending released serial slot. +Paired [OpenHCS256](https://github.com/OpenHCSDev/openhcs/pull/256) references issue251; +[metaclass-registry1](https://github.com/OpenHCSDev/metaclass-registry/pull/1) owns +non-creating cache projection. Combined source shard66 passed including9 native-owner +focused cases, existing startup cases and offline CLI projection; no native +runtime launched. Full native/installed acceptance and cross-process endpoint-pair +race evidence remain explicit pending released serial slot. Parent integrates paired revisions; worker does not merge or install. diff --git a/src/zmqruntime/client.py b/src/zmqruntime/client.py index 85a26b5..c90413c 100644 --- a/src/zmqruntime/client.py +++ b/src/zmqruntime/client.py @@ -10,7 +10,7 @@ from abc import ABC, abstractmethod from collections.abc import Callable from concurrent.futures import ThreadPoolExecutor, wait -from contextlib import contextmanager +from contextlib import ExitStack, contextmanager from contextvars import ContextVar from dataclasses import dataclass, field, replace from enum import Enum @@ -830,19 +830,25 @@ def start_owned_process( with self._ensure_connection_attempt(), self._lock: if self._connection is not None: raise RuntimeError("Explicit startup cannot adopt an existing connection") - with endpoint_startup_lock( - self.port, - self.transport_mode, - self.config, - operation_deadline=operation_deadline, - cancellation=self._connection_cancellation.get(), - ) as acquired: - if not acquired: - raise EndpointConnectionCancelledError("Startup cancelled before spawn") + ports = sorted(self.endpoint.port_pair(self.config).ports) + with ExitStack() as locks: + for port in ports: + acquired = locks.enter_context( + endpoint_startup_lock( + port, + self.transport_mode, + self.config, + operation_deadline=operation_deadline, + cancellation=self._connection_cancellation.get(), + ) + ) + if not acquired: + raise EndpointConnectionCancelledError("Startup cancelled before spawn") operation_deadline.remaining_seconds() - prior_owner = declaration.startup_owner(self.port, self.config) - if prior_owner is not None and prior_owner.is_alive() is not False: - raise RuntimeError("An existing startup owner reserves this endpoint") + for port in ports: + prior_owner = declaration.startup_owner(port, self.config) + if prior_owner is not None and prior_owner.is_alive() is not False: + raise RuntimeError("An existing startup owner reserves this endpoint") if self.endpoint.occupied_ports(self.config): raise RuntimeError("Explicit startup requires an empty data/control pair") if not declaration.data_control_pair_is_available( @@ -852,13 +858,22 @@ def start_owned_process( self.config, ): raise RuntimeError("Execution endpoint pair is unavailable") + operation_deadline.remaining_seconds() self._emit_connection_status( EndpointStartupPhase.STARTING_PROCESS, f"Starting explicitly owned server on port {self.port}", ) + if self._connection_cancelled(): + raise EndpointConnectionCancelledError("Startup cancelled before spawn") + # Reserve before the side effect. A failed child publication + # must leave an active claim, not invite a concurrent replay. + for port in ports: + declaration.record_startup_owner(port, self.config, ProcessIdentity.current()) + operation_deadline.remaining_seconds() process = endpoint_process(self._spawn_server_process()) try: - declaration.record_startup_owner(self.port, self.config, process.identity) + for port in ports: + declaration.record_startup_owner(port, self.config, process.identity) except Exception as error: raise EndpointStartupUncertainError(process) from error return process diff --git a/tests/test_owned_startup.py b/tests/test_owned_startup.py index 71bf806..abf8282 100644 --- a/tests/test_owned_startup.py +++ b/tests/test_owned_startup.py @@ -97,3 +97,28 @@ def test_unavailable_pair_never_spawns(client, monkeypatch): with pytest.raises(RuntimeError, match="unavailable"): start(client) client.spawn.assert_not_called() + + +def test_cross_pair_prebind_reservation_rejects_second_child(client, monkeypatch): + declaration = client.transport_mode.declaration + monkeypatch.setattr(type(client.endpoint), "occupied_ports", lambda *_: frozenset()) + monkeypatch.setattr(declaration, "data_control_pair_is_available", lambda *_: True) + start(client) + overlapping = Client( + port=client.control_port, + host="127.0.0.1", + transport_mode=client.transport_mode, + config=client.config, + ) + overlapping.spawn = Mock(side_effect=AssertionError("Duplicate prebind child")) + with pytest.raises(RuntimeError, match="startup owner"): + start(overlapping) + overlapping.spawn.assert_not_called() + client.spawn.assert_called_once() + + +def test_expired_budget_never_spawns(client): + deadline = OperationDeadline(operation="expired bootstrap", timeout_ms=1, expires_at=0) + with pytest.raises(TimeoutError): + client.start_owned_process(operation_deadline=deadline) + client.spawn.assert_not_called() From 9a93bbeef1f5cde26c673e96a700b82eed3cfc89 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Tue, 29 Sep 2026 23:17:38 -0400 Subject: [PATCH 03/10] Prove exact owned process exit at canonical shutdown boundary --- .../validation/issue251_bootstrap_20260930.md | 49 +++ docs/validation/issue251_pr_body_20260930.md | 26 ++ src/zmqruntime/client.py | 204 +++++++--- src/zmqruntime/execution/server.py | 10 +- src/zmqruntime/messages.py | 48 ++- tests/test_owned_close.py | 368 ++++++++++++++++++ 6 files changed, 654 insertions(+), 51 deletions(-) create mode 100644 docs/validation/issue251_pr_body_20260930.md create mode 100644 tests/test_owned_close.py diff --git a/docs/validation/issue251_bootstrap_20260930.md b/docs/validation/issue251_bootstrap_20260930.md index 37f9bc4..2a4d83f 100644 --- a/docs/validation/issue251_bootstrap_20260930.md +++ b/docs/validation/issue251_bootstrap_20260930.md @@ -14,3 +14,52 @@ focused cases, existing startup cases and offline CLI projection; no native runtime launched. Full native/installed acceptance and cross-process endpoint-pair race evidence remain explicit pending released serial slot. Parent integrates paired revisions; worker does not merge or install. +# Identity-proven lifecycle continuation + +Parent-reported reproducer: FORCE shutdown at5993, exact PID2052959 / +creation time1790731598.48, returned succeeded/endpoint_terminated while +listeners5993/6993 disappeared but the same process remained live at981192KiB +RSS. The parent owns that original attempt and its final disposition in +H002B-CLEANUP-20260930.json; this worker did not contact, replay or signal it. +Interpreter/JVM teardown is a hypothesis, not a measured cause. + +The existing EndpointShutdownMode completion leaves now distinguish transport +cessation from exact process exit. EndpointShutdownResult records the observed +incarnation, process_exited (unknown stays unknown), one request_attempted and +acknowledgement. Local identified FORCE cannot succeed on lost listeners alone. +The existing ProcessIdentity owner performs bounded TERM/KILL/wait under one +OperationDeadline, including PID-reuse checks; no new supervisor/process store. +GRACEFUL still clears workers and intentionally retains the server. + +ZMQClient.close_owned_process requires both existing startup reservations to +match the supplied incarnation under the same native pair locks. It never +attaches, starts, kills port owners, or retries an RPC. An absent listener with +a proven child uses exact process cleanup without a shutdown replay. A changed +reservation or heartbeat rejects before control dispatch. The shutdown request +is a refinement of the existing ControlRequestHeader and carries the observed +ProcessIdentity; ExecutionServer validates it before cancellation or worker +mutation, closing the ping-to-send successor race. No action roster, compatibility +alias, second registry or application-level process signalling was added. +IPC cleanup uses the existing stale-address declaration after process exit; +unproved/live foreign socket sentinels remain intact. + +Paired source shard:123 passed,2 actual-MCP cases deselected,12.16s; process12.86s, +peak285060KiB,exit0. Tests intercept socket sends/process signals/spawn; no native +endpoint/JVM/GUI starts. Covers listener-gone/process-live failure, exact exit, +GRACEFUL retention, absent listener/no RPC replay, both reservation identities, +changed heartbeat before/after dispatch, unknown liveness, missing ack/one-send, +expired deadline/no mutation, postdispatch expiry/no late signal, PID reuse, +bounded TERM/KILL waits, native pre-mutation admission and IPC stale/live cases. +Root tests also cover nested actual DTO decoding, default context/service +invocation, declaration exposure, path denial before native locks, and unchanged +QA/context bounds. Captures are preserved in paired OpenHCS256 under +docs/validation/runtime_bootstrap_20260930/source-close-final{,-resources}.txt. +Earlier fixture failures and coherent114/122-pass checkpoints are retained. + +Focused review: IDEN-1 separates listener and process facts; IDEN-8 keeps exact +incarnation at observation and signalling; IMPL-2/12/13 retain mode completion, +process termination and stale socket cleanup at their existing native owners; +BOUND-1/2 decode the incarnation once into its original declaration before +effects; TIME-7 admits native lifecycle paths before acquiring locks. No full +NRA/global equivalence claim. Native cross-process and installed acceptance +remain gated on the parent's released serial slot and paired integration. diff --git a/docs/validation/issue251_pr_body_20260930.md b/docs/validation/issue251_pr_body_20260930.md new file mode 100644 index 0000000..7a65104 --- /dev/null +++ b/docs/validation/issue251_pr_body_20260930.md @@ -0,0 +1,26 @@ +# Canonical exclusive bootstrap and exact owned lifecycle (OpenHCS251) + +Extends existing ZMQClient startup/lifecycle owners: explicit local empty-pair +startup, native ProcessIdentity capture, both-address pre-bind reservations in +existing startup locks, post-spawn uncertainty handle, and identity-proven close. +No new launcher, registry/future, warmup, foreign takeover or RPC replay. + +FORCE completion now distinguishes listener disappearance from exact process +exit. The canonical ProcessIdentity owner uses one bounded TERM/KILL/wait budget; +GRACEFUL clears workers and deliberately keeps the server. Owned close requires +both native reservations plus incarnation-bound shutdown admission BEFORE native +worker mutation. IPC deletion uses existing stale-address semantics only. +The original5993 cleanup attempt remains parent-owned and was not replayed. + +Paired [OpenHCS256](https://github.com/OpenHCSDev/openhcs/pull/256), references +[issue251](https://github.com/OpenHCSDev/openhcs/issues/251), and +[metaclass-registry1](https://github.com/OpenHCSDev/metaclass-registry/pull/1). +**123 source tests passed,2 actual-MCP cases deferred,12.16s,285060KiB peak**. +No native/MCP/JVM/GUI launched; no installed or global performance proof. +Actual tests/pattern review/reproducer: +[receipt](docs/validation/issue251_bootstrap_20260930.md). + +Remaining: cross-process synthetic bootstrap -> prep READY -> registration -> +compile/execute -> exact owned exit under released serial slot, then parent +paired merge/offline install/affected installed-entrypoint validation. This stays +a working draft, not Closes251. PR6/7 files are untouched and remain disjoint. diff --git a/src/zmqruntime/client.py b/src/zmqruntime/client.py index c90413c..92e9e8d 100644 --- a/src/zmqruntime/client.py +++ b/src/zmqruntime/client.py @@ -25,6 +25,7 @@ ControlMessageType, EndpointApplicationCompatibility, EndpointControlCapability, + EndpointShutdownRequest, MessageFields, PongResponse, ProcessIdentity, @@ -534,10 +535,18 @@ def handshake_response(self) -> PongResponse: @dataclass(frozen=True, slots=True) class EndpointShutdownResult: - """Observed outcome of one endpoint shutdown operation.""" + """Endpoint disappearance and exact process exit are separate observations. + + request_attempted records one wire send attempt, not proof of delivery. + process_exited=None means no local incarnation proof, never success at exit. + """ succeeded: bool endpoint_terminated: bool + process_identity: ProcessIdentity | None = None + process_exited: bool | None = None + request_attempted: bool = False + acknowledged: bool = False @dataclass(slots=True) @@ -545,10 +554,11 @@ class _EndpointShutdownOperation: """State and mechanics for one endpoint shutdown request.""" target: TransportEndpoint - timeout: float + deadline: OperationDeadline config: ZMQConfig - endpoint: PongResponse | None + process_identity: ProcessIdentity | None acknowledged: bool + request_attempted: bool def acknowledgement_result(self) -> EndpointShutdownResult: """Report whether a non-terminating shutdown request was acknowledged.""" @@ -556,36 +566,74 @@ def acknowledgement_result(self) -> EndpointShutdownResult: return EndpointShutdownResult( succeeded=self.acknowledged, endpoint_terminated=False, + process_identity=self.process_identity, + process_exited=self._process_exited(), + request_attempted=self.request_attempted, + acknowledged=self.acknowledged, ) def termination_result(self) -> EndpointShutdownResult: - """Prove endpoint termination, escalating through owned process identity.""" - - deadline = time.monotonic() + self.timeout - while time.monotonic() < deadline: - if not self._endpoint_responds(): - return self._terminated_result() - time.sleep(0.05) + """Complete FORCE through the existing exact-process owner, never replay.""" + + # Reserve part of this SAME deadline for process-owner escalation. + grace_end = time.monotonic() + self.deadline.remaining_seconds_or_zero() / 2 + while time.monotonic() < grace_end: + if self._process_exited() is True: + break + remaining = self.deadline.remaining_seconds_or_zero() + if remaining <= 0: + break + pong = self.target.ping( + self.config, + timeout_ms=min(100, max(1, int(remaining * 1000))), + ) + if pong is None: + break + if self.process_identity is not None and pong.process_identity != self.process_identity: + # A shutdown request may already have arrived at the original + # child. Retain that disposition, but never signal a successor. + return EndpointShutdownResult( + succeeded=False, + endpoint_terminated=False, + process_identity=self.process_identity, + process_exited=self._process_exited(), + request_attempted=self.request_attempted, + acknowledged=self.acknowledged, + ) + time.sleep(min(0.05, self.deadline.remaining_seconds_or_zero())) + + exited = self._process_exited() + remaining = self.deadline.remaining_seconds_or_zero() + if self.process_identity is not None and exited is False and remaining > 0: + # This is exact-incarnation OS cleanup, NOT another shutdown RPC. + self.process_identity.terminate(timeout=remaining) + exited = self._process_exited() + if exited is True: + # IPC address files can outlive their listener. Remove only what + # the existing transport owner proves stale, not a foreign socket. + self.target.cleanup_stale_addresses(self.config) + endpoint_terminated = not self.target.occupied_ports(self.config) + # Remote/unidentified endpoints can prove transport cessation only. + succeeded = endpoint_terminated and (exited is True or self.process_identity is None) + return EndpointShutdownResult( + succeeded=succeeded, + endpoint_terminated=endpoint_terminated, + process_identity=self.process_identity, + process_exited=exited, + request_attempted=self.request_attempted, + acknowledged=self.acknowledged, + ) - process_identity = None if self.endpoint is None else self.endpoint.process_identity + def _process_exited(self) -> bool | None: if ( - process_identity is not None - and self.target.transport_mode.declaration.endpoint_is_local( - self.target.host, - self.target.control_port(self.config), + self.process_identity is None + or not self.target.transport_mode.declaration.endpoint_is_local( + self.target.host, self.target.port ) - and process_identity.terminate(timeout=self.timeout) ): - return self._terminated_result() - - return EndpointShutdownResult(succeeded=False, endpoint_terminated=False) - - def _endpoint_responds(self) -> bool: - return self.target.ping(self.config, timeout_ms=100) is not None - - def _terminated_result(self) -> EndpointShutdownResult: - self.target.cleanup(self.config) - return EndpointShutdownResult(succeeded=True, endpoint_terminated=True) + return None + alive = self.process_identity.is_alive() + return None if alive is None else not alive class EndpointShutdownMode(str, Enum): @@ -878,6 +926,46 @@ def start_owned_process( raise EndpointStartupUncertainError(process) from error return process + def close_owned_process( + self, + process_identity: ProcessIdentity, + *, + mode: EndpointShutdownMode, + operation_deadline: OperationDeadline, + ) -> EndpointShutdownResult: + """Close only a child proven by this pair's existing startup reservations. + + No attach/start, port-owner killing, second process store, or RPC retry. + Caller-supplied PID/creation time alone is not ownership admission. + """ + declaration = self.transport_mode.declaration + if not declaration.endpoint_is_local(self.host, self.port): + raise ValueError("Owned process close requires a local endpoint") + with ExitStack() as locks: + for port in sorted(self.endpoint.port_pair(self.config).ports): + acquired = locks.enter_context( + endpoint_startup_lock( + port, + self.transport_mode, + self.config, + operation_deadline=operation_deadline, + ) + ) + if not acquired: + raise EndpointConnectionCancelledError("Close cancelled before dispatch") + if declaration.startup_owner(port, self.config) != process_identity: + raise RuntimeError("Endpoint pair is not reserved by this exact child") + operation_deadline.remaining_seconds() + return self.shutdown_endpoint_on_port( + self.port, + mode=mode, + transport_mode=self.transport_mode, + host=self.host, + config=self.config, + expected_process_identity=process_identity, + operation_deadline=operation_deadline, + ) + def _connect_locked( self, timeout: float, @@ -1227,11 +1315,17 @@ def shutdown_endpoint_on_port( transport_mode: TransportMode | None = None, host: str = "localhost", config: ZMQConfig | None = None, + *, + expected_process_identity: ProcessIdentity | None = None, + operation_deadline: OperationDeadline | None = None, ) -> EndpointShutdownResult: config = config or ZMQConfig() transport_mode = resolve_transport_mode(transport_mode) if not isinstance(mode, EndpointShutdownMode): raise TypeError("Shutdown mode must be an EndpointShutdownMode instance.") + deadline = operation_deadline or OperationDeadline.after_milliseconds( + max(1, int(timeout * 1000)), operation="endpoint shutdown" + ) target = TransportEndpoint( host=host, port=port, @@ -1239,37 +1333,56 @@ def shutdown_endpoint_on_port( ) endpoint = target.ping( config, - timeout_ms=min(max(int(timeout * 1000), 100), 1000), + timeout_ms=min(deadline.remaining_milliseconds(), 1000), + ) + if ( + expected_process_identity is not None + and endpoint is not None + and endpoint.process_identity != expected_process_identity + ): + raise RuntimeError("Endpoint incarnation changed before shutdown; no dispatch") + process_identity = ( + expected_process_identity + if expected_process_identity is not None + else (None if endpoint is None else endpoint.process_identity) ) - if endpoint is None and not target.is_in_use(config): + if endpoint is None and process_identity is None and not target.occupied_ports(config): return EndpointShutdownResult(succeeded=True, endpoint_terminated=True) - if endpoint is None or mode.required_capability not in endpoint.control_capabilities: + if endpoint is not None and mode.required_capability not in endpoint.control_capabilities: + return EndpointShutdownResult(succeeded=False, endpoint_terminated=False) + if endpoint is None and expected_process_identity is None: return EndpointShutdownResult(succeeded=False, endpoint_terminated=False) acknowledged = False + request_attempted = False sock = None try: - control_url = target.control_url(config) - - ctx = zmq.Context.instance() - sock = ctx.socket(zmq.REQ) - sock.setsockopt(zmq.LINGER, 0) - sock.connect(control_url) - sock.setsockopt(zmq.SNDTIMEO, min(int(timeout * 1000), 1000)) - sock.setsockopt(zmq.RCVTIMEO, min(int(timeout * 1000), 1000)) - sock.send( - pickle.dumps( - {MessageFields.TYPE: mode.control_message_type.value}, + # An absent listener cannot receive an RPC. Reconcile/close the + # explicitly proven incarnation without replaying shutdown. + if endpoint is not None and ( + expected_process_identity is None or expected_process_identity.is_alive() is True + ): + ctx = zmq.Context.instance() + sock = ctx.socket(zmq.REQ) + sock.setsockopt(zmq.LINGER, 0) + sock.connect(target.control_url(config)) + sock.setsockopt(zmq.SNDTIMEO, min(deadline.remaining_milliseconds(), 1000)) + request_attempted = True + sock.send( + EndpointShutdownRequest( + mode.control_message_type, process_identity + ).to_wire_payload() ) - ) - ack = pickle.loads(sock.recv()) - acknowledged = ack.get(MessageFields.TYPE) == ResponseType.SHUTDOWN_ACK.value + sock.setsockopt(zmq.RCVTIMEO, min(deadline.remaining_milliseconds(), 1000)) + ack = pickle.loads(sock.recv()) + acknowledged = ack.get(MessageFields.TYPE) == ResponseType.SHUTDOWN_ACK.value except ( EOFError, KeyError, OSError, TypeError, pickle.PickleError, + TimeoutError, zmq.ZMQError, ): acknowledged = False @@ -1280,10 +1393,11 @@ def shutdown_endpoint_on_port( return mode.complete( _EndpointShutdownOperation( target=target, - timeout=timeout, + deadline=deadline, config=config, - endpoint=endpoint, + process_identity=process_identity, acknowledged=acknowledged, + request_attempted=request_attempted, ) ) diff --git a/src/zmqruntime/execution/server.py b/src/zmqruntime/execution/server.py index 1c1e4a4..8bd9032 100644 --- a/src/zmqruntime/execution/server.py +++ b/src/zmqruntime/execution/server.py @@ -21,6 +21,7 @@ ControlMessageType, EndpointApplication, EndpointControlCapability, + EndpointShutdownRequest, ExecuteRequest, ExecuteResponse, ExecutionRecord, @@ -381,7 +382,10 @@ def _interrupt_execution(self, execution_id: str) -> int: return self._kill_worker_processes() - def _shutdown_workers(self, force=False): + def _shutdown_workers(self, msg: dict[str, Any], force: bool = False) -> dict[str, Any]: + _request, error = self._validate_and_parse(msg, EndpointShutdownRequest) + if error: + return error self._cancel_all_executions() killed = self._kill_worker_processes() if force: @@ -395,10 +399,10 @@ def _shutdown_workers(self, force=False): } def _handle_shutdown(self, msg): - return self._shutdown_workers(force=False) + return self._shutdown_workers(msg, force=False) def _handle_force_shutdown(self, msg): - return self._shutdown_workers(force=True) + return self._shutdown_workers(msg, force=True) def _handle_register_progress(self, msg): request, error = self._validate_and_parse(msg, ProgressRegistrationRequest) diff --git a/src/zmqruntime/messages.py b/src/zmqruntime/messages.py index a43a69a..9f3e0f0 100644 --- a/src/zmqruntime/messages.py +++ b/src/zmqruntime/messages.py @@ -17,6 +17,7 @@ from typing import Any, Dict, Optional, Tuple import psutil +from zmqruntime.timeouts import OperationDeadline logger = logging.getLogger(__name__) @@ -342,18 +343,30 @@ def is_alive(self) -> bool | None: return None def terminate(self, timeout: float = 5.0) -> bool: - """Terminate this exact local process without crossing PID reuse.""" + """Terminate this incarnation within one budget, including escalation.""" + if timeout <= 0: + return self.is_alive() is False + deadline = OperationDeadline.after_milliseconds( + max(1, int(timeout * 1000)), operation="exact process termination" + ) try: process = psutil.Process(self.pid) if process.create_time() != self.create_time: return True + if not process.is_running() or process.status() == psutil.STATUS_ZOMBIE: + return True + if deadline.expired(): + return False process.terminate() try: - process.wait(timeout=timeout) + # Leave budget for the existing force escalation and its wait. + process.wait(timeout=deadline.remaining_seconds_or_zero() / 2) except psutil.TimeoutExpired: + if not process.is_running(): + return True process.kill() - process.wait(timeout=timeout) + process.wait(timeout=deadline.remaining_seconds_or_zero()) return True except psutil.NoSuchProcess: return True @@ -423,6 +436,35 @@ def to_wire_payload(self) -> bytes: return pickle.dumps(self.to_dict()) +@dataclass(frozen=True, slots=True) +class EndpointShutdownRequest(ControlRequestHeader): + """Bind shutdown to its observed native incarnation, before mutation.""" + + process_identity: ProcessIdentity | None = None + + @classmethod + def from_dict(cls, payload: Mapping[str, object]) -> EndpointShutdownRequest: + header = ControlRequestHeader.from_dict(payload) + identity_data = payload.get(MessageFields.PROCESS_IDENTITY) + if identity_data is not None and not isinstance(identity_data, dict): + raise TypeError("Shutdown process identity must be a mapping") + return cls( + header.message_type, + None if identity_data is None else ProcessIdentity.from_dict(identity_data), + ) + + def to_dict(self) -> dict[str, Any]: + payload: dict[str, Any] = ControlRequestHeader.to_dict(self) + if self.process_identity is not None: + payload[MessageFields.PROCESS_IDENTITY] = self.process_identity.to_dict() + return payload + + def validate(self) -> str | None: + if self.process_identity is not None and self.process_identity != ProcessIdentity.current(): + return "Shutdown addressed a different native process incarnation; no mutation" + return None + + class ResponseType(Enum): PONG = "pong" ACCEPTED = "accepted" diff --git a/tests/test_owned_close.py b/tests/test_owned_close.py new file mode 100644 index 0000000..d9f8819 --- /dev/null +++ b/tests/test_owned_close.py @@ -0,0 +1,368 @@ +"""Source-only lifecycle regressions; no process, native endpoint or JVM starts.""" + +from dataclasses import replace +from unittest.mock import Mock +import pickle + +import psutil +import pytest + +from zmqruntime.client import EndpointShutdownMode, ZMQClient +from zmqruntime.config import TransportMode, ZMQConfig +from zmqruntime.messages import ( + EndpointControlCapability, + EndpointShutdownRequest, + ControlMessageType, + MessageFields, + PongResponse, + ProcessIdentity, + ResponseType, + ServerRole, +) +from zmqruntime.timeouts import OperationDeadline, OperationTimeoutError +from zmqruntime.transport import TransportEndpoint +from zmqruntime.execution.server import ExecutionServer + + +IDENTITY = ProcessIdentity(41, 100.0) + + +class Client(ZMQClient): + def _spawn_server_process(self): + raise AssertionError("Close must not start a process") + + def send_data(self, data): + raise AssertionError("Close must not submit source") + + +class Server(ExecutionServer): + _server_type = "owned-close-source-fixture" + + def execute_task(self, execution_id, request): + raise AssertionError("No task execution in source lifecycle tests") + + +@pytest.fixture +def fixture(tmp_path, monkeypatch): + monkeypatch.setenv("HOME", str(tmp_path)) + client = Client( + port=5913, host="127.0.0.1", transport_mode=TransportMode.TCP, config=ZMQConfig() + ) + pong = PongResponse( + port=5913, + control_port=client.control_port, + server="fixture", + server_role=ServerRole.EXECUTION, + ready=True, + process_identity=IDENTITY, + control_capabilities=frozenset( + (EndpointControlCapability.SHUTDOWN, EndpointControlCapability.FORCE_SHUTDOWN) + ), + ) + ping = Mock(side_effect=[pong, None]) + monkeypatch.setattr(TransportEndpoint, "ping", ping) + monkeypatch.setattr(TransportEndpoint, "occupied_ports", lambda *_: frozenset()) + cleanup = Mock() + monkeypatch.setattr(TransportEndpoint, "cleanup_stale_addresses", cleanup) + monkeypatch.setattr(ProcessIdentity, "is_alive", lambda _self: True) + terminate = Mock(return_value=False) + monkeypatch.setattr(ProcessIdentity, "terminate", terminate) + socket = Mock() + socket.recv.return_value = pickle.dumps({MessageFields.TYPE: ResponseType.SHUTDOWN_ACK.value}) + context = Mock() + context.socket.return_value = socket + monkeypatch.setattr("zmqruntime.client.zmq.Context.instance", lambda: context) + declaration = client.transport_mode.declaration + for port in client.endpoint.port_pair(client.config).ports: + path = declaration.startup_lock_path(port, client.config) + path.parent.mkdir(parents=True, exist_ok=True) + path.touch() + declaration.record_startup_owner(port, client.config, IDENTITY) + return client, ping, socket, terminate, cleanup + + +def close(client, mode=EndpointShutdownMode.FORCE): + return client.close_owned_process( + IDENTITY, + mode=mode, + operation_deadline=OperationDeadline.after_milliseconds(500, operation="owned close test"), + ) + + +def test_listener_gone_is_not_process_exit(fixture): + client, ping, socket, terminate, cleanup = fixture + result = close(client) + assert not result.succeeded + assert result.endpoint_terminated + assert result.process_exited is False + assert result.process_identity == IDENTITY + assert result.acknowledged and result.request_attempted + socket.send.assert_called_once() + terminate.assert_called_once() + cleanup.assert_not_called() + + +def test_force_completes_only_after_exact_process_exit(fixture, monkeypatch): + client, ping, socket, terminate, cleanup = fixture + alive = [True] + monkeypatch.setattr(ProcessIdentity, "is_alive", lambda _self: alive[0]) + terminate.side_effect = lambda **_kwargs: alive.__setitem__(0, False) or True + result = close(client) + assert result.succeeded and result.endpoint_terminated and result.process_exited + socket.send.assert_called_once() + assert EndpointShutdownRequest.from_wire_payload( + socket.send.call_args.args[0] + ) == EndpointShutdownRequest(ControlMessageType.FORCE_SHUTDOWN, IDENTITY) + cleanup.assert_called_once() + assert terminate.call_args.kwargs["timeout"] <= 0.5 + + +def test_absent_listener_reconciles_exact_process_without_rpc_replay(fixture): + client, ping, socket, terminate, cleanup = fixture + ping.side_effect = None + ping.return_value = None + result = close(client) + socket.send.assert_not_called() + assert not result.request_attempted and not result.acknowledged + assert not result.succeeded and result.process_exited is False + terminate.assert_called_once() + + +def test_graceful_ack_clears_workers_without_process_close(fixture): + client, ping, socket, terminate, cleanup = fixture + result = close(client, EndpointShutdownMode.GRACEFUL) + assert result.succeeded and result.acknowledged + assert not result.endpoint_terminated and result.process_exited is False + socket.send.assert_called_once() + assert EndpointShutdownRequest.from_wire_payload( + socket.send.call_args.args[0] + ) == EndpointShutdownRequest(ControlMessageType.SHUTDOWN, IDENTITY) + terminate.assert_not_called() + cleanup.assert_not_called() + + +@pytest.mark.parametrize("control", [False, True]) +def test_different_native_reservation_rejects_before_control(fixture, control): + client, ping, socket, terminate, cleanup = fixture + port = client.control_port if control else client.port + client.transport_mode.declaration.record_startup_owner( + port, client.config, replace(IDENTITY, create_time=101.0) + ) + with pytest.raises(RuntimeError, match="not reserved"): + close(client) + ping.assert_not_called() + socket.send.assert_not_called() + terminate.assert_not_called() + + +def test_different_endpoint_incarnation_rejects_before_control(fixture): + client, ping, socket, terminate, cleanup = fixture + ping.side_effect = [ + PongResponse( + port=5913, + control_port=client.control_port, + ready=True, + server="foreign", + server_role=ServerRole.EXECUTION, + process_identity=replace(IDENTITY, create_time=101.0), + ) + ] + with pytest.raises(RuntimeError, match="before shutdown"): + close(client) + socket.send.assert_not_called() + terminate.assert_not_called() + cleanup.assert_not_called() + + +def test_unknown_incarnation_liveness_never_signals_or_dispatches(fixture, monkeypatch): + client, ping, socket, terminate, cleanup = fixture + monkeypatch.setattr(ProcessIdentity, "is_alive", lambda _self: None) + result = close(client) + assert result.process_exited is None and not result.succeeded + socket.send.assert_not_called() + terminate.assert_not_called() + cleanup.assert_not_called() + + +def test_missing_unidentified_endpoint_is_not_process_exit_proof(fixture): + client, ping, socket, terminate, cleanup = fixture + ping.side_effect = None + ping.return_value = None + result = ZMQClient.shutdown_endpoint_on_port( + client.port, + EndpointShutdownMode.FORCE, + config=client.config, + transport_mode=TransportMode.TCP, + ) + assert result.endpoint_terminated and result.process_exited is None + socket.send.assert_not_called() + terminate.assert_not_called() + + +def test_expired_close_never_dispatches(fixture): + client, ping, socket, terminate, cleanup = fixture + deadline = replace(OperationDeadline.after_milliseconds(500, operation="test"), expires_at=0) + with pytest.raises(OperationTimeoutError): + client.close_owned_process( + IDENTITY, mode=EndpointShutdownMode.FORCE, operation_deadline=deadline + ) + ping.assert_not_called() + socket.send.assert_not_called() + terminate.assert_not_called() + + +def test_missing_ack_never_resends_shutdown(fixture): + client, ping, socket, terminate, cleanup = fixture + socket.recv.side_effect = TimeoutError("unknown delivery") + result = close(client) + assert result.request_attempted and not result.acknowledged + assert not result.succeeded and result.process_exited is False + socket.send.assert_called_once() + + +def test_expiry_after_dispatch_retains_handle_without_late_signal(fixture, monkeypatch): + client, ping, socket, terminate, cleanup = fixture + clock = [100.0] + monkeypatch.setattr("zmqruntime.timeouts.time.monotonic", lambda: clock[0]) + + def delayed_ack(): + clock[0] += 1.0 + return pickle.dumps({MessageFields.TYPE: ResponseType.SHUTDOWN_ACK.value}) + + socket.recv.side_effect = delayed_ack + result = close(client) + assert result.process_identity == IDENTITY + assert result.request_attempted and result.acknowledged + assert result.process_exited is False and not result.succeeded + socket.send.assert_called_once() + terminate.assert_not_called() + + +def test_changed_endpoint_after_dispatch_preserves_uncertainty_without_takeover(fixture): + client, ping, socket, terminate, cleanup = fixture + original = PongResponse( + port=5913, + control_port=client.control_port, + ready=True, + server="fixture", + server_role=ServerRole.EXECUTION, + process_identity=IDENTITY, + control_capabilities=frozenset((EndpointControlCapability.FORCE_SHUTDOWN,)), + ) + ping.side_effect = [ + original, + replace(original, process_identity=replace(IDENTITY, create_time=101.0)), + ] + result = close(client) + assert result.request_attempted and result.acknowledged + assert not result.succeeded and not result.endpoint_terminated + assert result.process_identity == IDENTITY + socket.send.assert_called_once() + terminate.assert_not_called() + cleanup.assert_not_called() + + +def test_foreign_host_never_enters_lifecycle(fixture): + client, ping, socket, terminate, cleanup = fixture + client.endpoint = replace(client.endpoint, host="203.0.113.7") + with pytest.raises(ValueError, match="local"): + close(client) + ping.assert_not_called() + socket.send.assert_not_called() + terminate.assert_not_called() + + +def test_pid_reuse_does_not_signal_replacement(monkeypatch): + process = Mock() + process.create_time.return_value = 101.0 + monkeypatch.setattr("zmqruntime.messages.psutil.Process", lambda *_: process) + assert IDENTITY.terminate() + process.terminate.assert_not_called() + process.kill.assert_not_called() + + +@pytest.mark.parametrize("matching", [False, True]) +@pytest.mark.parametrize("mode", [EndpointShutdownMode.GRACEFUL, EndpointShutdownMode.FORCE]) +def test_native_shutdown_handler_checks_incarnation_before_worker_mutation( + monkeypatch, matching, mode +): + server = Server(port=5913, transport_mode=TransportMode.TCP) + server._cancel_all_executions = Mock() + server._kill_worker_processes = Mock(return_value=0) + server.request_shutdown = Mock() + monkeypatch.setattr(ProcessIdentity, "current", classmethod(lambda _cls: IDENTITY)) + identity = IDENTITY if matching else replace(IDENTITY, create_time=101.0) + request = EndpointShutdownRequest(mode.control_message_type, identity) + assert EndpointShutdownRequest.from_wire_payload(request.to_wire_payload()) == request + response = server.handle_control_message(request.to_dict()) + if not matching: + assert response[MessageFields.STATUS] == ResponseType.ERROR.value + server._cancel_all_executions.assert_not_called() + server._kill_worker_processes.assert_not_called() + server.request_shutdown.assert_not_called() + else: + assert response[MessageFields.TYPE] == ResponseType.SHUTDOWN_ACK.value + server._cancel_all_executions.assert_called_once() + server._kill_worker_processes.assert_called_once() + assert server.request_shutdown.call_count == int(mode is EndpointShutdownMode.FORCE) + + +@pytest.mark.parametrize("stale", [False, True]) +def test_ipc_cleanup_uses_existing_stale_address_owner(tmp_path, monkeypatch, stale): + monkeypatch.setenv("HOME", str(tmp_path)) + client = Client(port=5913, transport_mode=TransportMode.IPC, config=ZMQConfig()) + declaration = client.transport_mode.declaration + paths = [] + for port in client.endpoint.port_pair(client.config).ports: + lock = declaration.startup_lock_path(port, client.config) + lock.parent.mkdir(parents=True, exist_ok=True) + lock.touch() + declaration.record_startup_owner(port, client.config, IDENTITY) + socket_path = declaration.socket_path(port, client.config) + socket_path.write_text("socket sentinel", encoding="utf-8") + paths.append(socket_path) + monkeypatch.setattr(TransportEndpoint, "ping", lambda *_args, **_kwargs: None) + monkeypatch.setattr(declaration, "endpoint_is_stale", lambda *_: stale) + monkeypatch.setattr(ProcessIdentity, "is_alive", lambda _self: False) + terminate = Mock(side_effect=AssertionError("Terminal incarnation must not be signalled")) + monkeypatch.setattr(ProcessIdentity, "terminate", terminate) + result = close(client) + assert result.process_exited is True and not result.request_attempted + assert result.succeeded is stale + assert all(path.exists() is not stale for path in paths) + terminate.assert_not_called() + + +def test_process_owner_uses_single_total_budget_for_term_kill_wait(monkeypatch): + clock = [10.0] + monkeypatch.setattr("zmqruntime.timeouts.time.monotonic", lambda: clock[0]) + process = Mock() + process.create_time.return_value = IDENTITY.create_time + process.is_running.return_value = True + process.status.return_value = psutil.STATUS_RUNNING + waits = [] + + def wait(*, timeout): + waits.append(timeout) + clock[0] += timeout + if len(waits) == 1: + raise psutil.TimeoutExpired(timeout) + return 0 + + process.wait.side_effect = wait + monkeypatch.setattr("zmqruntime.messages.psutil.Process", lambda *_: process) + assert IDENTITY.terminate(timeout=5.0) + assert waits == [2.5, 2.5] + process.terminate.assert_called_once() + process.kill.assert_called_once() + + +def test_process_owner_does_not_kill_reused_pid_after_term_wait(monkeypatch): + process = Mock() + process.create_time.return_value = IDENTITY.create_time + process.is_running.side_effect = [True, False] + process.status.return_value = psutil.STATUS_RUNNING + process.wait.side_effect = psutil.TimeoutExpired(1) + monkeypatch.setattr("zmqruntime.messages.psutil.Process", lambda *_: process) + assert IDENTITY.terminate(timeout=5.0) + process.kill.assert_not_called() From 28d9ed6a0121ebb524ae37fd97de5355308bda7f Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 30 Sep 2026 03:02:34 -0400 Subject: [PATCH 04/10] Release exact provisional reservations on proven pre-spawn failure --- .../validation/issue251_bootstrap_20260930.md | 40 +++ src/zmqruntime/client.py | 18 +- src/zmqruntime/transport_modes.py | 23 ++ tests/test_owned_startup.py | 227 +++++++++++++++++- 4 files changed, 300 insertions(+), 8 deletions(-) diff --git a/docs/validation/issue251_bootstrap_20260930.md b/docs/validation/issue251_bootstrap_20260930.md index 2a4d83f..6da50e9 100644 --- a/docs/validation/issue251_bootstrap_20260930.md +++ b/docs/validation/issue251_bootstrap_20260930.md @@ -63,3 +63,43 @@ BOUND-1/2 decode the incarnation once into its original declaration before effects; TIME-7 admits native lifecycle paths before acquiring locks. No full NRA/global equivalence claim. Native cross-process and installed acceptance remain gated on the parent's released serial slot and paired integration. + +## Pre-spawn rollback correction (parent review, September30) + +Parent's pinned9a93bbe reproducer expires the original deadline immediately after +both provisional invoker records: zero spawn calls, but both records remain owned +by the live invoker and reject a fresh independent startup. Original receipt is +preserved at the batch's pr256-prebind-review-20260930/receipt.json; not replayed. + +ZMQClient now rolls back only the provisional publication/deadline/cancellation +section, while both existing startup locks are still held. TransportDeclaration +owns exact ProcessIdentity comparison and in-place truncation of a proven record. +Unknown/malformed/different-incarnation/child records are not cleared. No lock +inode is unlinked, no new launcher/reservation store/codec is introduced, and +exceptions retain their original disposition. The spawn call is outside rollback: +spawn exceptions and failed child publication retain claims/uncertainty, with no +automatic restart, shutdown or retry. No timeout increase. + +Thirteen new source regression cases cover post-reservation expiry, second-write +failure before and after complete publication, cancellation, partial unknown +publication, real flock exclusion on both held inodes, explicit independent +startup admission after proven no-child rollback, post-spawn uncertainty, and +TCP/IPC inherited exact-owner release. Native spawn, occupancy and availability +are intercepted; ProcessIdentity, lock acquisition and record I/O are canonical. +Tests use named persistent scratch; no native/MCP/GUI/Java/science launch. + +Focused dependency shard:45 passed in0.40s, whole process3.68s/362564KiB RSS/exit0. +Combined paired source shard:136 passed,2 actual-MCP cases deselected in10.64s, +whole process14.18s/432464KiB RSS/exit0. Source paths verified before execution. +An initial fixture-path mkdir failure (44 passed,1 failed) is retained, corrected +by placing projected locks in their own subdirectory; no assertion was weakened. +Actual logs/resource captures are in paired OpenHCS256: +docs/validation/runtime_bootstrap_20260930/pre-spawn-rollback/. + +Pattern review: IMPL-13 keeps startup/rollback at the existing canonical client +and transport owners; IDEN-8 compares the original PID+creation-time value, not +bare PID/liveness; BOUND-2 reuses startup_owner/ProcessIdentity decoding rather +than a consumer JSON parser or filename store. Same transport-family ancestor +serves TCP and IPC; no leaf registry/case switch was added. This is focused +source evidence, not broad NRA/ratchet, native cross-process, installed or live +acceptance. Parent owns those later tiers; OpenHCS256 remains draft for issue251. diff --git a/src/zmqruntime/client.py b/src/zmqruntime/client.py index 92e9e8d..ef003c1 100644 --- a/src/zmqruntime/client.py +++ b/src/zmqruntime/client.py @@ -913,11 +913,19 @@ def start_owned_process( ) if self._connection_cancelled(): raise EndpointConnectionCancelledError("Startup cancelled before spawn") - # Reserve before the side effect. A failed child publication - # must leave an active claim, not invite a concurrent replay. - for port in ports: - declaration.record_startup_owner(port, self.config, ProcessIdentity.current()) - operation_deadline.remaining_seconds() + # Roll back only while no spawn has been attempted. Once the + # side effect starts, claims preserve uncertainty, not replay. + invoker = ProcessIdentity.current() + try: + for port in ports: + declaration.record_startup_owner(port, self.config, invoker) + operation_deadline.remaining_seconds() + if self._connection_cancelled(): + raise EndpointConnectionCancelledError("Startup cancelled before spawn") + except BaseException: + for port in ports: + declaration.release_startup_owner(port, self.config, invoker) + raise process = endpoint_process(self._spawn_server_process()) try: for port in ports: diff --git a/src/zmqruntime/transport_modes.py b/src/zmqruntime/transport_modes.py index ad763cc..b31f678 100644 --- a/src/zmqruntime/transport_modes.py +++ b/src/zmqruntime/transport_modes.py @@ -176,6 +176,29 @@ def record_startup_owner( stream.truncate() stream.flush() + @classmethod + def release_startup_owner( + cls, + port: int, + config: ZMQConfig, + owner: ProcessIdentity, + ) -> bool: + """Release an exact provisional owner before spawn, under startup_lock. + + Unknown or changed records stay intact. Truncate the held lock's inode; + unlinking it would let another caller bypass the process-shared lock. + """ + try: + recorded_owner = cls.startup_owner(port, config) + except (ValueError, TypeError, KeyError): + return False + if recorded_owner != owner: + return False + with cls.startup_lock_path(port, config).open("r+b") as stream: + stream.truncate(0) + stream.flush() + return True + @classmethod @abstractmethod def data_control_pair_is_available( diff --git a/tests/test_owned_startup.py b/tests/test_owned_startup.py index abf8282..ef52f4c 100644 --- a/tests/test_owned_startup.py +++ b/tests/test_owned_startup.py @@ -4,11 +4,17 @@ from dataclasses import replace import pytest +import portalocker -from zmqruntime.client import EndpointProcess, ZMQClient +from zmqruntime.client import ( + EndpointConnectionCancelledError, + EndpointProcess, + EndpointStartupUncertainError, + ZMQClient, +) from zmqruntime.config import TransportMode, ZMQConfig from zmqruntime.messages import ProcessIdentity -from zmqruntime.timeouts import OperationDeadline +from zmqruntime.timeouts import OperationCancellation, OperationDeadline class Process(EndpointProcess): @@ -37,10 +43,14 @@ def send_data(self, data): @pytest.fixture def client(tmp_path, monkeypatch): - monkeypatch.setenv("HOME", str(tmp_path)) result = Client( port=5913, host="127.0.0.1", transport_mode=TransportMode.TCP, config=ZMQConfig() ) + monkeypatch.setattr( + result.transport_mode.declaration, + "startup_lock_path", + lambda port, config: tmp_path / "locks" / f"{port}.startup.lock", + ) result.spawn = Mock(return_value=Process()) return result @@ -122,3 +132,214 @@ def test_expired_budget_never_spawns(client): with pytest.raises(TimeoutError): client.start_owned_process(operation_deadline=deadline) client.spawn.assert_not_called() + + +@pytest.fixture +def empty_pair(client, monkeypatch): + monkeypatch.setattr(type(client.endpoint), "occupied_ports", lambda *_: frozenset()) + monkeypatch.setattr( + client.transport_mode.declaration, "data_control_pair_is_available", lambda *_: True + ) + return client + + +def assert_released_under_pair_locks(client, monkeypatch): + """Observe the real release, retaining inode and lock exclusion evidence.""" + declaration = client.transport_mode.declaration + original_release = declaration.release_startup_owner + released = [] + ports = sorted(client.endpoint.port_pair(client.config).ports) + + def release(port, config, owner): + inodes = {p: declaration.startup_lock_path(p, config).stat().st_ino for p in ports} + for p in ports: + with declaration.startup_lock_path(p, config).open("r+b") as contender: + with pytest.raises(portalocker.exceptions.AlreadyLocked): + portalocker.lock(contender, portalocker.LOCK_EX | portalocker.LOCK_NB) + result = original_release(port, config, owner) + assert {p: declaration.startup_lock_path(p, config).stat().st_ino for p in ports} == inodes + released.append((port, result)) + return result + + monkeypatch.setattr(declaration, "release_startup_owner", release) + return released + + +def assert_independent_start_admitted(client): + independent = Client( + port=client.port, + host=client.host, + transport_mode=client.transport_mode, + config=client.config, + ) + independent.spawn = Mock(return_value=Process()) + start(independent) + independent.spawn.assert_called_once() + + +def test_expiry_after_both_provisional_records_rolls_back_before_spawn( + empty_pair, monkeypatch +): + client = empty_pair + declaration = client.transport_mode.declaration + ports = sorted(client.endpoint.port_pair(client.config).ports) + original_record = declaration.record_startup_owner + deadline = OperationDeadline.after_milliseconds(500, operation="pre-spawn expiry") + released = assert_released_under_pair_locks(client, monkeypatch) + + def record(port, config, owner): + original_record(port, config, owner) + if port == ports[-1]: + object.__setattr__(deadline, "expires_at", 0) + + with monkeypatch.context() as fault: + fault.setattr(declaration, "record_startup_owner", record) + with pytest.raises(TimeoutError): + client.start_owned_process(operation_deadline=deadline) + client.spawn.assert_not_called() + assert released == [(port, True) for port in ports] + assert all(declaration.startup_owner(port, client.config) is None for port in ports) + assert_independent_start_admitted(client) + + +@pytest.mark.parametrize("published_before_error", [False, True]) +def test_second_provisional_publication_failure_rolls_back_before_spawn( + empty_pair, monkeypatch, published_before_error +): + client = empty_pair + declaration = client.transport_mode.declaration + ports = sorted(client.endpoint.port_pair(client.config).ports) + original_record = declaration.record_startup_owner + failure = OSError("second provisional publication failed") + released = assert_released_under_pair_locks(client, monkeypatch) + + def record(port, config, owner): + if port != ports[-1] or published_before_error: + original_record(port, config, owner) + if port == ports[-1]: + raise failure + + with monkeypatch.context() as fault: + fault.setattr(declaration, "record_startup_owner", record) + with pytest.raises(OSError) as raised: + start(client) + assert raised.value is failure + client.spawn.assert_not_called() + assert released == [(ports[0], True), (ports[1], published_before_error)] + assert all(declaration.startup_owner(port, client.config) is None for port in ports) + assert_independent_start_admitted(client) + + +def test_cancellation_after_reservation_rolls_back_without_spawn(empty_pair, monkeypatch): + client = empty_pair + declaration = client.transport_mode.declaration + original_record = declaration.record_startup_owner + ports = sorted(client.endpoint.port_pair(client.config).ports) + released = assert_released_under_pair_locks(client, monkeypatch) + + def record(port, config, owner): + original_record(port, config, owner) + if port == ports[-1]: + client._connection_cancellation.get().cancel() + + monkeypatch.setattr(declaration, "record_startup_owner", record) + with pytest.raises(EndpointConnectionCancelledError): + start(client) + client.spawn.assert_not_called() + assert released == [(port, True) for port in ports] + + +def test_partial_second_record_remains_unknown_after_pre_spawn_failure(empty_pair, monkeypatch): + client = empty_pair + declaration = client.transport_mode.declaration + ports = sorted(client.endpoint.port_pair(client.config).ports) + original_record = declaration.record_startup_owner + failure = OSError("partial provisional publication") + released = assert_released_under_pair_locks(client, monkeypatch) + + def record(port, config, owner): + if port == ports[-1]: + declaration.startup_lock_path(port, config).write_text("partial", encoding="utf-8") + raise failure + original_record(port, config, owner) + + with monkeypatch.context() as fault: + fault.setattr(declaration, "record_startup_owner", record) + with pytest.raises(OSError) as raised: + start(client) + assert raised.value is failure + client.spawn.assert_not_called() + assert released == [(ports[0], True), (ports[1], False)] + assert declaration.startup_owner(ports[0], client.config) is None + assert declaration.startup_lock_path(ports[1], client.config).read_text() == "partial" + with pytest.raises(ValueError): + assert_independent_start_admitted(client) + client.spawn.assert_not_called() + + +@pytest.mark.parametrize("spawn_returns_child", [False, True]) +def test_spawn_boundary_failure_never_rolls_back_or_replays( + empty_pair, monkeypatch, spawn_returns_child +): + client = empty_pair + declaration = client.transport_mode.declaration + ports = sorted(client.endpoint.port_pair(client.config).ports) + release = Mock(side_effect=AssertionError("Post-spawn rollback is forbidden")) + monkeypatch.setattr(declaration, "release_startup_owner", release) + failure = OSError("spawn or child publication uncertain") + child = Process() + child.identity = replace(ProcessIdentity.current(), create_time=1.0) + + if spawn_returns_child: + client.spawn.return_value = child + original_record = declaration.record_startup_owner + + def record(port, config, owner): + if owner == child.identity: + if port == ports[-1]: + raise failure + original_record(port, config, owner) + + monkeypatch.setattr(declaration, "record_startup_owner", record) + with pytest.raises(EndpointStartupUncertainError) as raised: + start(client) + assert raised.value.process is child + assert raised.value.__cause__ is failure + assert declaration.startup_owner(ports[0], client.config) == child.identity + else: + client.spawn.side_effect = failure + with pytest.raises(OSError) as raised: + start(client) + assert raised.value is failure + assert declaration.startup_owner(ports[0], client.config) == ProcessIdentity.current() + assert declaration.startup_owner(ports[-1], client.config) == ProcessIdentity.current() + client.spawn.assert_called_once() + release.assert_not_called() + + +@pytest.mark.parametrize("mode", [TransportMode.TCP, TransportMode.IPC]) +@pytest.mark.parametrize("record", ["unknown", "different_incarnation", "child"]) +def test_provisional_release_preserves_unproved_or_changed_owner( + client, monkeypatch, mode, record +): + declaration = mode.declaration + paths = client.transport_mode.declaration.startup_lock_path + monkeypatch.setattr(declaration, "startup_lock_path", paths) + with declaration.startup_lock(client.port, client.config, None, OperationCancellation()): + owner = ProcessIdentity.current() + path = declaration.startup_lock_path(client.port, client.config) + if record == "unknown": + path.write_text("unknown partial record", encoding="utf-8") + else: + recorded = replace(owner, create_time=1.0) + if record == "child": + recorded = replace(recorded, pid=owner.pid + 1) + declaration.record_startup_owner(client.port, client.config, recorded) + before = path.read_bytes() + inode = path.stat().st_ino + assert declaration.release_startup_owner(client.port, client.config, owner) is False + assert path.read_bytes() == before + assert path.stat().st_ino == inode + if record == "unknown": + with pytest.raises(ValueError): + declaration.startup_owner(client.port, client.config) From 4434b11ed769cbc6a15d13754b06529ea6494428 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 30 Sep 2026 07:47:27 -0400 Subject: [PATCH 05/10] Keep paired reservations and shutdown behavior on existing endpoint owners --- src/zmqruntime/client.py | 298 +++++++++++++------------------ src/zmqruntime/transport.py | 124 ++++++++++++- tests/test_endpoint_ownership.py | 128 +++++++++++++ tests/test_owned_startup.py | 20 +++ 4 files changed, 390 insertions(+), 180 deletions(-) create mode 100644 tests/test_endpoint_ownership.py diff --git a/src/zmqruntime/client.py b/src/zmqruntime/client.py index ef003c1..c69e3ea 100644 --- a/src/zmqruntime/client.py +++ b/src/zmqruntime/client.py @@ -9,8 +9,8 @@ import time from abc import ABC, abstractmethod from collections.abc import Callable -from concurrent.futures import ThreadPoolExecutor, wait -from contextlib import ExitStack, contextmanager +from concurrent.futures import ThreadPoolExecutor +from contextlib import contextmanager from contextvars import ContextVar from dataclasses import dataclass, field, replace from enum import Enum @@ -44,7 +44,6 @@ from zmqruntime.transport import ( TransportEndpoint, endpoint_startup_lock, - get_control_port, is_port_in_use, request_control_ping, resolve_transport_mode, @@ -560,6 +559,77 @@ class _EndpointShutdownOperation: acknowledged: bool request_attempted: bool + @classmethod + def run( + cls, + target: TransportEndpoint, + config: ZMQConfig, + mode: EndpointShutdownMode, + *, + deadline: OperationDeadline, + expected_process_identity: ProcessIdentity | None, + ) -> EndpointShutdownResult: + """Admit one native request and complete it through the selected mode. + + Dispatch, acknowledgement uncertainty and terminal observation belong + to this same operation. Neither a client nor a completion leaf resends. + """ + endpoint = target.ping( + config, timeout_ms=min(deadline.remaining_milliseconds(), 1000), + ) + if ( + expected_process_identity is not None + and endpoint is not None + and endpoint.process_identity != expected_process_identity + ): + raise RuntimeError("Endpoint incarnation changed before shutdown; no dispatch") + process_identity = ( + expected_process_identity + if expected_process_identity is not None + else (None if endpoint is None else endpoint.process_identity) + ) + if endpoint is None and process_identity is None and not target.occupied_ports(config): + return EndpointShutdownResult(succeeded=True, endpoint_terminated=True) + if endpoint is not None and mode.required_capability not in endpoint.control_capabilities: + return EndpointShutdownResult(succeeded=False, endpoint_terminated=False) + if endpoint is None and expected_process_identity is None: + return EndpointShutdownResult(succeeded=False, endpoint_terminated=False) + + acknowledged = False + request_attempted = False + sock = None + try: + # A missing listener cannot receive an RPC. Reconcile the proven + # incarnation without another request or implicit replacement. + if endpoint is not None and ( + expected_process_identity is None or expected_process_identity.is_alive() is True + ): + ctx = zmq.Context.instance() + sock = ctx.socket(zmq.REQ) + sock.setsockopt(zmq.LINGER, 0) + sock.connect(target.control_url(config)) + sock.setsockopt(zmq.SNDTIMEO, min(deadline.remaining_milliseconds(), 1000)) + request_attempted = True + sock.send(EndpointShutdownRequest( + mode.control_message_type, process_identity, + ).to_wire_payload()) + sock.setsockopt(zmq.RCVTIMEO, min(deadline.remaining_milliseconds(), 1000)) + ack = pickle.loads(sock.recv()) + acknowledged = ack.get(MessageFields.TYPE) == ResponseType.SHUTDOWN_ACK.value + except ( + EOFError, KeyError, OSError, TypeError, pickle.PickleError, + TimeoutError, zmq.ZMQError, + ): + acknowledged = False + finally: + if sock is not None: + sock.close(linger=0) + return mode.complete(cls( + target=target, deadline=deadline, config=config, + process_identity=process_identity, + acknowledged=acknowledged, request_attempted=request_attempted, + )) + def acknowledgement_result(self) -> EndpointShutdownResult: """Report whether a non-terminating shutdown request was acknowledged.""" @@ -686,6 +756,27 @@ def complete( return self._completion(operation) + def close_owned_process( + self, + target: TransportEndpoint, + config: ZMQConfig, + process_identity: ProcessIdentity, + *, + operation_deadline: OperationDeadline, + ) -> EndpointShutdownResult: + """Admit this pair's exact owner before the one shutdown operation.""" + if not target.transport_mode.declaration.endpoint_is_local(target.host, target.port): + raise ValueError("Owned process close requires a local endpoint") + with target.startup_lock(config, operation_deadline=operation_deadline) as acquired: + if not acquired: + raise EndpointConnectionCancelledError("Close cancelled before dispatch") + target.require_startup_owner(config, process_identity) + operation_deadline.remaining_seconds() + return _EndpointShutdownOperation.run( + target, config, self, deadline=operation_deadline, + expected_process_identity=process_identity, + ) + class ZMQClient(ABC): """ABC for ZMQ clients - dual-channel pattern with auto-spawning.""" @@ -878,34 +969,15 @@ def start_owned_process( with self._ensure_connection_attempt(), self._lock: if self._connection is not None: raise RuntimeError("Explicit startup cannot adopt an existing connection") - ports = sorted(self.endpoint.port_pair(self.config).ports) - with ExitStack() as locks: - for port in ports: - acquired = locks.enter_context( - endpoint_startup_lock( - port, - self.transport_mode, - self.config, - operation_deadline=operation_deadline, - cancellation=self._connection_cancellation.get(), - ) - ) - if not acquired: - raise EndpointConnectionCancelledError("Startup cancelled before spawn") + with self.endpoint.startup_lock( + self.config, + operation_deadline=operation_deadline, + cancellation=self._connection_cancellation.get(), + ) as acquired: + if not acquired: + raise EndpointConnectionCancelledError("Startup cancelled before spawn") operation_deadline.remaining_seconds() - for port in ports: - prior_owner = declaration.startup_owner(port, self.config) - if prior_owner is not None and prior_owner.is_alive() is not False: - raise RuntimeError("An existing startup owner reserves this endpoint") - if self.endpoint.occupied_ports(self.config): - raise RuntimeError("Explicit startup requires an empty data/control pair") - if not declaration.data_control_pair_is_available( - self.port, - self.control_port, - self.host, - self.config, - ): - raise RuntimeError("Execution endpoint pair is unavailable") + self.endpoint.require_available_startup(self.config) operation_deadline.remaining_seconds() self._emit_connection_status( EndpointStartupPhase.STARTING_PROCESS, @@ -915,21 +987,15 @@ def start_owned_process( raise EndpointConnectionCancelledError("Startup cancelled before spawn") # Roll back only while no spawn has been attempted. Once the # side effect starts, claims preserve uncertainty, not replay. - invoker = ProcessIdentity.current() - try: - for port in ports: - declaration.record_startup_owner(port, self.config, invoker) - operation_deadline.remaining_seconds() - if self._connection_cancelled(): - raise EndpointConnectionCancelledError("Startup cancelled before spawn") - except BaseException: - for port in ports: - declaration.release_startup_owner(port, self.config, invoker) - raise + if not self.endpoint.reserve_startup_owner( + self.config, ProcessIdentity.current(), + operation_deadline=operation_deadline, + cancellation=self._connection_cancellation.get(), + ): + raise EndpointConnectionCancelledError("Startup cancelled before spawn") process = endpoint_process(self._spawn_server_process()) try: - for port in ports: - declaration.record_startup_owner(port, self.config, process.identity) + self.endpoint.record_startup_owner(self.config, process.identity) except Exception as error: raise EndpointStartupUncertainError(process) from error return process @@ -946,33 +1012,10 @@ def close_owned_process( No attach/start, port-owner killing, second process store, or RPC retry. Caller-supplied PID/creation time alone is not ownership admission. """ - declaration = self.transport_mode.declaration - if not declaration.endpoint_is_local(self.host, self.port): - raise ValueError("Owned process close requires a local endpoint") - with ExitStack() as locks: - for port in sorted(self.endpoint.port_pair(self.config).ports): - acquired = locks.enter_context( - endpoint_startup_lock( - port, - self.transport_mode, - self.config, - operation_deadline=operation_deadline, - ) - ) - if not acquired: - raise EndpointConnectionCancelledError("Close cancelled before dispatch") - if declaration.startup_owner(port, self.config) != process_identity: - raise RuntimeError("Endpoint pair is not reserved by this exact child") - operation_deadline.remaining_seconds() - return self.shutdown_endpoint_on_port( - self.port, - mode=mode, - transport_mode=self.transport_mode, - host=self.host, - config=self.config, - expected_process_identity=process_identity, - operation_deadline=operation_deadline, - ) + return mode.close_owned_process( + self.endpoint, self.config, process_identity, + operation_deadline=operation_deadline, + ) def _connect_locked( self, @@ -987,9 +1030,7 @@ def _connect_locked( return True if self._connection_cancelled(): return self._cancelled_connection_result() - with endpoint_startup_lock( - self.port, - self.transport_mode, + with self.endpoint.startup_lock( self.config, operation_deadline=operation_deadline, cancellation=self._connection_cancellation.get(), @@ -1023,8 +1064,7 @@ def _connect_locked( time.sleep(min(0.5, operation_deadline.remaining_seconds())) if self._connection_cancelled(): return self._cancelled_connection_result() - prior_owner = self.transport_mode.declaration.startup_owner(self.port, self.config) - if prior_owner is not None and prior_owner.is_alive() is not False: + if self.endpoint.has_live_startup_owner(self.config): return False self._emit_connection_status( EndpointStartupPhase.STARTING_PROCESS, @@ -1281,39 +1321,10 @@ def scan_servers( ): config = config or ZMQConfig() transport_mode = resolve_transport_mode(transport_mode) - ports = tuple(ports) - if not ports: - return [] - - def scan_port(port): - pong = request_control_ping( - port, - transport_mode, - host=host, - config=config, - timeout_ms=timeout_ms, - ) - if pong is None: - return None - return replace( - pong, - port=port, - control_port=get_control_port(port, config), - ) - - servers = [] - worker_count = min(len(ports), 32) - executor = ThreadPoolExecutor(max_workers=worker_count) - try: - futures = tuple(executor.submit(scan_port, port) for port in ports) - done, _ = wait(futures, timeout=max(timeout_ms / 1000, 0.001)) - for future in done: - server = future.result() - if server is not None: - servers.append(server) - finally: - executor.shutdown(wait=False, cancel_futures=True) - return sorted(servers, key=lambda server: ports.index(server.port)) + return TransportEndpoint.scan( + tuple(ports), host=host, transport_mode=transport_mode, + config=config, timeout_ms=timeout_ms, + ) @staticmethod def shutdown_endpoint_on_port( @@ -1339,74 +1350,9 @@ def shutdown_endpoint_on_port( port=port, transport_mode=transport_mode, ) - endpoint = target.ping( - config, - timeout_ms=min(deadline.remaining_milliseconds(), 1000), - ) - if ( - expected_process_identity is not None - and endpoint is not None - and endpoint.process_identity != expected_process_identity - ): - raise RuntimeError("Endpoint incarnation changed before shutdown; no dispatch") - process_identity = ( - expected_process_identity - if expected_process_identity is not None - else (None if endpoint is None else endpoint.process_identity) - ) - if endpoint is None and process_identity is None and not target.occupied_ports(config): - return EndpointShutdownResult(succeeded=True, endpoint_terminated=True) - if endpoint is not None and mode.required_capability not in endpoint.control_capabilities: - return EndpointShutdownResult(succeeded=False, endpoint_terminated=False) - if endpoint is None and expected_process_identity is None: - return EndpointShutdownResult(succeeded=False, endpoint_terminated=False) - - acknowledged = False - request_attempted = False - sock = None - try: - # An absent listener cannot receive an RPC. Reconcile/close the - # explicitly proven incarnation without replaying shutdown. - if endpoint is not None and ( - expected_process_identity is None or expected_process_identity.is_alive() is True - ): - ctx = zmq.Context.instance() - sock = ctx.socket(zmq.REQ) - sock.setsockopt(zmq.LINGER, 0) - sock.connect(target.control_url(config)) - sock.setsockopt(zmq.SNDTIMEO, min(deadline.remaining_milliseconds(), 1000)) - request_attempted = True - sock.send( - EndpointShutdownRequest( - mode.control_message_type, process_identity - ).to_wire_payload() - ) - sock.setsockopt(zmq.RCVTIMEO, min(deadline.remaining_milliseconds(), 1000)) - ack = pickle.loads(sock.recv()) - acknowledged = ack.get(MessageFields.TYPE) == ResponseType.SHUTDOWN_ACK.value - except ( - EOFError, - KeyError, - OSError, - TypeError, - pickle.PickleError, - TimeoutError, - zmq.ZMQError, - ): - acknowledged = False - finally: - if sock is not None: - sock.close(linger=0) - - return mode.complete( - _EndpointShutdownOperation( - target=target, - deadline=deadline, - config=config, - process_identity=process_identity, - acknowledged=acknowledged, - request_attempted=request_attempted, - ) + return _EndpointShutdownOperation.run( + target, config, mode, deadline=deadline, + expected_process_identity=expected_process_identity, ) @staticmethod diff --git a/src/zmqruntime/transport.py b/src/zmqruntime/transport.py index 1aa9f73..c6ceef6 100644 --- a/src/zmqruntime/transport.py +++ b/src/zmqruntime/transport.py @@ -4,15 +4,16 @@ import pickle import time -from collections.abc import Collection -from contextlib import contextmanager -from dataclasses import dataclass +from collections.abc import Collection, Iterator +from concurrent.futures import ThreadPoolExecutor, wait +from contextlib import ExitStack, contextmanager +from dataclasses import dataclass, replace from pathlib import Path import zmq from zmqruntime.config import TransportMode, ZMQConfig -from zmqruntime.messages import ControlMessageType, ControlRequestHeader, PongResponse +from zmqruntime.messages import ControlMessageType, ControlRequestHeader, PongResponse, ProcessIdentity from zmqruntime.startup import ( IDLE_ENDPOINT_STARTUP_OBSERVER, EndpointStartupObserver, @@ -43,6 +44,121 @@ class TransportEndpoint: port: int transport_mode: TransportMode + @contextmanager + def startup_lock( + self, + config: ZMQConfig, + *, + operation_deadline: OperationDeadline | None = None, + cancellation: OperationCancellation | None = None, + ) -> Iterator[bool]: + """Hold this entire pair in canonical order through its transport owner.""" + with ExitStack() as locks: + for port in sorted(self.port_pair(config).ports): + acquired = locks.enter_context(endpoint_startup_lock( + port, self.transport_mode, config, + operation_deadline=operation_deadline, cancellation=cancellation, + )) + if not acquired: + yield False + return + yield True + + def require_available_startup(self, config: ZMQConfig) -> None: + """Admit a new child under both held locks, never adopt a live owner.""" + declaration = self.transport_mode.declaration + if self.has_live_startup_owner(config): + raise RuntimeError("An existing startup owner reserves this endpoint") + if self.occupied_ports(config): + raise RuntimeError("Explicit startup requires an empty data/control pair") + if not declaration.data_control_pair_is_available( + self.port, self.control_port(config), self.host, config, + ): + raise RuntimeError("Execution endpoint pair is unavailable") + + def has_live_startup_owner(self, config: ZMQConfig) -> bool: + """Observe pending ownership across both held addresses, fail closed.""" + for port in sorted(self.port_pair(config).ports): + owner = self.transport_mode.declaration.startup_owner(port, config) + if owner is not None and owner.is_alive() is not False: + return True + return False + + def record_startup_owner(self, config: ZMQConfig, owner: ProcessIdentity) -> None: + """Publish the same incarnation to both existing records under held locks.""" + for port in sorted(self.port_pair(config).ports): + self.transport_mode.declaration.record_startup_owner(port, config, owner) + + def reserve_startup_owner( + self, + config: ZMQConfig, + owner: ProcessIdentity, + *, + operation_deadline: OperationDeadline, + cancellation: OperationCancellation | None, + ) -> bool: + """Publish provisional ownership before spawn; undo only this no-child stage. + + Caller holds both locks. The declaration releases only an exact match + and retains the inode. Child/unknown records and all post-spawn failures + remain outside this transaction; no launch or retry belongs here. + """ + reserved = False + try: + self.record_startup_owner(config, owner) + operation_deadline.remaining_seconds() + reserved = cancellation is None or not cancellation.requested() + return reserved + finally: + if not reserved: + for port in sorted(self.port_pair(config).ports): + self.transport_mode.declaration.release_startup_owner(port, config, owner) + + def require_startup_owner(self, config: ZMQConfig, owner: ProcessIdentity) -> None: + """Require this exact incarnation at both addresses under held locks.""" + for port in sorted(self.port_pair(config).ports): + if self.transport_mode.declaration.startup_owner(port, config) != owner: + raise RuntimeError("Endpoint pair is not reserved by this exact child") + + def discovery_response( + self, config: ZMQConfig, *, timeout_ms: int, + ) -> PongResponse | None: + """Project a typed discovery heartbeat onto its queried address owner.""" + pong = self.ping(config, timeout_ms=timeout_ms) + return None if pong is None else replace( + pong, port=self.port, control_port=self.control_port(config), + ) + + @classmethod + def scan( + cls, + ports: Collection[int], + *, + host: str, + transport_mode: TransportMode, + config: ZMQConfig, + timeout_ms: int, + ) -> list[PongResponse]: + """Collect bounded endpoint-owned observations in original query order.""" + ports = tuple(ports) + if not ports: + return [] + targets = tuple(cls(host, port, transport_mode) for port in ports) + servers = [] + executor = ThreadPoolExecutor(max_workers=min(len(ports), 32)) + try: + futures = tuple(executor.submit( + target.discovery_response, config, timeout_ms=timeout_ms, + ) for target in targets) + done, _ = wait(futures, timeout=max(timeout_ms / 1000, 0.001)) + for future in done: + server = future.result() + if server is not None: + servers.append(server) + finally: + executor.shutdown(wait=False, cancel_futures=True) + return sorted(servers, key=lambda server: ports.index(server.port)) + def data_url(self, config: ZMQConfig | None = None) -> str: """Return this endpoint's data socket URL.""" diff --git a/tests/test_endpoint_ownership.py b/tests/test_endpoint_ownership.py new file mode 100644 index 0000000..3f396c5 --- /dev/null +++ b/tests/test_endpoint_ownership.py @@ -0,0 +1,128 @@ +"""Endpoint-owner controls without sockets, native processes or executor threads.""" + +from concurrent.futures import Future +from dataclasses import replace +from unittest.mock import Mock + +import portalocker +import pytest + +from zmqruntime import transport as module +from zmqruntime.config import TransportMode, ZMQConfig +from zmqruntime.messages import PongResponse, ProcessIdentity, ServerRole +from zmqruntime.timeouts import OperationCancellation, OperationDeadline +from zmqruntime.transport import TransportEndpoint + + +@pytest.mark.parametrize("mode", tuple(TransportMode)) +@pytest.mark.parametrize("offset", [1, 17]) +def test_pair_transaction_consumes_selected_transport_and_incarnation( + tmp_path, monkeypatch, mode, offset, +): + config = ZMQConfig(control_port_offset=offset, app_name="owner-control") + endpoint = TransportEndpoint("127.0.0.1", 5980, mode) + declaration = mode.declaration + monkeypatch.setattr( + declaration, "startup_lock_path", lambda port, _config: tmp_path / f"{port}.lock", + ) + monkeypatch.setattr(TransportEndpoint, "occupied_ports", lambda *_: frozenset()) + availability = Mock(return_value=True) + monkeypatch.setattr(declaration, "data_control_pair_is_available", availability) + original_lock = declaration.startup_lock + acquisitions = [] + + def lock(port, selected_config, deadline, cancellation): + acquisitions.append((port, selected_config, deadline, cancellation)) + return original_lock(port, selected_config, deadline, cancellation) + + monkeypatch.setattr(declaration, "startup_lock", lock) + cancellation = OperationCancellation() + deadline = OperationDeadline.after_milliseconds(500, operation="pair source control") + owner = ProcessIdentity.current() + child = replace(owner, create_time=owner.create_time - 1) + ports = sorted(endpoint.port_pair(config).ports) + with endpoint.startup_lock( + config, operation_deadline=deadline, cancellation=cancellation, + ) as acquired: + assert acquired + assert acquisitions == [(port, config, deadline, cancellation) for port in ports] + for port in ports: + with declaration.startup_lock_path(port, config).open("r+b") as contender: + with pytest.raises(portalocker.exceptions.AlreadyLocked): + portalocker.lock(contender, portalocker.LOCK_EX | portalocker.LOCK_NB) + endpoint.require_available_startup(config) + availability.assert_called_once_with(5980, 5980 + offset, endpoint.host, config) + assert endpoint.reserve_startup_owner( + config, owner, operation_deadline=deadline, cancellation=cancellation, + ) + endpoint.require_startup_owner(config, owner) + with pytest.raises(RuntimeError, match="startup owner"): + endpoint.require_available_startup(config) + inodes = tuple(declaration.startup_lock_path(port, config).stat().st_ino for port in ports) + endpoint.record_startup_owner(config, child) + endpoint.require_startup_owner(config, child) + with pytest.raises(RuntimeError, match="not reserved"): + endpoint.require_startup_owner(config, owner) + assert tuple(declaration.startup_lock_path(port, config).stat().st_ino for port in ports) == inodes + assert all(declaration.startup_owner(port, config) == child for port in ports) + + +@pytest.mark.parametrize("mode", tuple(TransportMode)) +@pytest.mark.parametrize("ports", [(), (5990, 5988, 5988, 5989), tuple(range(5900, 5933))]) +def test_discovery_inherits_endpoint_behavior_and_preserves_bounds_order_and_absence( + monkeypatch, mode, ports, +): + config = ZMQConfig(control_port_offset=17) + probes = [] + pools = [] + pending_port = 5990 + absent_port = 5989 + + class Endpoint(TransportEndpoint): + def ping(self, selected_config, *, timeout_ms): + assert selected_config is config + assert timeout_ms == 1 + probes.append(self) + if self.port == absent_port: + return None + return PongResponse( + port=42, control_port=43, ready=True, server="endpoint-source-control", + server_role=ServerRole.EXECUTION, + ) + + class Pool: + def __init__(self, *, max_workers): + self.max_workers = max_workers + self.futures = [] + self.shutdown_calls = [] + pools.append(self) + + def submit(self, operation, selected_config, *, timeout_ms): + future = Future() + if operation.__self__.port != pending_port: + future.set_result(operation(selected_config, timeout_ms=timeout_ms)) + self.futures.append(future) + return future + + def shutdown(self, *, wait, cancel_futures): + self.shutdown_calls.append((wait, cancel_futures)) + for future in self.futures: + if cancel_futures and not future.done(): + future.cancel() + + monkeypatch.setattr(module, "ThreadPoolExecutor", Pool) + responses = Endpoint.scan( + ports, host="selected-host", transport_mode=mode, config=config, timeout_ms=1, + ) + expected = [port for port in ports if port not in (pending_port, absent_port)] + assert [pong.port for pong in responses] == expected + assert [pong.control_port for pong in responses] == [port + 17 for port in expected] + assert [endpoint.port for endpoint in probes] == [port for port in ports if port != pending_port] + assert all(endpoint.host == "selected-host" and endpoint.transport_mode is mode for endpoint in probes) + if ports: + assert len(pools) == 1 + assert pools[0].max_workers == min(len(ports), 32) + assert pools[0].shutdown_calls == [(False, True)] + assert all(future.done() for future in pools[0].futures) + else: + assert pools == [] and probes == [] diff --git a/tests/test_owned_startup.py b/tests/test_owned_startup.py index ef52f4c..1627374 100644 --- a/tests/test_owned_startup.py +++ b/tests/test_owned_startup.py @@ -134,6 +134,26 @@ def test_expired_budget_never_spawns(client): client.spawn.assert_not_called() +@pytest.mark.parametrize("control", [False, True]) +def test_ordinary_connect_preserves_both_pending_address_owners(client, monkeypatch, control): + declaration = client.transport_mode.declaration + reserved_port = client.control_port if control else client.port + path = declaration.startup_lock_path(reserved_port, client.config) + path.parent.mkdir(parents=True, exist_ok=True) + path.touch() + owner = ProcessIdentity.current() + declaration.record_startup_owner(reserved_port, client.config, owner) + inode = path.stat().st_ino + monkeypatch.setattr(client, "_is_port_in_use", lambda *_: False) + kill = Mock(side_effect=AssertionError("A pending child is not replaceable")) + monkeypatch.setattr(client, "_kill_processes_on_port", kill) + assert client.connect(timeout=0.01) is False + assert declaration.startup_owner(reserved_port, client.config) == owner + assert path.stat().st_ino == inode + client.spawn.assert_not_called() + kill.assert_not_called() + + @pytest.fixture def empty_pair(client, monkeypatch): monkeypatch.setattr(type(client.endpoint), "occupied_ports", lambda *_: frozenset()) From 2b3d821f1394b7a172f6276fe7e302f33d69be96 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 30 Sep 2026 08:00:40 -0400 Subject: [PATCH 06/10] Record paired endpoint ownership and original native ratchet closure --- .../issue251_owner_factoring_20260930.md | 126 ++++ ...e251_owner_factoring_ratchet_20260930.json | 576 ++++++++++++++++++ ...251_owner_factoring_resources_20260930.txt | 1 + docs/validation/issue251_pr_body_20260930.md | 37 +- 4 files changed, 735 insertions(+), 5 deletions(-) create mode 100644 docs/validation/issue251_owner_factoring_20260930.md create mode 100644 docs/validation/issue251_owner_factoring_ratchet_20260930.json create mode 100644 docs/validation/issue251_owner_factoring_resources_20260930.txt diff --git a/docs/validation/issue251_owner_factoring_20260930.md b/docs/validation/issue251_owner_factoring_20260930.md new file mode 100644 index 0000000..60b9e3f --- /dev/null +++ b/docs/validation/issue251_owner_factoring_20260930.md @@ -0,0 +1,126 @@ +# PR9 canonical endpoint ownership checkpoint + +Implementation: `4434b11ed769cbc6a15d13754b06529ea6494428`, after normal +integration of ACK main `3374aa881dd9a8d0382ac6a56f764eb118744a7b`. +Parent retains paired-pin review, integration, installation and live acceptance. +This is a source checkpoint, not activation or closure of OpenHCS issue251. + +## Behavior owners and replaced paths + +The existing TransportEndpoint owns the address pair. Its startup_lock now holds +both original declaration-owned locks in canonical order. Its admission, +publication, exact-incarnation check and provisional reservation transaction +consume the original TransportDeclaration record reader/writer/release methods. +The corresponding client procedures are deleted, not retained as another store, +launcher, lock resolver or rollback controller. Both explicit startup and ordinary +connect consume the pair owner. Ordinary connect cannot spawn through a pending +owner at either address; attach-only connect_existing remains non-starting. + +Pre-spawn publication/deadline/cancellation is the only rollback scope. Both locks +remain held; release matches the original ProcessIdentity and truncates the +existing inode. Unknown, partial, changed and child claims survive. Spawn and +child-publication failures remain outside rollback, preserving uncertainty and +the original child handle. No automatic launch/shutdown replay was introduced. + +The existing _EndpointShutdownOperation previously owned completion state but +the client owned request admission/dispatch. The operation now owns this entire +one-send procedure, using the same deadline, identity, socket and acknowledgement +disposition. The existing EndpointShutdownMode admits exact-owned close through +the pair owner, then completes that same operation. The client boundary selects +the nominal mode/config/deadline; no new helper service or lifecycle family. +FORCE still proves exact process exit separately from listener disappearance; +GRACEFUL still retains the server. The replaced client procedure is deleted. + +The existing TransportEndpoint now owns discovery_response and scan. Its ping +and control-port declarations supply typed heartbeat/address projection; the +old client closure/raw ping and copied projection are deleted. Original query +order, absent/pending outcomes, 32-worker cap and nonblocking executor teardown +are retained. No discovery registry, cached endpoint mirror or second decoder. + +New-case witnesses: + +- A changed pair topology/transport record semantics updates the existing pair + or transport declaration. Startup, ordinary connect and close all consume it; + tests use TCP/IPC with control offsets1/17, exact config/deadline and inode proof. +- A new shutdown acknowledgement/terminal disposition belongs to the existing + operation/mode, not independent dispatch and completion procedures in client. + Original owned-close controls retain one-send/unknown/changed-incarnation cases. +- Specialized discovery heartbeat behavior changes the endpoint ping owner. + A test endpoint subclass is consumed by the collector without another client + parser/address formula; absent, duplicate and pending results retain ordering. + +## Applicable catalog review and crossings + +Current NRA skill and authoritative archived refactor-audit skill/catalog were +read before these decisions. IMPL-12: deleted replaced client procedures; +IMPL-13 and IDEN-8: canonical lock/record and exact process-incarnation ownership, +no process registry or lock-inode replacement; BOUND-2: existing record decoder +and typed PongResponse, no copied wire parser; AGENT-6: behavior moved to three +pre-existing semantic owners with new-case witnesses, not a size-only mixin or +new forwarding controller. This is a scoped review, not all-detector/global proof. + +Whole PR9 production claim: client.py, execution/server.py, messages.py, +transport_modes.py and the additional TransportEndpoint surface in transport.py. +No edits to ACK-private listener/server/queue files, config.py, return-route, +viewer_state or execution/wait_policy. PR6/7 published files are disjoint. +Direct additional TransportEndpoint crossing sent to Dirac in +[PR11 comment](https://github.com/OpenHCSDev/ZMQRuntime/pull/11#issuecomment-5910632999). +Open PR inspection found no competing claim; direct acknowledgement/unpublished +claim clearance is NOT verified. Do not claim a prior agreement or merge this +crossing on that assumption. The broader sept2026refact archive author remains +unidentified. BLOCKED S1 is not resumed. + +## Actual provider-free source evidence + +Existing Python3.12, explicit own native/metaclass/python-introspect/pycodify src +paths, -B, plugin autoload disabled and CPU thread1. No install/environment change. +Bounded30s pytest shard: test_owned_startup.py, test_owned_close.py, +test_endpoint_ownership.py and test_startup.py. + +**81 passed, 0 skips/deselections,0.44s; process0.63s/44776KiB RSS/exit0.** +Popen/process/native I/O intercepted; original file locks/reservation records +are real. Discovery uses controlled synchronous futures, not executor threads. +No sockets, native/MCP/JVM/GUI/provider/scientific launch. Initial79-case XML +retained separately before ordinary-connect pending-owner closure. +Ruff undefined-name checks and git diff --check pass. +Durable XML in the paired OpenHCS tree: +[native-owner-tests-b.xml](https://github.com/OpenHCSDev/openhcs/blob/feat/owned-runtime-bootstrap-20260930/docs/validation/runtime_bootstrap_20260930/native-owner-tests-b.xml). + +After normal OpenHCS main4a9c9b3e integration, paired actual-source suite: +**181 passed, 0 skips/deselections,5.00s; process5.63s/257380KiB RSS/exit0**. +Includes100 OpenHCS and81 native controls. Recorded parent gitlink remained +28d9ed6 during this source check; PYTHONPATH used reviewed child4434b11 explicitly. +This distinction is not an installed/pin-adoption claim. + +## Original packaged native ratchet + +Original agent-comms debt_ratchet.py at3b03785f45df2ef5dc62ba6aed99294192ecbb01, +SHA256 e323c94d49c2b72d9524a5169f123e64b4a6e46a41035ca9fb4497e49b6ca562; +used its existing package, not a copied measure or heuristic substitute. +Existing Python3.14,30s shell bound: + +```sh +python3.14 -B -m agent_comms.debt_ratchet --root src/zmqruntime \ + --base 3374aa881dd9a8d0382ac6a56f764eb118744a7b --head 4434b11 +``` + +**PASS186 projected metrics, zero positive deltas,4.42s/48180KiB RSS/exit0.** +ZMQClient excess127->124 (-3); only nonzero projected delta. Whole native-root +inventory plus all five changed production paths, not a selected-class-only pass. +ACK is unchanged against the merged ACK baseline. JSON/resources committed next +to this receipt. Parent's original0f9e840->28d9ed6 +142 failure remains historical +evidence, not relabeled passed. Existing client excess124 remains debt; this +closes introduced growth, not complete decomposition or semantic/live correctness. +No R1/global NRA scan or increased timeout. + +## Boundaries and remaining acceptance + +Latest guard was warning/exit2: swap14.6GiB, RAM18.4GiB, /home22.0GiB. +Only bounded serial lightweight checks ran; no native slot or parallel fleet. +Original native attempts01/02/03 and their exact terminal/uncertain dispositions +are unchanged. No attempt04, input/source dispatch replay, foreign close or +installed/managed-skill change. Actual source-native startup/preparation/register/ +identity-proven close are historical partial evidence, not valid3D acceptance. +Remaining: Dirac shared-surface acknowledgement, parent reviewed dependency pin, +successful corrected volume compile/execute/full readback under admission, and +actual installed user-entrypoint acceptance. No Closes251 or global clean claim. diff --git a/docs/validation/issue251_owner_factoring_ratchet_20260930.json b/docs/validation/issue251_owner_factoring_ratchet_20260930.json new file mode 100644 index 0000000..60db644 --- /dev/null +++ b/docs/validation/issue251_owner_factoring_ratchet_20260930.json @@ -0,0 +1,576 @@ +{ + "root": "src/zmqruntime/", + "base_revision": "3374aa881dd9a8d0382ac6a56f764eb118744a7b", + "head_revision": "4434b11ed769cbc6a15d13754b06529ea6494428", + "paths": [ + "src/zmqruntime/client.py", + "src/zmqruntime/execution/server.py", + "src/zmqruntime/messages.py", + "src/zmqruntime/transport.py", + "src/zmqruntime/transport_modes.py" + ], + "base": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 1, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 4, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": 127, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 1, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 4, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 3, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 2, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 3, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 15 + }, + "head": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 1, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 4, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": 124, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 1, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 4, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 3, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 2, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 3, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 15 + }, + "delta": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 0, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 0, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": -3, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 0, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 0, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 0 + } +} diff --git a/docs/validation/issue251_owner_factoring_resources_20260930.txt b/docs/validation/issue251_owner_factoring_resources_20260930.txt new file mode 100644 index 0000000..2f837d5 --- /dev/null +++ b/docs/validation/issue251_owner_factoring_resources_20260930.txt @@ -0,0 +1 @@ +wall=4.42 rss_kib=48180 exit=0 diff --git a/docs/validation/issue251_pr_body_20260930.md b/docs/validation/issue251_pr_body_20260930.md index 7a65104..8901190 100644 --- a/docs/validation/issue251_pr_body_20260930.md +++ b/docs/validation/issue251_pr_body_20260930.md @@ -15,12 +15,39 @@ The original5993 cleanup attempt remains parent-owned and was not replayed. Paired [OpenHCS256](https://github.com/OpenHCSDev/openhcs/pull/256), references [issue251](https://github.com/OpenHCSDev/openhcs/issues/251), and [metaclass-registry1](https://github.com/OpenHCSDev/metaclass-registry/pull/1). -**123 source tests passed,2 actual-MCP cases deferred,12.16s,285060KiB peak**. -No native/MCP/JVM/GUI launched; no installed or global performance proof. +Earlier source checkpoint:123 passed,2 actual-MCP cases deferred. Subsequent +pre-spawn rollback checkpoint45 dependency cases and136 paired cases retained. +Current owner closure: **81 native source tests pass0.44s/44776KiB RSS**, and +**181 paired source tests pass5.00s/257380KiB RSS**, zero skips/deselections. +No native/MCP/JVM/GUI launched by these source suites; no installed/global proof. Actual tests/pattern review/reproducer: -[receipt](docs/validation/issue251_bootstrap_20260930.md). +[receipt](https://github.com/OpenHCSDev/ZMQRuntime/blob/feat/exclusive-endpoint-bootstrap-20260930/docs/validation/issue251_bootstrap_20260930.md). -Remaining: cross-process synthetic bootstrap -> prep READY -> registration -> -compile/execute -> exact owned exit under released serial slot, then parent +Normally merged ACK main3374aa8 before implementation4434b11. Existing +TransportEndpoint now owns both-address lock/admission/publication and provisional +rollback, consumed by explicit startup, ordinary connect and exact-owned close. +Existing shutdown operation owns one dispatch plus completion; existing mode +owns close admission. Discovery consumes endpoint-owned typed ping/projection. +Deleted replaced client procedures; no new helper/mixin/controller/store/decoder. +Process identity, original records/inodes, post-spawn uncertainty and no-replay +dispositions are preserved. Actual owner/new-case witnesses and IMPL-12/13, +IDEN-8, BOUND-2, AGENT-6 review in the +[ownership receipt](https://github.com/OpenHCSDev/ZMQRuntime/blob/feat/exclusive-endpoint-bootstrap-20260930/docs/validation/issue251_owner_factoring_20260930.md). + +Original packaged ratchet against3374aa8: **PASS186 metrics, zero positive deltas, +4.42s/48180KiB/exit0**; client excess127->124 (-3). Parent's earlier whole-native ++142 failure remains retained. This is introduced-growth closure, not zero +existing debt, R1/all-detector NRA, performance or live proof. + +Additional shared crossing TransportEndpoint in transport.py sent directly to +Dirac in [PR11](https://github.com/OpenHCSDev/ZMQRuntime/pull/11#issuecomment-5910632999); +acknowledgement is not verified. No ACK-private/config/return-route/viewer/waiter +edits. Separate archive author unknown; BLOCKED S1 stays blocked. + +Historical native partial journeys have successful bootstrap/preparation/register/ +exact close; whole valid-volume execution/readback remains unaccepted. Original +attempts01/02/03 are preserved and terminal. No new allocation under guard warning. +Remaining: shared-surface acknowledgement, cross-process valid synthetic bootstrap +-> prep READY -> registration -> compile/execute -> exact owned exit, then parent paired merge/offline install/affected installed-entrypoint validation. This stays a working draft, not Closes251. PR6/7 files are untouched and remain disjoint. From 84b93a0939046b8440d6b4d5d69e9539ffc21a76 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 30 Sep 2026 09:42:00 -0400 Subject: [PATCH 07/10] Describe both admitted startup reservation identities accurately --- src/zmqruntime/transport_modes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zmqruntime/transport_modes.py b/src/zmqruntime/transport_modes.py index b31f678..ae1ee10 100644 --- a/src/zmqruntime/transport_modes.py +++ b/src/zmqruntime/transport_modes.py @@ -169,7 +169,7 @@ def record_startup_owner( config: ZMQConfig, owner: ProcessIdentity, ) -> None: - """Publish one spawned child while holding the existing startup lock.""" + """Publish an exact invoker or child reservation under the held startup lock.""" with cls.startup_lock_path(port, config).open("r+b") as stream: stream.seek(0) stream.write(json.dumps(owner.to_dict()).encode("utf-8")) From 67d41b66bebf06300a6c3d2d0f1cacc4e895e404 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 30 Sep 2026 09:48:55 -0400 Subject: [PATCH 08/10] Record current native-main pairing and scoped owner comment review --- .../issue251_owner_factoring_20260930.md | 36 ++ docs/validation/issue251_pr_body_20260930.md | 9 + ...issue251_viewer_main_ratchet_20260930.json | 582 ++++++++++++++++++ ...viewer_main_ratchet_resources_20260930.txt | 1 + 4 files changed, 628 insertions(+) create mode 100644 docs/validation/issue251_viewer_main_ratchet_20260930.json create mode 100644 docs/validation/issue251_viewer_main_ratchet_resources_20260930.txt diff --git a/docs/validation/issue251_owner_factoring_20260930.md b/docs/validation/issue251_owner_factoring_20260930.md index 60b9e3f..fec0982 100644 --- a/docs/validation/issue251_owner_factoring_20260930.md +++ b/docs/validation/issue251_owner_factoring_20260930.md @@ -124,3 +124,39 @@ identity-proven close are historical partial evidence, not valid3D acceptance. Remaining: Dirac shared-surface acknowledgement, parent reviewed dependency pin, successful corrected volume compile/execute/full readback under admission, and actual installed user-entrypoint acceptance. No Closes251 or global clean claim. + +## Subsequent normal viewer-main integration and scoped comment correction + +Normally merged native main2aa6d21c000d18bd75647f998794015ba8f54710 at6e4242d3. +Incoming source only viewer_state.py and its tests, disjoint from the bootstrap +write set. No competing viewer/ACK edit. Corrected one misleading own docstring +at84b93a0: record_startup_owner publishes an exact provisional invoker OR child, +not only a spawned child. The real callers are TransportEndpoint.reserve_startup_owner +and post-spawn record_startup_owner. Their existing identity/rollback controls +prove both stages; no test of docstring spelling or new policy/codec/reader. +Retained useful uncertainty, incarnation, lock-inode and one-budget explanations. +This is a scoped source-comment drift correction, not a global slop census. + +At paired OpenHCS source260e5941b (normally integrated currentmaincad1ed2bd), +**187 source casesPASS5.51s**, process6.41s/265012KiB/exit0, zero skips/deselections. +Original181 bootstrap/pair controls plus6 original viewer-state controls. +Controlled visualizers and one bounded lock-probe thread, not a GUI/native viewer; +source roots explicitly override the separately installed viewer-live authority. +JUnit viewer-main-source-tests.xml/resources retained in paired OpenHCS receipt. + +Original packaged native ratchet against2aa6d21c->84b93a0: **PASS188 metrics, +zero positive deltas,4.48s/48772KiB/exit0**, client excess delta-3 only. +JSON/resources issue251_viewer_main_ratchet_20260930.json and +issue251_viewer_main_ratchet_resources_20260930.txt. The parent's earlier native +viewer screening lead is not waived/reclassified; this comparison uses current +viewer main as its base and measures own introduced delta. No R1/full NRA proof. +An initial ad-hoc report summary queried plural deltas and failed KeyError; +the original ratchet itself exited0. Corrected read of its actual delta field +with jq confirmed188 metrics/no positives. Original tool output remains distinct. + +Resource helper WARNING/exit2, swap14.4GiB/RAM17.4GiB/home20.1GiB. +No native/MCP/JVM/GUI, heavy/parallel job, install, ABI copy or foreign process +interaction. Original attempts and BLOCKED S1 remain preserved. R0/L0 landed +does not complete full archive S1-S8. Wider owner unknown; direct TransportEndpoint +crossing acknowledgement remains unverified. Parent integration/live ownership +and remaining valid-volume/installed acceptance gates remain as above. diff --git a/docs/validation/issue251_pr_body_20260930.md b/docs/validation/issue251_pr_body_20260930.md index 8901190..fd13c07 100644 --- a/docs/validation/issue251_pr_body_20260930.md +++ b/docs/validation/issue251_pr_body_20260930.md @@ -1,5 +1,14 @@ # Canonical exclusive bootstrap and exact owned lifecycle (OpenHCS251) +Current source checkpoint normally integrates native viewer main2aa6d21c at6e4242d3. +Source84b93a0 also corrects one own stale reservation docstring (invoker OR child, +not child-only), no behavior change. **187 paired source casesPASS5.51s**, zero +skips/deselections, process6.41s/265012KiB/exit0, including6 merged viewer-state +controls. Original native ratchet2aa->84b **PASS188 metrics/no positive deltas**, +client excess-3,4.48s/48772KiB/exit0. No new native/live/global audit claim. +Source roots explicitly isolated from parent's installed viewer candidate. +R0/L0 are partial archive progress; S1-S8 incomplete/owner unknown, S1 blocked. + Extends existing ZMQClient startup/lifecycle owners: explicit local empty-pair startup, native ProcessIdentity capture, both-address pre-bind reservations in existing startup locks, post-spawn uncertainty handle, and identity-proven close. diff --git a/docs/validation/issue251_viewer_main_ratchet_20260930.json b/docs/validation/issue251_viewer_main_ratchet_20260930.json new file mode 100644 index 0000000..bc2c6f6 --- /dev/null +++ b/docs/validation/issue251_viewer_main_ratchet_20260930.json @@ -0,0 +1,582 @@ +{ + "root": "src/zmqruntime/", + "base_revision": "2aa6d21c000d18bd75647f998794015ba8f54710", + "head_revision": "84b93a0939046b8440d6b4d5d69e9539ffc21a76", + "paths": [ + "src/zmqruntime/client.py", + "src/zmqruntime/execution/server.py", + "src/zmqruntime/messages.py", + "src/zmqruntime/transport.py", + "src/zmqruntime/transport_modes.py" + ], + "base": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 1, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 4, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": 127, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerReuseAdmissionABC": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::HealthyViewerReuseAdmission": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 1, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 4, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 3, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 2, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 3, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 15 + }, + "head": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 1, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 4, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": 124, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerReuseAdmissionABC": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::HealthyViewerReuseAdmission": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 1, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 4, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 3, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 2, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 3, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 15 + }, + "delta": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 0, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 0, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": -3, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerReuseAdmissionABC": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::HealthyViewerReuseAdmission": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 0, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 0, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 0 + } +} diff --git a/docs/validation/issue251_viewer_main_ratchet_resources_20260930.txt b/docs/validation/issue251_viewer_main_ratchet_resources_20260930.txt new file mode 100644 index 0000000..85e19c2 --- /dev/null +++ b/docs/validation/issue251_viewer_main_ratchet_resources_20260930.txt @@ -0,0 +1 @@ +wall=4.48 rss_kib=48772 exit=0 From 0ca331a1c197e26656965193d6502e7a3c298808 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 30 Sep 2026 11:24:10 -0400 Subject: [PATCH 09/10] Preserve occupied startup reservations before ordinary connect takeover --- src/zmqruntime/client.py | 8 ++++-- tests/test_owned_startup.py | 56 +++++++++++++++++++++++++++++++++++-- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/src/zmqruntime/client.py b/src/zmqruntime/client.py index c69e3ea..2bfed10 100644 --- a/src/zmqruntime/client.py +++ b/src/zmqruntime/client.py @@ -1047,9 +1047,11 @@ def _connect_locked( return True if self._connection_cancelled(): return self._cancelled_connection_result() - if self.transport_mode.declaration.preserve_unresponsive_endpoint( - self.port, - self.config, + if self.endpoint.has_live_startup_owner(self.config) or ( + self.transport_mode.declaration.preserve_unresponsive_endpoint( + self.port, + self.config, + ) ): self._emit_connection_status( EndpointStartupPhase.FAILED, diff --git a/tests/test_owned_startup.py b/tests/test_owned_startup.py index 1627374..96359d2 100644 --- a/tests/test_owned_startup.py +++ b/tests/test_owned_startup.py @@ -135,7 +135,11 @@ def test_expired_budget_never_spawns(client): @pytest.mark.parametrize("control", [False, True]) -def test_ordinary_connect_preserves_both_pending_address_owners(client, monkeypatch, control): +@pytest.mark.parametrize("occupied", [False, True]) +@pytest.mark.parametrize("alive", [True, None]) +def test_ordinary_connect_preserves_both_pending_address_owners( + client, monkeypatch, control, occupied, alive +): declaration = client.transport_mode.declaration reserved_port = client.control_port if control else client.port path = declaration.startup_lock_path(reserved_port, client.config) @@ -144,7 +148,9 @@ def test_ordinary_connect_preserves_both_pending_address_owners(client, monkeypa owner = ProcessIdentity.current() declaration.record_startup_owner(reserved_port, client.config, owner) inode = path.stat().st_ino - monkeypatch.setattr(client, "_is_port_in_use", lambda *_: False) + monkeypatch.setattr(client, "_is_port_in_use", lambda *_: occupied) + monkeypatch.setattr(client, "_attach_existing_endpoint", Mock(return_value=False)) + monkeypatch.setattr(ProcessIdentity, "is_alive", lambda *_: alive) kill = Mock(side_effect=AssertionError("A pending child is not replaceable")) monkeypatch.setattr(client, "_kill_processes_on_port", kill) assert client.connect(timeout=0.01) is False @@ -154,6 +160,52 @@ def test_ordinary_connect_preserves_both_pending_address_owners(client, monkeypa kill.assert_not_called() +@pytest.mark.parametrize("control", [False, True]) +def test_ordinary_connect_can_attach_healthy_reserved_endpoint(client, monkeypatch, control): + declaration = client.transport_mode.declaration + reserved_port = client.control_port if control else client.port + path = declaration.startup_lock_path(reserved_port, client.config) + path.parent.mkdir(parents=True, exist_ok=True) + path.touch() + owner = ProcessIdentity.current() + declaration.record_startup_owner(reserved_port, client.config, owner) + inode = path.stat().st_ino + monkeypatch.setattr(client, "_is_port_in_use", lambda *_: True) + attach = Mock(return_value=True) + monkeypatch.setattr(client, "_attach_existing_endpoint", attach) + kill = Mock(side_effect=AssertionError("Healthy endpoint is not replaceable")) + monkeypatch.setattr(client, "_kill_processes_on_port", kill) + assert client.connect(timeout=0.01) is True + attach.assert_called_once_with(0.01) + assert declaration.startup_owner(reserved_port, client.config) == owner + assert path.stat().st_ino == inode + client.spawn.assert_not_called() + kill.assert_not_called() + + +@pytest.mark.parametrize("control", [False, True]) +def test_ordinary_connect_preserves_occupied_endpoint_with_partial_reservation( + client, monkeypatch, control +): + declaration = client.transport_mode.declaration + reserved_port = client.control_port if control else client.port + path = declaration.startup_lock_path(reserved_port, client.config) + path.parent.mkdir(parents=True, exist_ok=True) + source = "unknown partial reservation" + path.write_text(source, encoding="utf-8") + inode = path.stat().st_ino + monkeypatch.setattr(client, "_is_port_in_use", lambda *_: True) + monkeypatch.setattr(client, "_attach_existing_endpoint", Mock(return_value=False)) + kill = Mock(side_effect=AssertionError("Unknown reservation is not replaceable")) + monkeypatch.setattr(client, "_kill_processes_on_port", kill) + with pytest.raises(ValueError): + client.connect(timeout=0.01) + assert path.read_text(encoding="utf-8") == source + assert path.stat().st_ino == inode + client.spawn.assert_not_called() + kill.assert_not_called() + + @pytest.fixture def empty_pair(client, monkeypatch): monkeypatch.setattr(type(client.endpoint), "occupied_ports", lambda *_: frozenset()) From 112c240464df6e81c25b0f97d2b1376d43bbbbc8 Mon Sep 17 00:00:00 2001 From: Tristan Simas Date: Wed, 30 Sep 2026 11:27:09 -0400 Subject: [PATCH 10/10] Record reserved-child takeover reproducer and bounded paired evidence --- ...ue251_reserved_child_ratchet_20260930.json | 582 ++++++++++++++++++ ...erved_child_ratchet_resources_20260930.txt | 1 + ...ue251_reserved_child_takeover_20260930.rst | 91 +++ 3 files changed, 674 insertions(+) create mode 100644 docs/validation/issue251_reserved_child_ratchet_20260930.json create mode 100644 docs/validation/issue251_reserved_child_ratchet_resources_20260930.txt create mode 100644 docs/validation/issue251_reserved_child_takeover_20260930.rst diff --git a/docs/validation/issue251_reserved_child_ratchet_20260930.json b/docs/validation/issue251_reserved_child_ratchet_20260930.json new file mode 100644 index 0000000..9013af0 --- /dev/null +++ b/docs/validation/issue251_reserved_child_ratchet_20260930.json @@ -0,0 +1,582 @@ +{ + "root": "src/zmqruntime/", + "base_revision": "2aa6d21c000d18bd75647f998794015ba8f54710", + "head_revision": "0ca331a1c197e26656965193d6502e7a3c298808", + "paths": [ + "src/zmqruntime/client.py", + "src/zmqruntime/execution/server.py", + "src/zmqruntime/messages.py", + "src/zmqruntime/transport.py", + "src/zmqruntime/transport_modes.py" + ], + "base": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 1, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 4, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": 127, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerReuseAdmissionABC": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::HealthyViewerReuseAdmission": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 1, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 4, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 3, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 2, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 3, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 15 + }, + "head": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 1, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 4, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": 126, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerReuseAdmissionABC": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::HealthyViewerReuseAdmission": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 1, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 4, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 3, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 2, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 3, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 15 + }, + "delta": { + "StringDispatch:src/zmqruntime/client.py": 0, + "StringDispatch:src/zmqruntime/execution/server.py": 0, + "StringDispatch:src/zmqruntime/messages.py": 0, + "StringDispatch:src/zmqruntime/transport.py": 0, + "StringDispatch:src/zmqruntime/transport_modes.py": 0, + "TypeSwitch:src/zmqruntime/client.py": 0, + "TypeSwitch:src/zmqruntime/execution/server.py": 0, + "TypeSwitch:src/zmqruntime/messages.py": 0, + "TypeSwitch:src/zmqruntime/transport.py": 0, + "TypeSwitch:src/zmqruntime/transport_modes.py": 0, + "StringDispatchArms:src/zmqruntime/client.py": 0, + "StringDispatchArms:src/zmqruntime/execution/server.py": 0, + "StringDispatchArms:src/zmqruntime/messages.py": 0, + "StringDispatchArms:src/zmqruntime/transport.py": 0, + "StringDispatchArms:src/zmqruntime/transport_modes.py": 0, + "TypeSwitchArms:src/zmqruntime/client.py": 0, + "TypeSwitchArms:src/zmqruntime/execution/server.py": 0, + "TypeSwitchArms:src/zmqruntime/messages.py": 0, + "TypeSwitchArms:src/zmqruntime/transport.py": 0, + "TypeSwitchArms:src/zmqruntime/transport_modes.py": 0, + "GodClassExcess:src/zmqruntime/ack_listener.py::GlobalAckListener": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionPolicy": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionCancelledError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointStartupUncertainError": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointConnectionAttempt": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointCompatibilityClientABC": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointClientSession": 0, + "GodClassExcess:src/zmqruntime/client.py::ClientEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointProcessExitObservation": 0, + "GodClassExcess:src/zmqruntime/client.py::_ObservedEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::MultiprocessingEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::SubprocessEndpointProcess": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointProcessGroup": 0, + "GodClassExcess:src/zmqruntime/client.py::OwnedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::AttachedEndpointConnection": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownResult": 0, + "GodClassExcess:src/zmqruntime/client.py::_EndpointShutdownOperation": 0, + "GodClassExcess:src/zmqruntime/client.py::EndpointShutdownMode": 0, + "GodClassExcess:src/zmqruntime/client.py::ZMQClient": -1, + "GodClassExcess:src/zmqruntime/config.py::TransportMode": 0, + "GodClassExcess:src/zmqruntime/config.py::ZMQConfig": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::SubmittedBatchJob": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::CallbackBatchSubmitWaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/batch_submit_wait.py::BatchSubmitWaitEngine": 0, + "GodClassExcess:src/zmqruntime/execution/client.py::ExecutionClient": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleTransition": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionCancellationResult": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::ExecutionLifecycleEngineABC": 0, + "GodClassExcess:src/zmqruntime/execution/lifecycle.py::InMemoryExecutionLifecycleEngine": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogIdentity": 0, + "GodClassExcess:src/zmqruntime/execution/logs.py::ExecutionWorkerLogObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ExecutionProgressObservation": 0, + "GodClassExcess:src/zmqruntime/execution/progress_stream.py::ProgressStreamSubscriber": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionDiagnosticField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseDiagnostic": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionResponse": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionSubmissionField": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionResponseWireFields": 0, + "GodClassExcess:src/zmqruntime/execution/responses.py::ExecutionWaitResult": 0, + "GodClassExcess:src/zmqruntime/execution/server.py::ExecutionServer": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPollPolicyABC": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::CallbackExecutionStatusPollPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/status_poller.py::ExecutionStatusPoller": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::WaitPolicy": 0, + "GodClassExcess:src/zmqruntime/execution/wait_policy.py::ExecutionWaiter": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskPhase": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::WorkerState": 0, + "GodClassExcess:src/zmqruntime/messages.py::TaskProgress": 0, + "GodClassExcess:src/zmqruntime/messages.py::MessageFields": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessIdentity": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessExit": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlMessageType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlRequestHeader": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointShutdownRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ResponseType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatus": 0, + "GodClassExcess:src/zmqruntime/messages.py::SocketType": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ControlErrorResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecuteResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionRecord": 0, + "GodClassExcess:src/zmqruntime/messages.py::RunningExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::QueuedExecutionInfo": 0, + "GodClassExcess:src/zmqruntime/messages.py::ExecutionStatusSnapshot": 0, + "GodClassExcess:src/zmqruntime/messages.py::StatusRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::CancelRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressRegistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProgressUnregistrationRequest": 0, + "GodClassExcess:src/zmqruntime/messages.py::ProcessResourceUsage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ServerRole": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointControlCapability": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplication": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibility": 0, + "GodClassExcess:src/zmqruntime/messages.py::EndpointApplicationCompatibilityError": 0, + "GodClassExcess:src/zmqruntime/messages.py::PongResponse": 0, + "GodClassExcess:src/zmqruntime/messages.py::ImageAck": 0, + "GodClassExcess:src/zmqruntime/messages.py::ROIMessage": 0, + "GodClassExcess:src/zmqruntime/messages.py::ShapesMessage": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericAxisProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericPlateProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::GenericExecutionProjection": 0, + "GodClassExcess:src/zmqruntime/progress/projection.py::ProgressProjectionAdapterABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutationKind": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryMutation": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::EventRegistryABC": 0, + "GodClassExcess:src/zmqruntime/progress/registry.py::LatestEventRegistry": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::QueueTracker": 0, + "GodClassExcess:src/zmqruntime/queue_tracker.py::GlobalQueueTrackerRegistry": 0, + "GodClassExcess:src/zmqruntime/server.py::ZMQServer": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownOutcome": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownBatchResult": 0, + "GodClassExcess:src/zmqruntime/shutdown.py::EndpointShutdownService": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPresentationTarget": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupPhase": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatus": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusRead": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusWriter": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusReader": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::IdleEndpointStartupObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupCancellationObserver": 0, + "GodClassExcess:src/zmqruntime/startup.py::EndpointStartupStatusMonitor": 0, + "GodClassExcess:src/zmqruntime/streaming/process_manager.py::VisualizerProcessManager": 0, + "GodClassExcess:src/zmqruntime/streaming/server.py::StreamingVisualizerServer": 0, + "GodClassExcess:src/zmqruntime/subscription.py::SubscriptionABC": 0, + "GodClassExcess:src/zmqruntime/subscription.py::CallbackSubscription": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationTimeoutError": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationCancellation": 0, + "GodClassExcess:src/zmqruntime/timeouts.py::OperationDeadline": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPair": 0, + "GodClassExcess:src/zmqruntime/transport.py::TransportEndpoint": 0, + "GodClassExcess:src/zmqruntime/transport.py::DataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport.py::TcpDataControlPortPairAuthority": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::TcpTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/transport_modes.py::IpcTransportDeclaration": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerDeclaredWireValue": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeLayerTransform": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeImageIntensityPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerNativeViewportPresentation": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerImageIntensityControlOptions": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerProtocolStatus": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlResponseField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageType": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialWireField": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMode": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentModeGroups": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageExtraPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerSourceSpatialDomainPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessageWirePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchDisplayPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchItemPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerComponentMetadataPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerBatchMessagePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyHeader": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerControlReplyPayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckResponsePayload": 0, + "GodClassExcess:src/zmqruntime/viewer_protocol.py::ViewerAckPolicy": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerState": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerInstance": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerReuseAdmissionABC": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::HealthyViewerReuseAdmission": 0, + "GodClassExcess:src/zmqruntime/viewer_state.py::ViewerStateManager": 0, + "TypeIdentity": 0, + "LongBooleanChain": 0, + "BooleanChainTerms:src/zmqruntime/client.py": 0, + "BooleanChainTerms:src/zmqruntime/execution/server.py": 0, + "BooleanChainTerms:src/zmqruntime/messages.py": 0, + "BooleanChainTerms:src/zmqruntime/transport.py": 0, + "BooleanChainTerms:src/zmqruntime/transport_modes.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/client.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/execution/server.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/messages.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport.py": 0, + "ForeignAbsenceProbe:src/zmqruntime/transport_modes.py": 0, + "CodecSubclass:src/zmqruntime/client.py": 0, + "CodecSubclass:src/zmqruntime/execution/server.py": 0, + "CodecSubclass:src/zmqruntime/messages.py": 0, + "CodecSubclass:src/zmqruntime/transport.py": 0, + "CodecSubclass:src/zmqruntime/transport_modes.py": 0, + "StringSubscript": 0 + } +} diff --git a/docs/validation/issue251_reserved_child_ratchet_resources_20260930.txt b/docs/validation/issue251_reserved_child_ratchet_resources_20260930.txt new file mode 100644 index 0000000..c7a0590 --- /dev/null +++ b/docs/validation/issue251_reserved_child_ratchet_resources_20260930.txt @@ -0,0 +1 @@ +wall=4.79 rss_kib=47992 exit=0 diff --git a/docs/validation/issue251_reserved_child_takeover_20260930.rst b/docs/validation/issue251_reserved_child_takeover_20260930.rst new file mode 100644 index 0000000..d4db712 --- /dev/null +++ b/docs/validation/issue251_reserved_child_takeover_20260930.rst @@ -0,0 +1,91 @@ +Issue251: preserve reserved children before ordinary TCP takeover +================================================================ + +Distinct source-only continuation of PR9 after explicit account-switch resume. +Production commit: ``0ca331a1c197e26656965193d6502e7a3c298808``. +Normally merged native main ``2aa6d21c`` is already an ancestor. Paired OpenHCS +normally merged main ``c42d9bf5d`` at ``5b330a7b3e`` before these checks. +Installed packages/skill, science runtime and original attempts were untouched. + +Concrete failing boundary +------------------------- + +``ZMQClient._connect_locked`` held the original pair locks, attempted attachment +to an occupied data endpoint, then consulted transport preservation and killed +both port owners before checking the existing startup reservations. TCP's +preservation policy returns false. A child with an original live reservation +could therefore be replaced after bind but before responsive startup. + +The preceding ordinary-connect controls intercepted occupancy as false and +did not witness this path. Extended controls preserve real declaration-owned +records and portalocker locks; only occupancy, attachment, process liveness and +kill/spawn boundaries are controlled. Before the production change, six controls +failed at the intercepted kill: live/unknown liveness on each reserved address +and each address's malformed partial record. No process was killed or spawned. +Healthy attachment and the unoccupied cases passed. + +Correction and ownership review +------------------------------- + +After a failed attachment, ordinary connect now consumes the EXISTING +``TransportEndpoint.has_live_startup_owner(config)`` before any takeover. +The original guard remains before spawn for the unoccupied route. Healthy +attachment remains earlier and allowed. Both held locks, exact ProcessIdentity, +record/inode retention, malformed-record failure and post-spawn uncertainty are +unchanged. No timeout, replay, transport switch or lifecycle store was added. + +Applicable current archive catalog witnesses: + +* IMPL-13: exclusive startup and ordinary connect consume the SAME pair owner; + the occupied/unresponsive case no longer weakens its existing admission. +* IDEN-8: original PID plus creation-time records govern preservation, not + occupancy or a bare PID. Unknown liveness is not inferred dead. +* BOUND-2: original transport record decoding is reused, including malformed + failure; no second decoder/schema or metadata mirror. +* IMPL-12 / AGENT-6: no copied pair procedure, helper/mixin or forwarding split. + The original predicate is composed with original transport preservation; + the concrete new-case witness is bind-before-ready on either paired address. + +Only ``client.py`` and ``tests/test_owned_startup.py`` changed in this correction. +No ACK-private, config, message, transport, viewer or waiter file changed. +Parent owns remaining ACK delivery/integration. Broader archive author remains +unidentified; BLOCKED S1 is not resumed or certified. + +Actual bounded evidence +----------------------- + +Paired source shard with existing Python3.12 ``-B``, explicit own OpenHCS root +plus all eight child src paths, thread1, plugin autoload disabled and shared Fiji +cache/downloadfalse: **197 passed, no skips/deselections, 5.39s**; process +6.20s/264612KiB RSS/exit0, under the original30s shell bound. Controlled endpoint +and process boundaries; no native socket/server/MCP/JVM/GUI/science or provider. +The six merged viewer-state controls use controlled visualizers and one short +lock-probe thread, not an actual viewer. Two warnings are disabled asyncio-plugin +configuration, not discarded cases. + +The original pre-fix receipt retained six failures/six passes. Its first path +assertion caught mis-cased PolyStore/ObjectState paths (not accepted as complete +path authority). A corrected all-nine-path assertion then succeeded before +the unchanged pre-fix controls reproduced six failures/six passes in0.99s, +process1.23s/53548KiB/exit1. Both originals retained; no hidden pass relabeling. +Root receipts are in ``docs/validation/runtime_bootstrap_20260930/`` +``reserved-child-takeover/`` on paired OpenHCS PR256. + +Authenticated original packaged agent-comms ratchet, original CLI/SourceRevision +owners, whole ``src/zmqruntime`` root, main2aa6d21c -> production0ca331a: +**PASS188 metrics, no positive deltas, client excess delta-1**; process +4.79s/47992KiB/exit0. JSON/resources accompany this receipt. The earlier +142 +failure remains retained; this is introduced-growth evidence, not zero existing +debt, global NRA/R1/all-detector, performance or live proof. No detector copy. + +Remaining boundary +------------------ + +Parent owns merge/install and affected installed/native journey. No new native +attempt was authorized or dispatched here. Historical attempts01/02/03 remain +terminal partial/failed/interrupted, including original inputs and dispositions. +Valid-volume first/chained full/reorder/reduced/singleton execution with strict +durable image/label/CSV/source-address/ROI inventory, cross-process uncertainty +and installed bootstrap acceptance remain unfinished. No Closes251/257 claim. +Resource warning (home19.9GiB, RAM17.1GiB, swap9.5GiB) did not admit a native +allocation, large/parallel scan, package/skill change or validation-lock use.