Repository navigation
docs(plans): deleting a member's account refuses while they own a hosted row (TASK-172) - #2026
Merged
Merged
Conversation
…ted row (TASK-172) The admin user delete removes the person and nothing else, so a hosted row would outlive its owner, with its grants still resolving and its refresh token kept by the sweep. §7 names the path and the refusal, step 6 gains its witness, and §8 says which delete credentialOwnerId holds against. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…broker, and the 409 names its rows (TASK-172) The account-delete refusal named no rows, so an admin had no next step. Its body now lists each row's _id and entry, which is what DELETE /api/integrations/:id takes. A ban leaves the row, its grants and the refresh token as live as a delete does, and it is the likelier way a member leaves. The broker now refuses connection_owner_unavailable when the row's owner is banned or gone. One check in resolveHostedConnection covers the list, the call and the approved call. The ban route stays unguarded because a ban can be urgent and can be lifted; lifting it restores the grants with no reconnect. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…and §8 claims no exclusivity (TASK-172) §8 said a name on the trail would be the one place a deleted person's name survives. Activity already stores actor.name and replies.actorName, and account deletion clears neither, so the claim is dropped. The column still defers the retention decision without it. The ban bullet now says why the check has to sit in the broker: auth is the only reader of banned, and neither the grants route (agentRuntimeAuth) nor the native runtime passes through it. The owner check is scoped to hosted rows; a github-app token belongs to the app installation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…proval-after-ban witness (TASK-172) The owner check is TASK-181's precondition, so the plan names it. §9's table gains the refusal: refused before calling, trailed refused/connection_owner_unavailable by both call paths' existing catch, and neither the row nor the grant is touched. The check reads live state at call time, so nothing is written when the ban is set. Step 6's witnesses ban or delete a member who owns the row and then call through the broker, rather than calling the check, and a third covers a call approved after the ban. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… its cause (TASK-172) One code covered two causes with different remedies: a banned owner needs the ban lifted, a missing one needs the row removed and replaced. The check now reads the owner through sessionAccountService, the one definition the session verifiers share, and renders its answer as connection_owner_banned, _missing or _bot. The plan also says where the refusal is written: both call paths' existing catch records it as refused with the code as reason (safeReason). A refused list writes no row, since a list is not a call; the seat gets the code as a JSON-RPC error. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Sep 29, 2026
Merged
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.
Step 6 of the hosted-MCP plan lists every path that can remove a hosted row. It misses the two paths that remove the row's owner instead of the row: deleting the account and banning it.
DELETE /api/admin/users/:userId(behind both admin pages' Delete) runsdeleteOne()on the User and does nothing else, becauseUserhas no delete hook.PATCH /api/admin/users/:userId/bansetsbannedand does nothing else.resolveHostedConnectionnever reads the owner. So after either one, the hosted row staysconnected:auth;This PR changes
docs/plans/hosted-mcp-connection-scope.mdin four places:sessionAccountServiceand names the cause:connection_owner_banned,connection_owner_missingorconnection_owner_bot(403). The ban reaches the grants only this way, because neither path to the broker passes throughauth, and nothing on those paths readsbanned.listToolsForGrant,callToolandexecuteApprovedToolCallall resolve through the check, so it covers the offer, the call and a call approved after the ban. This is TASK-181's shape: a check at call time, trailedrefusedwith the code asreasonand named in §9's table. Nothing is written when the ban is set, so lifting it restores the grants with no reconnect. Agithub-approw is unchanged, because its token belongs to the app installation.409while the person owns a hosted row, and its body lists each row's_idand entry. An admin removes them first throughDELETE /api/integrations/:id, which admits admins and runs §9's removal. Removal stays one path with one retry.credentialOwnerIdholds against the row's delete, not the person's.Docs only, one file.
Gate: Rhea
🤖 Generated with Claude Code