ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.
Python ai-agentsamdcomfyuidockerllama-cppllmlocal-ain8nnvidiaopen-webuiragself-hostedspeech-to-textstrix-halotext-to-speechworkflow-automation
fix(dashboard-api): prove the socket-only Pixel ingress through Pixel Edge (#8242)
Mike Bradley6be61674169a
diff --git a/ods/extensions/services/dashboard-api/helpers.py b/ods/extensions/services/dashboard-api/helpers.pyindex cffe0688b..b17f510cf 100644--- a/ods/extensions/services/dashboard-api/helpers.py+++ b/ods/extensions/services/dashboard-api/helpers.py@@ -234,10 +234,28 @@ async def _check_opencode_health(service_id: str, config: dict) -> ServiceStatus)+async def _check_pixel_ingress_health(service_id: str, config: dict) -> ServiceStatus:+ """Prove the socket-only Pixel host ingress through Pixel Edge.++ The ingress listens only on a Unix socket, so no port can be probed and it+ read "Not Deployed" while Portal worked (Workstation06, 2026-10-26). Pixel+ Edge's /health answers ok only when that socket's /health does; an edge+ that is down proves nothing about the socket.+ """+ edge = SERVICES.get("pixel-edge")+ if edge is None:+ return _service_status_from_config(service_id, config, "not_deployed")+ edge_status = (await check_service_health("pixel-edge", edge)).status+ status = edge_status if edge_status in ("healthy", "not_deployed") else "unknown"+ return _service_status_from_config(service_id, config, status)++async def _check_host_systemd_health(service_id: str, config: dict) -> ServiceStatus:"""Check a host-managed service through the authenticated host-agent."""if service_id == "opencode":return await _check_opencode_health(service_id, config)+ if service_id == "pixel-agent" and config.get("socket_only"):+ return await _check_pixel_ingress_health(service_id, config)return await _check_host_port_health(service_id, config)diff --git a/ods/extensions/services/dashboard-api/tests/test_helpers.py b/ods/extensions/services/dashboard-api/tests/test_helpers.pyindex 9562019b7..9e688a039 100644--- a/ods/extensions/services/dashboard-api/tests/test_helpers.py+++ b/ods/extensions/services/dashboard-api/tests/test_helpers.py@@ -1459,6 +1459,35 @@ class TestGetLifetimeTokens:class TestCheckServiceHealthSystemd:+ _PIXEL_INGRESS = {+ "name": "Pixel Agent (host ingress)", "port": 0, "external_port": 0, "health": "/health",+ "host": "localhost", "type": "host-systemd", "socket_only": True,+ }++ @pytest.mark.asyncio+ @pytest.mark.parametrize(("edge_status", "expected"), [(200, "healthy"), (503, "unknown")])+ async def test_socket_only_pixel_ingress_follows_pixel_edge(self, mock_aiohttp_session, monkeypatch,+ edge_status, expected):+ # Workstation06: the ingress listens only on a Unix socket, so its row read+ # "Not Deployed" while Portal worked. Pixel Edge's /health requires that socket.+ session = mock_aiohttp_session(status=edge_status)+ monkeypatch.setattr("helpers._get_aio_session", AsyncMock(return_value=session))+ monkeypatch.setattr("helpers.SERVICES", {"pixel-edge": {+ "name": "Pixel Edge", "port": 9595, "external_port": 9595, "health": "/health", "host": "pixel-edge"}})+ agent = AsyncMock(side_effect=AssertionError("no host port probe for a socket-only service"))+ monkeypatch.setattr("helpers.request_agent_json", agent)++ result = await check_service_health("pixel-agent", self._PIXEL_INGRESS)+ assert result.status == expected+ assert result.id == "pixel-agent"+ assert result.name == "Pixel Agent (host ingress)"++ @pytest.mark.asyncio+ async def test_socket_only_pixel_ingress_without_pixel_edge_is_not_deployed(self, monkeypatch):+ monkeypatch.setattr("helpers.SERVICES", {})+ result = await check_service_health("pixel-agent", self._PIXEL_INGRESS)+ assert result.status == "not_deployed"+@pytest.mark.asyncioasync def test_host_systemd_returns_healthy_when_host_agent_proves_port(self, monkeypatch):async def fake_request(method, path, *, params, timeout):