Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Feb 3, 2026

  • Analyze the codebase to understand AWF command generation
  • Identify the files to modify (copilot_engine_execution.go, claude_engine.go, codex_engine.go)
  • Add --enable-chroot flag to AWF invocations for Copilot engine
  • Remove unnecessary --mount flags for host binaries (Copilot engine)
  • Remove mirrored environment variable flags (Copilot engine)
  • Update tests in firewall_args_test.go and sandbox_mounts_test.go
  • Rewrite gh_cli_mount_test.go to test chroot mode instead of individual mounts
  • Apply same changes to Claude engine (claude_engine.go)
  • Apply same changes to Codex engine (codex_engine.go)
  • Recompile all workflow files
  • Run linting and formatting
  • Run code review (passed)
  • Run security scan (no alerts)
  • Fix test failures:
    • Update DefaultFirewallVersion test to expect v0.13.2
    • Update custom_checkout test to match main branch behavior
    • Remove --env-all from copilot engine (chroot mode inherits env)
Original prompt

This section details on the original issue you should resolve

<issue_title>Use AWF --enable-chroot mode and remove unnecessary --mount and --env flags</issue_title>
<issue_description>## Summary

Adopt the new --enable-chroot feature from AWF v0.13.1 to simplify the generated workflow commands by removing unnecessary --mount and --env flags.

Background

AWF v0.13.1 introduced --enable-chroot mode which provides transparent access to host binaries (Python, Node.js, Go, etc.) while maintaining network isolation. This eliminates the need for explicit volume mounts and environment variable passthrough since the chroot environment has direct access to the host filesystem.

Blocked By

Changes Required

  1. Add --enable-chroot flag to AWF invocations in the workflow generator
  2. Remove unnecessary --mount flags that were previously needed to expose host binaries/paths
  3. Remove unnecessary --env flags that were previously needed to pass environment variables (chroot inherits host environment)

Benefits

  • Simpler generated workflow commands
  • Reduced configuration complexity
  • Better compatibility with host tools and environments
  • Cleaner workflow YAML output

Documentation

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Changeset

  • Type: patch
  • Description: Switch the firewall AWF wrapper to the v0.13.1+ --enable-chroot mode so agent runs inherit the host binaries and environment without manually mounting each tool.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator


Changeset

  • Type: patch
  • Description: Simplify AWF chroot PATH handling so AWF_HOST_PATH carries the toolchain and only Go's GOROOT is captured while tests ensure --env-all is passed to AWF to even receive the host vars.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

…lags

- Add --enable-chroot flag to AWF invocations for transparent host access
- Remove unnecessary --mount flags for host binaries (replaced by chroot mode)
- Remove --env-all and mirrored environment variable flags (inherited by chroot)
- Remove tool bins setup command (not needed with chroot mode)
- Update tests to verify new chroot mode behavior
- Recompile all workflow files with simplified AWF commands

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Use AWF --enable-chroot mode and remove unnecessary flags Use AWF --enable-chroot mode and remove unnecessary --mount and --env flags Feb 3, 2026
Copilot AI requested a review from Mossaka February 3, 2026 20:34
@Mossaka Mossaka marked this pull request as ready for review February 3, 2026 20:39
@Mossaka Mossaka requested review from Copilot and removed request for Copilot February 3, 2026 20:39
Mossaka and others added 2 commits February 3, 2026 20:40
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Mossaka Mossaka added the smoke label Feb 3, 2026
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

This pull request adopts AWF v0.13.1's new --enable-chroot feature to significantly simplify workflow commands by eliminating unnecessary mount and environment variable flags. The chroot mode provides transparent access to host binaries and environment while maintaining network isolation.

Changes:

  • Added --enable-chroot flag to AWF invocations, enabling transparent host filesystem access
  • Removed 17+ individual binary mounts (cat, curl, gh, jq, yq, etc.) and system directory mounts that are now unnecessary
  • Removed --env-all and individual --env flags since chroot inherits the host environment
  • Updated tests to verify chroot mode behavior instead of checking for individual mounts

Reviewed changes

Copilot reviewed 139 out of 139 changed files in this pull request and generated no comments.

