Repository navigation
fix(ai): settle evicted PR replies, bind limiters and audit queue in chat runtimes, map auth outages to 503 - #2443
Merged
Maple Review Bot / Maple / review
succeeded
Nov 10, 2026 in 2m 21s
Confidence 10/10 · No issues found
🟢 Confidence 10/10 · safe to merge. Auth re-mapping and the abandoned-reply settle are pinned by tests; the DO building BoundAiClients.layer is the one hop only a deploy proves.
no findings · tests covered · risk high · 1/1 new units observable
Fixes evicted PR reply turns, binds limiters/audit queue into the Durable Object runtimes, and maps an auth outage to 503; the rest is comment and instruction cleanup. Safe to merge; neither open error issue is addressed — http-graph.ts and registry.ts changed only an import and comments.
- An evicted reply turn is settled through
settleAbandonedTurninstead of leftrunning ChatSessionhandsaiSessionPortsto the turn and approval runtimes- An auth provider outage answers 503 on
/mcpand the chat routes - Uptime tools read
time_zone, maintenance windowsstart_time_of_day
Before merge
- Manual · Deploy a
preview: the DO now buildsBoundAiClients.layer, and only a deploy proves the bindings attach
Production impact
Open errors in the changed files (3)
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/api/routes/VcsWebhookEnqueueFailure (2 issues) | maple-api | 9 | apps/ai/src/runtime/http-graph.ts |
| @maple/mcp/errors/McpQueryError (2 issues) | maple-chat | 6 | apps/ai/src/mcp/tools/registry.ts |
| @maple/mcp/errors/McpQueryError (6 issues) | maple-ai | 18 | apps/ai/src/mcp/tools/registry.ts |
After this merges, Maple checks whether they stop.
Production traffic of the changed files (last 7 days)
| File | Calls/day | Busiest operations |
|---|---|---|
apps/ai/src/worker/bindings.ts |
58k | POST /mcp 29k/day, 0.0% errPOST /mcp 28k/day, 0.0% errGET /mcp 373/day, 0.0% err |
apps/ai/src/routes/health.ts |
7.5k | GET /health 5.7k/day, 0.0% errGET /health 1.4k/day, 0.1% errGET 310/day, 0.1% err |
apps/ai/src/mcp/tool-descriptors.generated.ts |
3.1k | POST 1.4k/day, 0.2% errPOST 1.3k/day, 0.1% errGET 310/day, 0.1% err |
What was checked
- Removing
HealthRouterkeeps/health:worker/http.ts:103answers it before the graph builds - Both resolvers' error channels are exactly the three tags
sessionAuthFailurecatches (AuthService.ts:38,50) query_datadefaults to 6 hours (query-data.ts:32) andlist_users/list_error_issuespage by cursor, so the new guidance holds
Observability coverage: 1 of 1 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| evicted review/reply turn settled as abandoned | background job (Durable Object waitUntil) |
yes | runs inside the turn span, which annotateTurn/turnSpanAttributes marks outcome = "abandoned" (turn-runner.ts:372-382) |
da8e7ed · Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading