Fix issues related with sandbox repair in dev containers. - #327679
Closed
dileepyavan wants to merge 13 commits into
Closed
Fix issues related with sandbox repair in dev containers.#327679dileepyavan wants to merge 13 commits into
dileepyavan wants to merge 13 commits into
Conversation
Signed-off-by: Dileep Yavanmandha <dileepy@microsoft.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e1208fbe-68f8-47ea-a191-749bf2c4ea7b
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
…groups (#327654) Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @anthonykim1Matched files:
|
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Enables terminal sandbox fallback behavior in containerized Linux environments and improves bubblewrap restriction handling.
Changes:
- Detects AppArmor user-namespace restrictions and enables weaker nested sandboxing.
- Automates AppArmor remediation and adds actionable failure guidance.
- Expands sandbox helper, engine, and terminal tool tests.
Show a summary per file
| File | Description |
|---|---|
src/vs/platform/sandbox/common/sandboxHelperService.ts |
Adds AppArmor restriction status. |
src/vs/platform/sandbox/node/sandboxHelper.ts |
Reads the AppArmor kernel setting. |
src/vs/platform/sandbox/common/terminalSandboxEngine.ts |
Selects nested sandbox fallback behavior. |
src/vs/platform/sandbox/test/node/sandboxHelper.test.ts |
Updates helper expectations. |
src/vs/platform/sandbox/test/common/terminalSandboxEngine.test.ts |
Tests nested sandbox fallback. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts |
Automates remediation and reports restrictions. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/browser/terminalSandboxService.test.ts |
Updates prerequisite test data. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts |
Tests remediation and guidance flows. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 3
- Review effort level: Medium
Comment on lines
+1872
to
1873
| const selectedRemediation = toolSpecificData.sandboxRemediations[0] as TerminalSandboxPreCheckRemediation; | ||
| const { exitCode } = await this._terminalSandboxService.runSandboxRemediation(selectedRemediation, invocation.context.sessionResource, token, sandboxPrerequisiteTerminalOptions); |
Comment on lines
+336
to
+340
| if (missingDependencies.length === 0 && this._sandboxDependencyStatus?.bubblewrapUsable === false) { | ||
| if (this._sandboxDependencyStatus.apparmorRestrictsUnprivilegedUserNamespaces !== true || (forceRefresh && this._apparmorRemediationRequested)) { | ||
| if (!this._enableWeakerNestedSandbox) { | ||
| this._enableWeakerNestedSandbox = true; | ||
| await this.getSandboxConfigPath(true, precheckInputs); |
Comment on lines
+2581
to
+2592
| private _getBubblewrapHostRestrictedResult(): IToolResult { | ||
| const settingId = AgentSandboxSettingId.AgentSandboxEnabled; | ||
| const message = localize( | ||
| 'runInTerminal.bubblewrap.hostRestriction', | ||
| "Sandbox creation failed due to host restrictions. Disable sandboxing (`{0}`).", | ||
| settingId, | ||
| ); | ||
| return { | ||
| content: [{ kind: 'text', value: message }], | ||
| toolResultMessage: message, | ||
| }; | ||
| } |
dileepyavan
marked this pull request as draft
July 27, 2026 18:44
Contributor
|
Base:
|
Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* [cherry-pick] Revert "rotating empty state messaging" * Delete unused chatInputPlaceholderRotation.ts left over from conflict resolution Co-authored-by: justschen <54879025+justschen@users.noreply.github.com> --------- Co-authored-by: vs-code-engineering[bot] <vs-code-engineering[bot]@users.noreply.github.com> Co-authored-by: Justin Chen <54879025+justschen@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.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.
Summary
Testing
Fixes #316626