Repository navigation
agentHost: graduate the legacy-settings managed-permissions bridge - #333290
Closed
joshspicer wants to merge 4 commits into
Closed
joshspicer wants to merge 4 commits into
joshspicer wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 3
New issues introduced by this change (3)
| Severity | Finding |
|---|---|
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts — The deprecation text says this value is ignored, but the adjacent description still says “When… |
|
src/vs/platform/agentHost/common/agentHostManagedSettings.ts — This semantic update leaves the repository's managed-settings guidance stale:… |
|
src/vs/platform/agentHost/test/common/agentHostManagedSettings.test.ts — The default-on coverage stops at the resolver, while agentHostProtocolClient.test.ts:1214-1217… |
What changed in this PR
Graduates the legacy-settings permissions bridge to default enforcement following the runtime fix referenced by #332011.
Changes:
- Removes the experimental opt-in gate.
- Deprecates the now-ignored setting.
- Adds default-on and explicit-false tests.
| File | Description |
|---|---|
agentHostManagedSettings.ts |
Makes permission mapping unconditional. |
chat.shared.contribution.ts |
Deprecates the compatibility setting. |
agentHostManagedSettings.test.ts |
Updates bridge behavior tests. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
joshspicer
force-pushed
the
joshspicer/graduate-legacy-settings-bridge
branch
from
August 31, 2026 18:09
8d85ef1 to
6ee5415
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/vs/platform/agentHost/test/common/agentHostManagedSettings.test.ts — This default-on test only verifies the VS Code DTO. It cannot catch the regression that originally… |
Pre-existing issues (3)
| Severity | Finding |
|---|---|
src/vs/platform/agentHost/test/common/agentHostManagedSettings.test.ts — The default-on coverage stops at the resolver, while agentHostProtocolClient.test.ts:1214-1217… View comment |
|
src/vs/platform/agentHost/common/agentHostManagedSettings.ts — This semantic update leaves the repository's managed-settings guidance stale:… View comment |
|
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts — The deprecation text says this value is ignored, but the adjacent description still says “When… View comment |
Suppressed comments (1)
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts:1617
- The new deprecation text says the value is ignored, but the adjacent setting description still says mapping happens “When enabled.” Both are displayed as user-facing setting documentation, so existing users now receive contradictory guidance. Update the description to describe the always-on bridge without conditioning it on this boolean.
markdownDeprecationMessage: nls.localize('chat.agentHost.copilot.mapLegacySettingsToManagedSettings.deprecated', "This setting is no longer used. Supported legacy settings are always mapped to Copilot SDK managed settings, so this value is ignored."),
The bridge from legacy VS Code settings to the Copilot SDK's per-session managedSettings.permissions shipped behind the experimental opt-in chat.agentHost.copilot.mapLegacySettingsToManagedSettings because the runtime treated any managed rule from any source as activating the global managed policy, so one narrow restriction forced unmatched shell/read/write/URL/factory requests to prompt. github/copilot-agent-runtime#16249 makes client/session-injected managed permissions non-activating, which removes that broadening. The bundled runtime VS Code spawns contains the fix, so the bridge becomes the default enforcement path. The setting is deprecated and its value is now ignored rather than honored as an opt-out: the mappings only ever contribute administrator-configured restrictions, so honoring an explicit false would let a user switch off an enterprise policy. Also drops the now-inert opt-in fixture from the per-tool auto-approval tests added in #333264, so no test implies the gate still influences the result. Refs #332011 Co-authored-by: Copilot <[email protected]>
joshspicer
force-pushed
the
joshspicer/graduate-legacy-settings-bridge
branch
from
August 31, 2026 18:22
6ee5415 to
6898071
Compare
joshspicer
marked this pull request as ready for review
August 31, 2026 18:31
Contributor
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 2
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts — The setting is now ignored for both true and false, but the Settings UI still says mapping… |
Pre-existing issues (4)
| Severity | Finding |
|---|---|
src/vs/platform/agentHost/test/common/agentHostManagedSettings.test.ts — This default-on test only verifies the VS Code DTO. It cannot catch the regression that originally… View comment |
|
src/vs/platform/agentHost/test/common/agentHostManagedSettings.test.ts — The default-on coverage stops at the resolver, while agentHostProtocolClient.test.ts:1214-1217… View comment |
|
src/vs/platform/agentHost/common/agentHostManagedSettings.ts — This semantic update leaves the repository's managed-settings guidance stale:… View comment |
|
src/vs/workbench/contrib/chat/browser/chat.shared.contribution.ts — The deprecation text says this value is ignored, but the adjacent description still says “When… View comment |
Follow-up to the gate graduation, from PR review: - The managed-settings skill guidance still listed the false-by-default experimental gate as a bridge invariant, which would instruct future work to restore the removed gate. Updated in sdk-runtime-policy.md, and in the two further places carrying the same claim (legacy-permission-policy.md and SKILL.md). - The protocol-boundary tests still supplied the deprecated opt-in to their forwarding fixtures, so they did not prove a local connection forwards restrictions without it. Removed, along with the now-unused import. Co-authored-by: Copilot <[email protected]>
The bridge is now unconditional, so the gating setting had no effect while still presenting a checkbox in Settings whose description claimed mapping happens "when enabled". A user with an existing `false` value was told the bridge was disabled while restrictions were in fact enforced. Remove the setting from the configuration registry and drop the now-unused constant. The resolver already ignores the value, so behaviour is unchanged; this only stops Settings from advertising a control that does nothing. The unit test keeps the regression guard using the raw setting id, so a stale settings.json entry still cannot switch off an administrator restriction. Co-authored-by: Copilot <[email protected]>
Henning Dieterichs (hediet)
previously approved these changes
Aug 31, 2026
joshspicer
enabled auto-merge (squash)
August 31, 2026 18:59
1 of 5 tasks
Resolve bridge graduation conflicts without reverting newer configuration features. Remove stale opt-in fixtures and verify real bundled runtime restrictions on create, cold resume, and removal, with active-turn lifecycle coverage. Co-authored-by: Copilot App <[email protected]>
Member
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.