File Description
pkg/workflow/sandbox_mounts_test.go Updated tests to verify --enable-chroot flag presence instead of checking for standard mounts
pkg/workflow/firewall_args_test.go Updated tests to verify chroot mode and confirm individual binary mounts are no longer used
.github/workflows/*.lock.yml (100+ files) All compiled workflow files updated with simplified AWF commands using --enable-chroot instead of explicit mount/env flags

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

📰 DEVELOPING STORY: Smoke Copilot reports failed. Our correspondents are investigating the incident...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

PR titles:
fix: update test expectation after removing campaign terminology
Ensure checkout step is always first when importing copilot-setup-steps.yml and remove redundant .github checkout
Tests: MCP✅ | GH CLI✅ | Serena✅ | Playwright❌ | Tavily✅
Tests: File✅ | Bash✅ | Discussion✅ | Build✅
Overall: FAIL

AI generated by Smoke Codex

@Mossaka
Copy link
Collaborator

Mossaka commented Feb 3, 2026

@copilot This PR only adds --enable-chroot to the Copilot engine (copilot_engine_execution.go), but the Claude and Codex engines still use the old verbose approach with --env-all and individual --mount flags.

Please also update:

  • pkg/workflow/claude_engine.go
  • pkg/workflow/codex_engine.go

to use --enable-chroot mode and remove the unnecessary mount/env flags for consistency across all engines.

Bumps gh-aw-firewall from v0.13.1 to v0.13.2 which includes
the fix for --enable-chroot with preset agent images (PR #459).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Mossaka Mossaka added smoke and removed smoke labels Feb 3, 2026
@Mossaka Mossaka added smoke and removed smoke labels Feb 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.52.0
jq 1.7
yq 4.50.1
curl 8.5.0
gh 2.86.0
node 24.13.0
python3 3.13.11
go 1.24.12
java ⚠️ Present but cannot execute (shell environment issue)
dotnet ⚠️ Present but cannot execute (shell environment issue)

Result: 10/12 tools fully functional ✅

Note: Java and .NET binaries are present on the filesystem at expected paths but cannot be executed due to a shell environment issue. This appears to be a runtime configuration problem rather than missing tools. The core development tools (bash, git, node, python, go) and utilities (jq, yq, curl, gh) are all working correctly.

AI generated by Agent Container Smoke Test

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Smoke Test Results

PRs tested: #13614, #13613

Test Result
GitHub MCP
Safe Inputs GH CLI
Serena MCP
Playwright
File Writing
Bash Tool
Discussion
Build
Haiku Dispatch

Status: ⚠️ PARTIAL PASS (Playwright tools unavailable)

@Mossaka @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🔍 PR Triage Results

Category: feature | Risk: high | Priority: 75/100

Scores Breakdown

  • Impact: 40/50 - Major feature implementing AWF chroot mode across all engines (Copilot, Claude, Codex); simplifies workflow generation; 839 additions, 1166 deletions across 161 files; affects core engine execution; fixes issue Use AWF --enable-chroot mode and remove unnecessary --mount and --env flags #13379
  • Urgency: 20/30 - Created 4.3 hours ago; not draft (ready for review); 102 comments indicating active engagement; 25 commits showing iterative improvements; CI blocked status; assigned to Mossaka for review
  • Quality: 15/20 - CI blocked (mergeable_state: blocked); comprehensive PR description with full checklist; large changeset but well-documented; active review process (102 comments); includes tests; fixes reported issue

📋 Recommended Action: fast_track

This is a critical infrastructure change that simplifies the AWF integration and affects all engines. The PR has been actively worked on with 25 commits and 102 comments. Despite CI being blocked, the quality of work (comprehensive checklist, test coverage, issue fix) and importance warrant fast-track review once CI passes. The PR addresses a fundamental improvement in how workflows are generated.


Triaged by PR Triage Agent on 2026-02-04T00:35:56Z

AI generated by PR Triage Agent

Mossaka and others added 2 commits February 4, 2026 00:58
…handling

AWF with --enable-chroot and --env-all already handles PATH correctly:
1. Captures host PATH → AWF_HOST_PATH (correct ordering from actions/setup-*)
2. Passes ALL host env vars including JAVA_HOME, DOTNET_ROOT, GOROOT
3. entrypoint.sh exports PATH="${AWF_HOST_PATH}" and tool-specific vars
4. Container inherits complete, correctly-ordered environment

Changes:
- copilot_engine_execution.go: Remove GetToolBinsSetup, GetHostedToolcachePathSetup,
  and /bin/bash -c wrapper - pass command directly via shellEscapeArg
- claude_engine.go: Remove PATH setup from both firewall and non-firewall modes,
  keep bash wrapper only for && chains
- codex_engine.go: Remove PATH setup, keep INSTRUCTION reading inside container
  to avoid Docker Compose interpolation issues

This simplifies the generated workflows by ~150 lines across all lock files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
AWF's native PATH handling (AWF_HOST_PATH) doesn't include npm global bin
directories. Claude and Codex are installed via `npm install -g` which puts
binaries in hostedtoolcache node bin directory.

Added GetNpmBinPathSetup() helper that adds hostedtoolcache bin directories
to PATH. This is simpler than the previous GetHostedToolcachePathSetup()
because it doesn't include GH_AW_TOOL_BINS - AWF already handles tool-specific
paths (GOROOT, JAVA_HOME, etc.) natively.

Copilot doesn't need this because it uses an absolute path (/usr/local/bin/copilot).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Agent Container Tool Check ✅

All required development tools are available in the agent container:

Tool Status Version
bash 5.2.21
sh available
git 2.52.0
jq 1.7
yq 4.50.1
curl 8.5.0
gh 2.86.0
node 20.20.0
python3 3.12.3
go 1.24.12
java 21.0.10
dotnet available

Result: 12/12 tools available ✅

Status: PASS - All required tools are accessible in the container environment.

AI generated by Agent Container Smoke Test

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

Smoke Test Results

  • GitHub MCP: ✅
  • Safe Inputs GH CLI: ✅
  • Serena MCP: ✅
  • Playwright: ✅
  • File/Bash: ✅
  • Discussion: ✅
  • Build: ❌ (Go 1.24.12 < required 1.25.0)
  • Workflow Dispatch: ✅

Overall: ⚠️ PARTIAL PASS (8/9)

cc @Mossaka @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2026

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

Mossaka and others added 2 commits February 4, 2026 05:12
AWF v0.13.4 fixes an issue where the Go version from actions/setup-go
was not being found in chroot mode. The entrypoint now prepends
$GOROOT/bin to PATH when AWF_GOROOT is provided, ensuring the correct
Go version is used.

This fixes the smoke-copilot test failure:
"Build: ❌ (Go 1.24.12 < required 1.25.0)"

Also updates the constants_test.go expectation from v0.13.1 to v0.13.4.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use AWF --enable-chroot mode and remove unnecessary --mount and --env flags

2 participants