Repository navigation
org: ship-ready test round fixes (removal, reconnect, shared areas) - #2912
Merged
Merged
Conversation
…cess
DELETE /v1/people/{handle}/sessions ended sign-ins and bots, but a hosted chat
holds a minted bearer of its own, valid for seven days. A removed person's chat
kept spending the organization's model key and reaching git as them, and their
stored provider keys and chats stayed behind.
Removal now ends those bearers first, in this process, then forgets the
person's sealed keys, then deletes their chats on the chats' host. A registry
row is forgotten only once the host confirms the delete (or answers that the
chat is not there); a host that is down never blocks the removal. The
revoke-link loop does the same for the people it removes.
Found by the hostile-client round (a bearer replayed after its owner was
removed still got a 200 from the model door).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…next attach finishWire cancelled the finished connection before taking the lock that removes it from the chat's group. For as long as it waited for that lock the connection was "cancelled and still in the group", which reserveWire reads as "the chat is being stopped", so a reconnect in that window got 503 "This chat is unavailable right now." (a guest saw "The place chats run on is not answering."). The cancel now runs after the removal. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
/tmp, /dev/shm and /var/tmp are writable by every chat by design, and the reap helper cleared only the chat's own folder. After the 24 hour quarantine a new chat on the same Linux user found the old chat's files, FIFOs, shared memory, message queues and semaphores, owned by "itself". Every mode of the reap helper (clear on delete, tmp on stop, init on start) now also removes, as the chat's own user and without following links, everything that user owns in those three areas and every System V segment, semaphore set and message queue it owns or created. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rows of GET /v1/hosted/sessions carry `verbs` since 527bf1f, and the smoke test still asserted the old key set. A shared row now asserts the verbs ['view'], the operator's metadata-only row asserts none. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… to everyone When the operator removed a person while the chats' host was down, the person's chats were not listed, so their registry rows and shares stayed, and a guest holding edit could still attach and wake one. Waking a chat mints a fresh model bearer for its owner, which is the access the removal had just ended. Every chat the registry still holds for a removed person now has its shares ended and is made private, so every door answers "There is no such chat." The row stays, so the chat is still tracked and removing the person again once the host answers deletes it. The host calls also stop after the first transport error, so a hung host does not make a removal wait once per chat. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… leftovers are cleared Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
AbirAbbas
added a commit
that referenced
this pull request
Nov 25, 2026
…ack (#2903) The hosted organisation line: a team-mode org server deciding every request through one access model (verbs, roles, grants and policy in SQLite), hosted chats run by the sessionhost under a per-chat uid inside a Landlock fence with minted model bearers, sealed keys and a git helper, shared chats acting through verbs, bots owned by their creator, the Hosting and chats policy settings, and a self-hosting stack (deploy/org Docker Compose, published images behind a leak gate, a Railway path). Consolidates #2894 #2895 #2896 #2898 #2899 #2900 and the follow-ups #2904 #2905 #2907 #2908 #2910 #2911 #2912 #2913 #2915 #2916 #2918 #2927 #2936 #2944. Proven by the full suite, a keyless Compose smoke, a hostile wire client, sandbox escape probes, a real-model run and a production-style install from the published images. Co-Authored-By: Santosh kumar <29346072+santoshkumarradha@users.noreply.github.com> Co-Authored-By: ZeroPoint95 <329227198+ZeroPoint95@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this is
The server-side layers of the ship-ready test round on the organization line: the keyless Compose smoke, a hand run of the
terminal client against the stack, a hostile websocket client, sandbox-escape probes through a chat's own tool path (with a
control that succeeds for every probe), the reuse of a Linux user after a chat is deleted, and spend caps under concurrent
calls. Four real defects came out of it and are fixed here, each in its own commit with a test written from the behaviour;
a fifth commit corrects a stale assertion in the smoke test. The harnesses and the evidence are not in this pull request.
Defects fixed
DELETE /v1/people/{handle}/sessionsended sign-ins and bots, but a hosted chat holds a minted bearer of its own, so a removed person's chat kept spending the
organization's model key and reaching git as them. Now removal ends those bearers first (in this process), forgets the
person's stored provider keys, and deletes their chats on the chats' host, forgetting each registry row only once the host
confirms. A host that is down never blocks a removal.
removal, the chat and its shares stayed, and a guest holding
editcould attach and wake it, which mints a fresh modelbearer for its removed owner. Now every chat the registry still holds for a removed person has its shares ended and is made
private, so every door answers
There is no such chat.; the row stays tracked, and removing the person again once the hostanswers deletes it.
connection before it left the chat's group, so a reconnect in that window read as a chat being stopped.
/tmp,/dev/shmand/var/tmpare writable by design and only the chat's own folder was cleared. Every mode of the reaphelper now also removes what the chat's user left there, as that user and without following links.
verbs.Validation Contract
keeps its access; their chats are gone from the host and the registry; their stored keys are forgotten; a host that is down
does not stop the removal; a chat the host could not delete is closed to everyone, guests included.
/dev/shm,/tmp,/var/tmpor the System V tables; nothing owned by another user is touched; a link is never followed; every reap mode sweeps.
Each test names the item it checks, and the removal and sweep tests carry a control that succeeds before the change they test.
What was run
edit, a revoke mid-session, a bot, spend and audit rows naming the asker, a personal home that shows no organization chat).
a chat's own tool path, each with a control that succeeds with the protection off, Linux user reuse after a chat is deleted, and
concurrent spend against the per-chat cap and the monthly limit.
make pr-ready BASE=origin/org/mainon this head passes. One test,TestFactorySetupContinueEndsReadingWithoutWatchingUnreadRepos,failed on this branch and on
org/mainitself under load, so the gate reports it as already failing on the base.The stack results and the harnesses live in the lane's notes, not in this pull request.
Not in this pull request
No documentation was edited. The notes list the doc corrections and the open calls for the owner.
🤖 Generated with Claude Code