Skip to content

[WIP] Fix emission of --enable-chroot for awf call#15247

Merged
pelikhan merged 2 commits intofirewallv0.15.0from
copilot/sub-pr-15246
Feb 12, 2026
Merged

[WIP] Fix emission of --enable-chroot for awf call#15247
pelikhan merged 2 commits intofirewallv0.15.0from
copilot/sub-pr-15246

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

  • Remove --enable-chroot flag from copilot_engine_execution.go
  • Remove --enable-chroot flag from claude_engine.go
  • Remove --enable-chroot flag from codex_engine.go
  • Update tests in firewall_args_test.go to not expect --enable-chroot
  • Update tests in gh_cli_mount_test.go to not expect --enable-chroot
  • Update tests in sandbox_mounts_test.go to not expect --enable-chroot
  • Update documentation in sandbox.md to reflect v0.15.0 default behavior
  • Run make test-unit to validate all changes
  • Recompile all 147 workflows to remove --enable-chroot flag

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

AWF v0.15.0 makes chroot mode the default behavior, so the --enable-chroot flag is no longer needed. Updated all engine files (copilot, claude, codex) and corresponding tests to reflect this change.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan marked this pull request as ready for review February 12, 2026 23:06
Copilot AI review requested due to automatic review settings February 12, 2026 23:06
@pelikhan pelikhan merged commit 24bfc7b into firewallv0.15.0 Feb 12, 2026
@pelikhan pelikhan deleted the copilot/sub-pr-15246 branch February 12, 2026 23:06
Copilot AI requested a review from pelikhan February 12, 2026 23:06
Copilot stopped work on behalf of pelikhan due to an error February 12, 2026 23:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the deprecated --enable-chroot flag from AWF invocations and updates tests/docs to reflect AWF v0.15.0+ behavior where chroot mode is the default.

Changes:

  • Removed --enable-chroot from AWF argument construction in Copilot/Codex/Claude execution paths.
  • Updated workflow unit tests to stop expecting --enable-chroot and instead assert AWF usage.
  • Updated sandbox documentation to describe chroot mode as default starting in v0.15.0+.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pkg/workflow/copilot_engine_execution.go Stop emitting --enable-chroot; update AWF/chroot-related comments.
pkg/workflow/codex_engine.go Stop emitting --enable-chroot; update AWF/chroot-related comments.
pkg/workflow/claude_engine.go Stop emitting --enable-chroot; update AWF/chroot-related comments (one stale reference remains elsewhere).
pkg/workflow/firewall_args_test.go Update assertions to expect AWF invocation without --enable-chroot.
pkg/workflow/gh_cli_mount_test.go Update chroot-mode related expectations to reflect default behavior (no flag).
pkg/workflow/sandbox_mounts_test.go Update custom-mount tests to validate AWF invocation without --enable-chroot.
docs/src/content/docs/reference/sandbox.md Document chroot mode as default in AWF v0.15.0+.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +273 to 276
// Build AWF arguments: standard flags + custom args from config
// AWF v0.15.0+ uses chroot mode by default, providing transparent access to host binaries
// and environment while maintaining network isolation
var awfArgs []string
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

There’s still a comment later in this file that references --enable-chroot (around line ~357). Since this PR removes that flag for AWF v0.15.0+, please update that remaining comment to avoid misleading guidance (e.g., describe chroot mode as default and remove mention of --enable-chroot).

Copilot uses AI. Check for mistakes.
if !strings.Contains(stepContent, "sudo -E awf") {
t.Error("Expected AWF command for transparent host access")
}

Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

These tests no longer assert that --enable-chroot is absent from the generated AWF command. Since the goal of this PR is to stop emitting that flag, consider adding a negative assertion (e.g., fail if stepContent contains --enable-chroot) to prevent regressions where the flag gets reintroduced.

Suggested change
// Ensure we are not explicitly passing the chroot flag (chroot is the default)
if strings.Contains(stepContent, "--enable-chroot") {
t.Error("AWF command should not include '--enable-chroot' flag when chroot mode is the default")
}

Copilot uses AI. Check for mistakes.
pelikhan added a commit that referenced this pull request Feb 12, 2026
* v0.15.0

* [WIP] Fix emission of --enable-chroot for awf call (#15247)

* Initial plan

* Remove --enable-chroot flag for awf v0.15.0

AWF v0.15.0 makes chroot mode the default behavior, so the --enable-chroot flag is no longer needed. Updated all engine files (copilot, claude, codex) and corresponding tests to reflect this change.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

* recompile

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
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.

2 participants