You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The QA panel flagged these on #3970. They're in operator routes that existed before that PR, so they were left out of it. Re-check each against current main before fixing.
Error mapping
operator_api/routes.py:~135: _http_error returns str(exc) as the 500 detail, leaking internal file paths and library internals to the client. Log the exception and return a generic message.
No not-found mapping, so these return 500 instead of 404:
DELETE and PUT /api/scheduler/jobs/{id} for a missing job
the task close route for a missing issue
_runtime_status and _goal_status have no try/except guard, unlike their sibling routes.
POST /api/chat has no structured mapping for chat() failures. /v1 maps the same failures to 429, 502 and so on.
Availability
operator_api/routes.py:~119: the SSE event stream ends on a single malformed bus event, because per-event key access and json.dumps aren't guarded.
Input validation
SubagentBatchRequest.tasks has no upper bound.
GET /api/background?status=: the value isn't checked against the documented 3-value enum.
POST /api/goals takes a bare dict instead of a Pydantic model.
graph/goals/controller.py:~419: max_iterations and no_progress_limit from a JSON goal spec aren't type-checked, so a string such as "abc" is accepted.
The QA panel flagged these on #3970. They're in operator routes that existed before that PR, so they were left out of it. Re-check each against current main before fixing.
Error mapping
operator_api/routes.py:~135:_http_errorreturnsstr(exc)as the 500 detail, leaking internal file paths and library internals to the client. Log the exception and return a generic message.DELETEandPUT /api/scheduler/jobs/{id}for a missing job_runtime_statusand_goal_statushave no try/except guard, unlike their sibling routes.POST /api/chathas no structured mapping forchat()failures./v1maps the same failures to 429, 502 and so on.Availability
operator_api/routes.py:~119: the SSE event stream ends on a single malformed bus event, because per-event key access andjson.dumpsaren't guarded.Input validation
SubagentBatchRequest.taskshas no upper bound.GET /api/background?status=: the value isn't checked against the documented 3-value enum.POST /api/goalstakes a bare dict instead of a Pydantic model.graph/goals/controller.py:~419:max_iterationsandno_progress_limitfrom a JSON goal spec aren't type-checked, so a string such as "abc" is accepted.ScheduleAddRequest.scheduleand.timezonearen't format-checked at the route. The scheduler now normalises errors to 400 (fix: settle ledger on restart reconcile, ValueError for bad schedules, watch clear race, partial scheduler PUT (#3943) #3969), but checking at the route would be clearer.Nit
graph/checkpoint_prune.py:~97: the LIKE pattern in thedelete_threadcascade doesn't escape%or_inthread_id.