Skip to content

🤖 fix: sign out OAuth credentials of MCP servers that a plugin update removes or an uninstall deletes - #7941

Merged
ThomasK33 merged 15 commits into
mainfrom
plugin-update-oauth-removed-signout
Nov 6, 2026
Merged

ThomasK33 merged 15 commits into
mainfrom
plugin-update-oauth-removed-signout

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Why

The goal of this run is to make each loadable plugin manifest an install choice and to make foreign plugin agents work (the plugin install-methods RFC). Review of that work found a defect that main already has. Stored OAuth credentials are keyed by the server URL. A plugin update that removes an MCP server, or an uninstall of the plugin, leaves them stored. A later server at that URL under another sign-in identity then meets the old credentials, because no current server is left to show the change.

What changed

  • An update now signs out each signed-in URL that the current install has and the staged tree no longer has. The existing rule (reset when the identity at a URL changes) moved unchanged into signInResetUrls: the CRAP gate does not let collectCapabilityChanges grow.
  • An uninstall now reads the remote MCP server URLs of the installed tree, records them as pending sign-outs before the registry commit, and signs them out before the final server stop. A failed uninstall forgets what it recorded.
  • docs/config/mcp-servers.mdx states both rules.

Scope

  • Covers the update apply path and the uninstall path. The update preview and a component review change no sign-in, so they stay as they are.
  • A needless sign-out is accepted: credentials are keyed by URL, so another server at the same URL is signed out too.
  • No UI change and no change to the stored formats.

Blast Radius

Plugin update and uninstall, for plugins with remote MCP servers. A write failure of the pending sign-out record now stops the uninstall with the install intact (the error names the file). An uninstall of a plugin with remote servers also refuses while that record is corrupt or from another Xum version, as an update already does. It refuses before anything stops or moves, with the record's own error, which names the Settings recovery step ("Sign out of plugin MCP servers"). A plugin without remote servers uninstalls regardless. A tree that Xum cannot read lists no servers and still uninstalls (logged as a warning). Downgrade: no persisted change. The pending sign-out record keeps its version 1 format.

Verification

  • Red first: installService.test.ts has an update that removes a signed-in server, an update that drops the MCP file, and an uninstall followed by a reinstall under another client. Each failed on main with the old credentials still stored, then passed with the fix.
  • Order tests pin that an update records its sign-outs before the old tree stops and moves, and that an uninstall records them before the registry commit. Moving either record later fails its test. A further test makes the uninstall's server listing throw: the uninstall still succeeds.
  • Touched paths on the pinned Bun 1.4.3: the five installService*.test.ts files and tests/bugbash/pluginInstallFixtures.test.ts (355 pass, 0 fail). make static-check, make lint-eslint, make crap-check and make dry-check pass.
  • make mutate-check exits 3: its baseline drops installService.test.ts (too slow for its baseline limit). I ran the mutants of the new functions by hand against the suites that drive them: 3 are equivalent (marked) and the rest are killed.

Generated with xum • Model: anthropic:claude-sonnet-5-5 • Thinking: xhigh • Cost: $2.42

@mintlify

mintlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
Mux 🟢 Ready View Preview Nov 5, 2026, 11:32 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-06T03:14:15.003445Z 788d670 Manual request
🔒 Security Review ✅ Completed 2026-11-06T03:15:34.666544Z 788d670 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9909513969

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🟢 e2e stories (Haiku): 14 passed

22 agent steps · 7 replayed from cache · 15 model calls · 47.1k tokens (23% cached)
Spend: $0.09 of the $1.00 cap (proxy ledger)

All 14 tests in 9 files
Test Agent Time
🟢 chatRestart.e2e.ts · 1 passed 1 step · 1 call 5.6s
🟢 a chat survives a restart of the server 1 step · 1 call 5.6s
🟢 compaction.e2e.ts · 1 passed 1 step · 1 call 4.2s
🟢 /compact replaces the old chat with a summary 1 step · 1 call 4.2s
🟢 pluginTrustRestart.e2e.ts · 1 passed 4 steps · 2 calls 10.3s
🟢 a trusted plugin hook stays trusted after the server restarts 4 steps · 2 calls 10.3s
🟢 settingsRoundTrip.e2e.ts · 1 passed 2 steps · 1 call 8.9s
🟢 a chat survives trips through Settings 2 steps · 1 call 8.9s
🟢 sidebarPerWorkspace.e2e.ts · 1 passed 4 steps · 1 call 4.5s
🟢 a new workspace starts with its right sidebar collapsed while another keeps it open 4 steps · 1 call 4.5s
🟢 smoke.e2e.ts · 1 passed 2 steps · 1 call 2.4s
🟢 the agent opens the playground workspace 2 steps · 1 call 2.4s
🟢 streamErrors.e2e.ts · 1 passed 1 step · 1 call 7.0s
🟢 stream errors show in the chat, and the chat recovers 1 step · 1 call 7.0s
🟢 todoNudge.e2e.ts · 1 passed 1 step · 1 call 2.9s
🟢 the agent finishes open TODO items after the turn-end nudge 1 step · 1 call 2.9s
🟢 touchAlignment.e2e.ts · 6 passed 6 steps · 6 calls 22.8s
🟢 the Settings close button is level with the title on a touch screen 390px wide 1 step · 1 call 4.5s
🟢 the Settings close button is level with the title on a touch screen 768px wide 1 step · 1 call 3.9s
🟢 Backup settings checkboxes are small and level with their labels on a touch phone 1 step · 1 call 4.8s
🟢 the heartbeat checkbox is small and level with its label on a touch phone 1 step · 1 call 3.2s
🟢 a reply's model and time stay on one line on a touch phone 1 step · 1 call 3.4s
🟢 the workspace actions menu stays on the title row on a touch phone 1 step · 1 call 3.1s

e2e 0.20.0 · 1m 12s · web · run artifacts

🟢 e2e Electron stories (Haiku): 3 passed

3 agent steps · 3 model calls · 7.9k tokens (22% cached)
Spend: $0.02 of the $1.00 cap (proxy ledger)

All 3 tests in 3 files
Test Agent Time
🟢 electron/deepLink.e2e.ts · 1 passed 1 step · 1 call 5.4s
🟢 a deep link of a second launch starts a chat in the running app 1 step · 1 call 5.4s
🟢 electron/menuBar.e2e.ts · 1 passed 1 step · 1 call 5.3s
🟢 the workspace menu bar is the desktop title bar 1 step · 1 call 5.3s
🟢 electron/smoke.e2e.ts · 1 passed 1 step · 1 call 5.2s
🟢 Xum Electron opens the playground workspace 1 step · 1 call 5.2s

e2e 0.20.0 · 18.1s · electron · run artifacts

🟢 e2e agent repros (Haiku): no tests selected

Spend: $0.00 of the $1.00 cap (proxy ledger)

e2e 0.20.0 · 5.8s · 2 targets (web, phone) · run artifacts

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: 9909513

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 9909513969

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 9909513969

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: c6d743c

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: c6d743cd62

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c6d743cd62

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

Head: 788d670

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 788d670423

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 788d670423

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Nov 6, 2026
Merged via the queue into main with commit 8ce331c Nov 6, 2026
64 of 67 checks passed
@ThomasK33
ThomasK33 deleted the plugin-update-oauth-removed-signout branch November 6, 2026 04:07
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