fix(telemetry): recover worker agent and Tailscale transport automatically

This commit is contained in:
DCCONSTRUCTIONS
2026-09-25 23:24:27 +03:00
parent bd5873ef34
commit f3640026cf
11 changed files with 755 additions and 4 deletions
+14
View File
@@ -144,3 +144,17 @@ def test_contour_router_returns_404_for_unknown_contour(tmp_path: Path) -> None:
with pytest.raises(HTTPException) as error:
install("missing")
assert error.value.status_code == 404
def test_broker_apply_uses_explicit_installation_root(tmp_path, monkeypatch):
from k1link.web import compute_contour_api as api
root = tmp_path / 'prepared-stack'
monkeypatch.setenv('MISSIONCORE_TELEMETRY_PLANE_ROOT', str(root))
seen = []
def apply(target, installation):
seen.append(installation)
return {'ready': True}
monkeypatch.setattr(api, 'apply_broker_network', apply)
router = api.build_compute_contour_router(root_provider=lambda: tmp_path / 'system')
_endpoint(router, '/api/v1/system/contours/{contour_id}/network/broker', 'POST')('worker-006')
assert seen == [root]