chadtmiller.com/group-host
atmosphere group host
0
0
Disconnecting an assistant can get its client deleted, so reconnecting fails
Closedchadtmiller.com mentioned this in An assistant once connected can connect again
What happened
whenever anyone registers a client, the sweep deletes every client over a day old whose id has no
assistant_grantrow. The comment says it removes "one never connected", but it also removes a client the member connected and then disconnected, becausedisconnect_assistantdeletes the rows. - A day later, the assistant reconnects with its storedclient_id. -/mcp/authorizeanswers with a plain 400, "no client by that client_id", which is not an OAuth redirect the assistant can act on. - The member has to remove the assistant and add it again. It also works the other way: lapsedassistant_grantrows are never deleted (only on put-out, group deletion or disconnect), so a client whose connection lapsed is kept forever. The testforgets_a_client_that_never_connectedcovers only a client that never connected.How to see it
Read against
docs/freshat 4636e6d, the code at: crates/group-host/src/assistants.rs:124-126 (and :201-224, :789-805). Paths are undercrates/group-host/srcunless they say otherwise. Severity: medium.What you expected
Sweep only clients that never had a grant, for example by marking a client when it first connects. Delete
assistant_grantrows onceexpires_athas passed.Where
The host, as built from 4636e6d. Found while checking the docs against the code.