Graduates the supported legacy-settings →
managedSettings.permissionsbridge from experimental opt-in to default-on enforcement for Copilot sessions on the machine's Agent Host. Existing host permission enforcement remains in place.Refs #332011. This is bridge graduation, not full Local → Agent Host control parity. Local means the legacy harness. MCP, network allow-only, per-tool redesign, external managed-policy activation, and picker synchronization remain separate workstreams.
Behavior
Client-injected
deny/askrestrictions bind without making unrelated permission families require managed approval. External managed sources intentionally have different activation semantics; this PR does not change them. The bridge contributes noallowlist and reads only supported explicit global layers, not workspace/folder values. Policy-only mappings remain policy-only.chat.agentHost.copilot.mapLegacySettingsToManagedSettingsis removed from the registry and resolver dependencies. Staletrueandfalseentries are ignored; neither can disable a mapped restriction. Settings no longer advertises an ineffective opt-in. The stale activation warning and contributor guidance are corrected.Refresh and coverage
Updated head:
8c6df6e7acfbc2d98269d466cda504d2e9e6596e.Merged main
7b1026af053270cc810e734d841fa7dc44fa97bewithout rebasing or rewriting published commits. Conflict resolution preserves newer workspace-trust, session-catalog, and Claude Advisor changes. Two main-added IPv4/IPv6 test fixtures also needed their obsolete gate entries removed. The resulting nine-file PR delta merges cleanly with the subsequently fetched main; unrelated later UI changes are not part of this work.Added
copilotManagedPermissions.integrationTest.tsand managed-permission-specific active-turn restart coverage. Production update/removal/reconnect behavior and idle-boundary restart semantics are unchanged.Executed native runtime evidence
Installed SDK:
1.0.15-unstable.35393089353.gfc44743. The running bundled runtime reported1.0.85-unstable.r35379093703.g3514c9a, protocol 3. This supersedes the earlier package/tag-containment discussion: versions, dates, symbols, or ancestry alone are not behavior evidence.The new integration tests pass bridge-generated restrictions into the real SDK and exercise the runtime's native tool pipeline. An existing loopback BYOK proxy supplies one synthetic model response solely to establish persisted history. No production credentials or paid model calls are used.
managedApprovalRequired=true; unrelated requests retain baseline behaviorShell/read/write operations run against temporary files. URL requests that reach the handler are deliberately rejected before network access. Assertions inspect real permission requests and operation results, not just DTO serialization. This is SDK/runtime integration, not full Agent Host/AHP E2E.
Passed on macOS ARM64:
./scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/providerIntegration/copilotManagedPermissions.integrationTest.ts: 4 passing (three runtime scenarios plus registry guard), repeated successfully.npm run typecheck-clientand ESLint over the six changed TypeScript files.Remaining validation and rollout limits
No extension launch provider is registered for standalone extensions; no substitute success is claimed.@vscode/sqlite3loading: the two cold-start self-healing tests and managed-shell materialization test.Real server exited prematurely with code 1); the runner also reports missing@vscode/fs-copyfilenative binding. Full AHP evidence remains unavailable in this environment.npm run export-policy-datafailed because the native@vscode/policy-watcherbinding is absent. Generated policy data was not manually changed; the removed gate has no policy entry.