Repository navigation
fix(gateway): return consistent unavailable response guidance - #191933
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR adds retry and cache guidance to unavailable responses and reuses admission-state messages for rejected HTTP work. Example: POST /v1/chat/completions while the Gateway is paused
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a useful, focused correction that current main still needs; no introduced code defect was found, but the CI gate remains failed. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway HTTP routing receives probes, API requests, and WebSocket upgrades; existing readiness and admission owners determine availability, and transport helpers emit the rejection responses. flowchart TD
A[Client request] --> B[Gateway routing]
B --> C[Readiness probes]
B --> D[Work admission]
B --> E[WebSocket upgrades]
C --> F[HTTP response]
D --> F
E --> F
Technical reviewBest possible solution: Retain this narrow response correction using existing admission and transport owners, preserving authentication, status codes, schemas, and socket delivery. Do we have a high-confidence way to reproduce the issue? Source confirms missing retry headers on probe 503 responses, missing retry/cache headers on upgrade rejections, and generic HTTP admission wording on current main; no target code was executed. Is this the best way to solve the issue? The patch is the smallest complete endpoint correction: it adds headers at existing response boundaries and consumes the established admission message without introducing state, wrappers, or another policy owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b640d4b95c1b. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +10, Tests +46, Other +1. Total +57 across 6 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 3, 2026, 9:00 AM ET / 14:00 UTC. |
|
Merged via squash.
|
…restoration-ci-189390-20261127 * commit '6feeb50a3f14fbf0aa5167d342f186dc4d67fc18': (9846 commits) fix: stop 2026-11-17 main Git checkouts from half-switching on a schema update (#206341) refactor(codex): centralize native completion delivery (#206447) fix(subagents): finish claimed stops after session rotation (#206405) fix: let owners fork a chat with exec after a subagent or exec completion (#206483) test(cli): gate agent --local cold-start processes and workers (#206466) perf(ci): skip baseline inventory when line-cap debt is empty (#189909) refactor(test): share core process-result fixtures (#174149) refactor(ci): reuse canonical budget flag parsing (#189480) fix: recover Codex chats after oversized requests (#206475) fix(agents): skip the bootstrap ritual in one-shot runs (#206477) fix(test): preserve stack coordinates in redacted failure reports (#152384) fix(gateway): return consistent unavailable response guidance (#191933) fix: preserve emphasis in Markdown table row labels (#205349) fix(nextcloud-talk): keep webhook spool helpers private (#206470) perf(plugins): overlay native receipts once per visible root (#206464) fix: keep GitHub comment approvals alive and skip repeat approval on the session PR (#206129) perf(config): retain one snapshot for unchanged validation results (#206465) refactor(test): reuse canonical secret fixture cleanup (#189492) refactor(subagents): own descendant Stop cancellation (#206444) refactor(subagents): keep announce cleanup action type private (#206407) ...
Related: #191925
What Problem This Solves
Clients receive inconsistent recovery guidance when the Gateway is starting, paused, restarting, or unavailable during a WebSocket upgrade.
User Impact
Unavailable probe and WebSocket responses now include retry guidance and avoid caching. Rejected HTTP work describes the actual pause, restart, or shutdown state, while retaining its existing status and error schema. Unknown outages are not labeled upgrades.
Why This Change Was Made
Reuse the admission owner's existing message and preserve each transport's response format. No lifecycle protocol, configuration, or authentication changes.
Work from Vincent Koc.
Evidence
git diff --checkpassed.2ac42c830f3eb28206f6570bf821b481ab02d3fafound no actionable P0–P2 issues; independent source/contract review also found none.Current test-line budget
The earlier ratchet job reported a failing
test-linesstep. Replayed the currentscripts/check-test-lines-ratchet.mtsin staged mode against the clean merge tree of this head andmainat1f3262a9e4dc. It passed with 46 net added test lines, a 400-line allowance, and 46 lines of allocation credit. The original hosted result remains red. Historical ratchet jobNovember 27 integration
Signed 0f45de9a incorporates main
33fa6a84. The five source and test files match the clean integration preview. The current regression-test allowance covers all 46 net added test lines, so this revision removes the obsolete allocation. The native ratchet passed with 400 allowed lines and zero allocation credit. Source syntax and patch checks passed. The 33 HTTP cases above are results for the previous revision. Current-head hosted qualification is pending.