diff --git a/backend/apps/agents/core/flight_recorder.py b/backend/apps/agents/core/flight_recorder.py index 52c4e386..07171eb0 100644 --- a/backend/apps/agents/core/flight_recorder.py +++ b/backend/apps/agents/core/flight_recorder.py @@ -145,6 +145,7 @@ def record_recovery(session_id: str, net: str, model: Optional[str], attempts: i "lane": lane_for_model(model), "model": model, "attempts": attempts, + "journey": journey_auth_context(), "concurrency": concurrency_snapshot(sessions or {}), }) except Exception: diff --git a/backend/apps/nine_router/process.py b/backend/apps/nine_router/process.py index 4b69ea0c..8df0c34a 100644 --- a/backend/apps/nine_router/process.py +++ b/backend/apps/nine_router/process.py @@ -469,7 +469,14 @@ async def death_watch(proc_handle: "subprocess.Popen[Any]") -> None: # The revive IS a safety net firing; the near-miss ledger counts it so router flap rates are queryable. try: from backend.apps.service.client import submit_diagnostic - submit_diagnostic({"kind": "recovered", "subkind": "router-revive"}) + from backend.apps.agents.core.flight_recorder import journey_auth_context + # scope says WHY there is no session or lane here: the watchdog outlives any one turn. + submit_diagnostic({ + "kind": "recovered", + "subkind": "router-revive", + "scope": "watchdog", + "journey": journey_auth_context(), + }) except Exception: pass p_is_running_last_ok = 0.0 diff --git a/electron/package.json b/electron/package.json index 4ace0993..b10730fd 100644 --- a/electron/package.json +++ b/electron/package.json @@ -49,7 +49,8 @@ "!python-env", "!python-env/**", "!build-staging", - "!build-staging/**" + "!build-staging/**", + "!**/*.test.js" ], "icon": "build/icon.png", "mac": {