Skip to content

Prevent stale session checks from clearing a newer sign-in cookie - #5446

Merged
freeqaz-openai merged 2 commits into
mainfrom
fix/session-inspection-cookie
Nov 11, 2026
Merged

freeqaz-openai merged 2 commits into
mainfrom
fix/session-inspection-cookie

Conversation

@freeqaz-openai

@freeqaz-openai freeqaz-openai commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

A late response to GET /api/auth/session could clear the cookie another tab had just received at sign-in. Session inspection now removes Set-Cookie after validating the optional session key. It preserves the response status, session data and other headers. Explicit sign-out still revokes the session and clears its cookie. The authentication reference and sign-in flow document this behavior.

The HTTP regression signs in again after logout, then sends the revoked cookie. It checks for 200 with null session data, no Set-Cookie, and the existing cache headers. The fresh cookie still resolves to a different session key. The cookie-header assertion failed on the old code and passed with the fix. All 22 local Console HTTP tests passed, along with lint, typecheck, formatting, workspace, OpenAPI and docs checks.

Hosted PostgreSQL Authentication passed all 182 tests with zero skips, including three cookie-commit tests. In Chromium, the guarded session cookie authenticated requests on both the Console and a trusted Agent host. Hosted job

Local Chromium stopped before any browser actions. The HTTP regression ran sequentially. Manually checking two tabs on an installed deployment with a delayed stale response remains pending.

Independent source review found no actionable P0–P3 issues. All required hosted CI checks passed for 361342fd3910dbf7aaf8398fab26f5934c08c844.

@clawsweeper

clawsweeper Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@freeqaz-openai
freeqaz-openai marked this pull request as ready for review November 11, 2026 09:43
@freeqaz-openai
freeqaz-openai requested a review from a team as a code owner November 11, 2026 09:43
@freeqaz-openai
freeqaz-openai merged commit 79d4e3d into main Nov 11, 2026
49 of 51 checks passed
@freeqaz-openai
freeqaz-openai deleted the fix/session-inspection-cookie branch November 11, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant