{"record":{"id":"4e8b4a3e8d1e5e53","repo":"oraios/serena","slug":"config-overview-not-yet-available","errorCode":null,"errorMessage":"Config overview not yet available","messagePattern":"Config overview not yet available","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"src/serena/dashboard.py","lineNumber":311,"sourceCode":"        def clear_tool_stats_route() -> dict[str, str]:\n            self._clear_tool_stats()\n            return {\"status\": \"cleared\"}\n\n        @self._app.route(\"/clear_logs\", methods=[\"POST\"])\n        def clear_logs() -> dict[str, str]:\n            self._memory_log_handler.clear_log_messages()\n            return {\"status\": \"cleared\"}\n\n        @self._app.route(\"/get_token_count_estimator_name\", methods=[\"GET\"])\n        def get_token_count_estimator_name() -> dict[str, str]:\n            estimator_name = self._tool_usage_stats.token_estimator_name if self._tool_usage_stats else \"unknown\"\n            return {\"token_count_estimator_name\": estimator_name}\n\n        @self._app.route(\"/get_config_overview\", methods=[\"GET\"])\n        def get_config_overview() -> dict[str, Any]:\n            result = self._current_config_overview\n            if result is None:\n                raise ValueError(\"Config overview not yet available\")\n            return result\n\n        @self._app.route(\"/shutdown\", methods=[\"PUT\"])\n        def shutdown() -> dict[str, str]:\n            self._agent.shutdown()\n            return {\"status\": \"shutting down\"}\n\n        @self._app.route(\"/get_available_languages\", methods=[\"GET\"])\n        def get_available_languages() -> dict[str, Any]:\n            result = self._get_available_languages()\n            return result.model_dump()\n\n        @self._app.route(\"/add_language\", methods=[\"POST\"])\n        def add_language() -> dict[str, str]:\n            request_data = request.get_json()\n            if not request_data:\n                return {\"status\": \"error\", \"message\": \"No data provided\"}\n            request_add_language = RequestAddLanguage.model_validate(request_data)","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/serena/dashboard.py#L293-L329","documentation":"The dashboard exposes a `/get_config_overview` HTTP endpoint that returns `self._current_config_overview`. This field is populated asynchronously after startup, so if the endpoint is queried before the overview has been computed, the handler raises ValueError('Config overview not yet available'). It is a startup race, not a configuration defect.","triggerScenarios":"Calling GET /get_config_overview on the dashboard web app immediately after the dashboard starts, before the background task that sets `_current_config_overview` has finished.","commonSituations":"Automated scripts or health checks polling the dashboard endpoint right after Serena starts; UI dashboards that fetch config before the agent finishes loading.","solutions":["Wait and retry the request after a short delay until startup completes.","Check the dashboard's readiness/started state (or poll a ready endpoint) before calling /get_config_overview.","Poll with backoff in client code instead of a single immediate request.","In the library, initialize `_current_config_overview` to an empty dict or return a 503 until ready."],"exampleFix":"// client before\nconst cfg = await fetch(`${base}/get_config_overview`).then(r => r.json());\n// after\nawait waitForDashboardReady(base);\nconst cfg = await fetch(`${base}/get_config_overview`).then(r => r.json());","handlingStrategy":"retry","validationCode":"import time, requests\ndef config_overview_ready(base: str) -> bool:\n    try:\n        r = requests.get(f\"{base}/get_config_overview\", timeout=2)\n        return r.status_code == 200\n    except requests.RequestException:\n        return False","typeGuard":null,"tryCatchPattern":"import time, requests\nfor _ in range(10):\n    try:\n        r = requests.get(f\"{base}/get_config_overview\", timeout=5)\n        if r.status_code == 200:\n            overview = r.json(); break\n    except requests.RequestException:\n        pass\n    time.sleep(1)\nelse:\n    raise RuntimeError(\"dashboard config overview never became available\")","preventionTips":["Wait for a dashboard ready/health endpoint before querying config endpoints.","Poll with backoff instead of a single request at startup.","Treat 500 'not yet available' responses as transient during startup.","Optionally block agent startup until the overview is computed in your own harness."],"tags":["dashboard","race-condition","startup","http"],"backgroundTag":"resource-not-ready","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}