Repository navigation
Isolate MCP connection authority and await descendant grant drains - #4456
Merged
Jason Morse (JasonVMo) merged 4 commits intoNov 6, 2026
Merged
Conversation
Separate permission scopes, attenuate each connection into a child principal, and preserve terminal-only cleanup proof across failed drains and lost responses. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
Bundle size reportTree-shaken, minified production esbuild bundles with React and React Native runtimes externalized.
The job is advisory: size changes are reported but do not fail the pull request. Bundle or analysis errors still fail. |
Khalef Hosany (Khalef1)
approved these changes
Nov 6, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preserve attenuated grant and cleanup status alongside native and driver-service boundary evidence. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Restore normal cleanup budgets in finally and exercise application cleanup beyond the injected click deadline. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Jason Morse (JasonVMo)
enabled auto-merge (squash)
November 6, 2026 08:12
Jason Morse (JasonVMo)
deleted the
jasonmo-microsoft-f12-grant-isolation
branch
November 6, 2026 08:37
This was referenced Nov 6, 2026
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.
Platforms Impacted
Description of changes
F12 separates
driver-control,declared-workload, andoperator-recoveryscopes, defaulting grants to driver-control only. Trusted delegation enforces strict target and scope subsets, with bounded depth and service-lifetime issuance. The fixed HTTP delegation route can only create a driver-only child for the current target set.Each MCP controller now keeps a distinct child principal after verified descriptor discovery. Sibling sessions remain isolated; older or unprotected services without delegation fail closed. Parent revocation synchronously invalidates its subtree and exposes an awaitable drain that joins acquisitions and session cleanup, including prior descendant revocations. Digest-only tombstones permit only the same child to retry its own terminal cleanup after a failed drain or lost response; unauthorized is not accepted as cleanup success. No management/recovery HTTP surface or cross-connection session resume is introduced. Credentials stay out of status, tool output, and diagnostics.
Mainline integration: Normal merge
114c7c1937ecf6f6b87ec8da72fe5b7b4f58026fincorporates F7 from main0cfecf0b3a8d135c7cd7f5f6abc0400a9f00a3eb, following the earlier F1 integration atd9fc74280c7ecdc26329317ef2922580499f6dc9. The only manual conflicts were the desktop-driver and desktop-driver-mcpreferences/current-status.mdtables, reconciled additively to retain F12 isolation/drain evidence, F7 neutrality/native-subpath evidence, and F1's shared service/recovery boundary. Exports retain./nativeand./driver-service. No unmerged sibling branch was integrated.Test resilience: User-requested commit
e4d2efc20f855d511c78e8c070a530f15d9ce7ebrestores the original native-command budget infinallyafter each intentionally timed-out click in both quarantine tests. Both fixtures use a 25 ms fake application close delay, longer than the injected 10 ms click deadline. This follow-up changes tests only, not production cleanup behavior; the earlier hosted cleanup failure's cause remains unconfirmed.Verification
Post-F7 integration validation: Focused suites ran on merge
114c7c1937ecf6f6b87ec8da72fe5b7b4f58026f; authority tests and the aggregate were rerun with the test-resilience change at final heade4d2efc20f855d511c78e8c070a530f15d9ce7eb.yarn install --immutable— passed with existing peer warnings, reported by the implementation owner.cd packages/agentic/desktop-driver && yarn test grants— passed, 23 tests.cd packages/agentic/desktop-driver && yarn test recovery— passed, 12 tests.cd packages/agentic/desktop-driver && yarn test settlement— passed, 19 tests.cd packages/agentic/desktop-driver && yarn test src/server/authority.test.ts— passed, 33 tests, including after the resilience change; an independent coordinator rerun also passed 33 tests.cd packages/agentic/desktop-driver-mcp && yarn test server— passed, 25 tests.cd packages/agentic/desktop-test && yarn build— passed; generated the library required by the contract fixture.cd packages/agentic/desktop-test && yarn test contracts— passed, 22 tests.cd packages/agentic/desktop-driver && yarn format— passed after the resilience change.yarn clean-lage-cache && yarn lage buildci && yarn lage test-links --verbose --grouped— cache clear passed; buildci failed with 125 successful tasks and 1 failure because the unchangedstorybook-desktopfake WDIO executable worker exceeded its 7000 ms process deadline. Links were not run in this attempt.cd packages/agentic/storybook-desktop && yarn test wdioRunner— passed, 1 test, without source changes.yarn lage buildci— passed, 60 successful executed tasks and 118 cached tasks, 0 failed; all 178 tasks were accounted for after the cache clear.yarn lage test-links --verbose --grouped— passed, 90 successful tasks, 0 skipped/failed.The coordinator independently read the retained focused-test and aggregate failure/retry logs and verified a clean worktree, F7 mainline ancestry, local/remote/PR head equality, and GitHub
mergeable: trueafter the normal push. The WDIO deadline failure remains unattributed; a passing isolated or aggregate retry does not establish its cause. In the fresh hosted PR validation ate4d2efc20, the JS PR job passed: 178 tasks successful, 0 skipped, pending or aborted. The coordinator checked the job status and the retained raw log. Android, Win32, Bundle Size, NPM pack, changeset and repo-link jobs also passed. The macOS, iOS, Windows and Storybook native jobs were still running when this evidence was captured, so the full workflow is not claimed as passed. The JS pass does not confirm the cause of the earlier cleanup failure.Historical hosted failure: The earlier JS PR job, before F7 integration and the test-resilience change, failed during
harness.close()insrc/server/authority.test.ts, in the quarantine session-ID isolation test, withAggregateError: Desktop Driver cleanup failed.The hosted driver suite reported 798 passed, 72 skipped, and 1 failed. A subsequent local authority-test run passed 33/33; both logs were retained and independently checked. Leakage of the fixture's 10 ms native-command budget into cleanup is a possible explanation, not a proven cause or baseline-flake classification. GitHub rejected the attempted JS-only rerun while other workflow jobs were running. That old-head rerun was subsequently dropped in favor of fresh CI on the new push; it is no longer pending.Historical pre-integration validation at
341834bf902af962df0c67ddfed49300b6c291cd(not fresh-head results):cd packages/agentic/desktop-driver && yarn format && yarn lint && yarn build && yarn test— passed; 808 passed, 61 skipped.cd packages/agentic/desktop-driver-mcp && yarn format && yarn lint && yarn build && yarn test— passed; 25 passed.yarn clean-lage-cache— passed.yarn lage buildci— passed; 178 tasks, 0 failed.yarn lage test-links --verbose --grouped— passed; 90 tasks, 0 failed.yarn change:check— passed.yarn check-agent-instructions,yarn oxfmt --check, andgit diff --check— passed.Not run: live native descriptor-path and physical-input qualification, including macOS, Windows, and Win32 consumer lanes. No live app or desktop-driver service was launched for post-main validation. JavaScript tests and bundles do not qualify these native behaviors.
Pull request checklist
This PR has considered (when applicable):
Fixes #4440