Repository navigation
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 10:16 AM ET / 14:16 UTC. Summary PR surface: Source +1, Tests +51. Total +52 across 2 files. Reproducibility: yes. at source level: a non-OK streaming discovery response enters the fallback branch without consuming its body on current baseline behavior, and the loopback-server scenario directly exercises that path. The submitted after-fix proof observes the connection closing. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the focused cancellation and streaming regression unchanged after refreshing onto current main, preserving the existing static fallback while reliably releasing failed discovery streams. Do we have a high-confidence way to reproduce the issue? Yes at source level: a non-OK streaming discovery response enters the fallback branch without consuming its body on current baseline behavior, and the loopback-server scenario directly exercises that path. The submitted after-fix proof observes the connection closing. Is this the best way to solve the issue? Yes. Canceling the unused response body at the owning provider branch is the narrowest maintainable fix, preserves fallback semantics, follows the Web Streams lifecycle contract, and is backed by a real streaming regression. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b319493a529c. Label changesLabel justifications:
Evidence reviewedPR surface: Source +1, Tests +51. Total +52 across 2 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (4 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
4a06ba0 to
17caad9
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
17caad9 to
36ae254
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
36ae254 to
d167c85
Compare
|
Merged via squash.
|
* fix(kilocode): cancel failed model discovery bodies * test(kilocode): prove failed discovery closes response
…rowing
postGitHubDeviceFlowForm now drops the unread response stream before it
raises on a non-OK HTTP status. GitHub OAuth error responses ship a JSON
body (`{error, error_description}`) that this helper never consumes, so
the underlying fetch connection previously stayed open holding the
payload until the caller's release() ran, keeping the device-flow socket
half-drained on every 4xx/5xx.
Mirrors the recently-merged qqbot/kilocode/tlon fixes for the same
'cancel body before throwing' pattern (openclaw#110008, openclaw#109950, openclaw#112059).
…rowing (#112268) * fix(github-copilot): cancel unread device-flow error bodies before throwing postGitHubDeviceFlowForm now drops the unread response stream before it raises on a non-OK HTTP status. GitHub OAuth error responses ship a JSON body (`{error, error_description}`) that this helper never consumes, so the underlying fetch connection previously stayed open holding the payload until the caller's release() ran, keeping the device-flow socket half-drained on every 4xx/5xx. Mirrors the recently-merged qqbot/kilocode/tlon fixes for the same 'cancel body before throwing' pattern (#110008, #109950, #112059). * style(github-copilot): clarify response release ordering --------- Co-authored-by: Peter Steinberger <[email protected]>
…rowing (openclaw#112268) * fix(github-copilot): cancel unread device-flow error bodies before throwing postGitHubDeviceFlowForm now drops the unread response stream before it raises on a non-OK HTTP status. GitHub OAuth error responses ship a JSON body (`{error, error_description}`) that this helper never consumes, so the underlying fetch connection previously stayed open holding the payload until the caller's release() ran, keeping the device-flow socket half-drained on every 4xx/5xx. Mirrors the recently-merged qqbot/kilocode/tlon fixes for the same 'cancel body before throwing' pattern (openclaw#110008, openclaw#109950, openclaw#112059). * style(github-copilot): clarify response release ordering --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where a failed Kilocode model discovery response could leave its response body unread while OpenClaw falls back to the static Kilocode catalog.
Why This Change Was Made
The non-OK discovery branch now cancels the response body before returning the fallback catalog, matching the cleanup behavior used by sibling provider discovery paths.
User Impact
Kilocode setup/model refresh failures keep the existing fallback behavior without holding a failed HTTP response stream open.
Evidence
node --import tsx proof-live.mjsimports the productiondiscoverKilocodeModels()module, routes only the fixed Kilocode URL's network boundary to anode:httploopback server, returns HTTP 500 with a streaming body, verifies the static catalog fallback, and prints the server-side failed responsecloseevent after fallback. The fullproof-live.mjssource is included below.node scripts/run-vitest.mjs extensions/kilocode/provider-models.test.ts -- -t "falls back to static catalog on HTTP error"passed with the committed loopback regression.node scripts/run-vitest.mjs extensions/kilocode/provider-models.test.tspassed 10 tests.The local-server proof is committed in
extensions/kilocode/provider-models.test.ts: the server returns a non-OK streaming response,discoverKilocodeModels()returns the unchanged static Kilocode catalog, and the test asserts the server observed the failed response close.standalone proof source
regression proof excerpt
AI-assisted: built with Codex