fix(extension): omit credentials from daemon ping (fixes #2278) - #2282
Open
kagura-agent wants to merge 1 commit into
Open
fix(extension): omit credentials from daemon ping (fixes #2278)#2282kagura-agent wants to merge 1 commit into
kagura-agent wants to merge 1 commit into
Conversation
Contributor
Author
|
Hi @jackwener 👋 — gentle ping. This fix for #2278 (silent 431 wedge from localhost cookie overflow) has been open for 3 days with all CI green. Would appreciate a review when you have a moment. Happy to adjust anything. |
jackwener
force-pushed
the
fix/daemon-ping-431-cookie-overflow
branch
from
August 17, 2026 11:43
3fb21ef to
183871a
Compare
A large localhost cookie jar can push the extension ping past the Node default header limit. The daemon then responds 431, but the extension silently retries and never reaches the WebSocket connection. Send the ping without credentials so browser cookies are not attached, and log non-OK HTTP statuses so future probe failures remain visible. Keep connection errors quiet because a stopped daemon is the expected idle state.
jackwener
force-pushed
the
fix/daemon-ping-431-cookie-overflow
branch
from
August 17, 2026 11:44
183871a to
62d1f20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #2278. The extension can silently stop before its WebSocket connection when the daemon
/pingreturns HTTP 431.A large
localhostcookie jar can exceed the Node default HTTP header limit. Because the ping used the browser default credential mode, Chrome attached those cookies, the daemon answered 431, and the extension quietly scheduled another retry without exposing the response.Fix
/pingrequest withcredentials: omit, so browser cookies are not attachedThis deliberately does not raise the daemon header ceiling globally. The reproduced failure is the HTTP ping, and omitting credentials resolves that narrow path without expanding parsing limits for every HTTP endpoint or WebSocket upgrade.
Verification
Exact head
62d1f202rebased onto main50565efd:npx vitest run --project extension— 3 files, 97 tests passednpm run typecheck— passedcd extension && npm run build— passedgit diff --check origin/main...HEAD— passedThe final diff contains only
extension/src/background.tsandextension/src/background.test.ts.