Skip to content

Fix two Sentry reports: legacy agent spelling on handover, 500 on a plain GET /ws - #2047

Closed
joepio wants to merge 1 commit into
developfrom
sentry/triage-1r-m
Closed

joepio wants to merge 1 commit into
developfrom
sentry/triage-1r-m

Conversation

@joepio

@joepio joepio commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Before: signing in with an account while a guest identity held a workspace could fail to keep the previous identity with "no stored key for atomic:agent:..." even though the device held that key (ATOMIC-BROWSER-1R). The server also answered a plain GET /ws that is not a WebSocket upgrade with a 500, which error reporting counted as an incident: 18 events from a crawler (ATOMIC-SERVER-M).

After: the handover finds the key whichever spelling of the agent it is asked for, and a non-upgrade request to /ws gets a 400.

1R: archiveStoredAgent compared the stored subject to the requested one as strings, while the caller had matched them by identity (sameAgent). It now compares identities and keeps the key under the spelling the device stores it in. The new vitest case fails on develop with the same "no stored key" error.

M: the handshake error from WsResponseBuilder::start was converted to a 500. It is now AtomicServerError::bad_request. The new server test asserts 400 and gets 500 without the change.

Checked locally: vitest for agentStorage, oxlint and oxfmt, cargo clippy -D warnings and the new server test.

Not changed on purpose: ATOMIC-BROWSER-1T (one event from a Chimera crawler on the portal sign-in page) and ATOMIC-BROWSER-1S (one stale chunk after a deploy).

Requested by Joep

…lain GET /ws

ATOMIC-BROWSER-1R: archiveStoredAgent compared the stored agent subject to the requested one as strings, so asking for an agent in the atomic:agent: spelling failed with 'no stored key' for a key the device holds. It now compares identities, and keeps the key under the spelling the device stores it in.

ATOMIC-SERVER-M: a request to /ws that is not a WebSocket upgrade failed the handshake and answered 500, which Sentry reported as an incident (18 events, from a crawler). It now answers 400.
joepio added a commit that referenced this pull request Oct 5, 2026
… chat, search, CI) (#2060)

Combines #1530, #1638, #1663, #1835, #1869, #1896, #1898, #1911, #1912, #1913, #1914, #1918, #1919, #1929, #1931, #1949, #1958, #1959, #1961, #1963, #1968, #1975, #1981, #1985, #1988, #2038, #2041, #2047 and #2050, tested in one full Mancave run on the exact head (run 4999, green).

joepio commented Oct 5, 2026

Copy link
Copy Markdown
Member Author

Landed on develop in the combined batch #2060 (95707c0), tested together in one full run. Closing as included.


Generated by Claude Code

@joepio joepio closed this Oct 5, 2026
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