Skip to content

fix: ensure .copilot directory permissions before Copilot CLI install#547

Merged
Mossaka merged 1 commit intomainfrom
fix/smoke-chroot-copilot-permissions
Feb 6, 2026
Merged

fix: ensure .copilot directory permissions before Copilot CLI install#547
Mossaka merged 1 commit intomainfrom
fix/smoke-chroot-copilot-permissions

Conversation

@Mossaka
Copy link
Collaborator

@Mossaka Mossaka commented Feb 6, 2026

Summary

  • Smoke Chroot workflow has been failing since the revert: remove Squid intercept mode and all cascading fixes #541 revert with EACCES: permission denied, mkdir '/home/runner/.copilot/pkg'
  • The chroot version tests run with sudo -E awf which can create /home/runner/.copilot as root. The subsequent Copilot CLI install (running as runner user) then fails to create subdirectories.
  • Add mkdir -p /home/runner/.copilot && sudo chown -R runner:runner /home/runner/.copilot before the Copilot CLI install step in both the .md source and .lock.yml

Test plan

  • Smoke Chroot CI passes on this PR (the Copilot CLI install step should succeed)
  • All other CI checks pass (build, lint, tests unaffected)

🤖 Generated with Claude Code

/cc @copilot for review

The Copilot CLI verification step tries to create
/home/runner/.copilot/pkg/ which fails with EACCES if the directory
was previously created with root ownership (e.g., by sudo -E awf
during chroot version tests).

Add a step to create .copilot with correct runner ownership before
the Copilot CLI install in both the .md source and lock file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 6, 2026 01:31
@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 82.11% 82.11% ➡️ +0.00%
Statements 82.15% 82.15% ➡️ +0.00%
Functions 81.95% 81.95% ➡️ +0.00%
Branches 75.44% 75.44% ➡️ +0.00%

Coverage comparison generated by scripts/ci/compare-coverage.ts

Copy link

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 PR fixes a permission issue in the Smoke Chroot workflow that arose after the revert in #541. The issue occurs when sudo -E awf --enable-chroot creates /home/runner/.copilot as root, causing the subsequent Copilot CLI installation (running as the runner user) to fail with EACCES: permission denied when trying to create subdirectories.

Changes:

  • Add a step to ensure proper ownership of the .copilot directory before Copilot CLI installation
  • Apply the fix in both the .md source file and the compiled .lock.yml workflow file

Reviewed changes

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

File Description
.github/workflows/smoke-chroot.md Add permission fix step in setup job before agent job begins
.github/workflows/smoke-chroot.lock.yml Add permission fix step in agent job before Copilot CLI install, and in detection job before Copilot CLI install

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Deno Build Test Results

Project Tests Status
oak 1/1 ✅ PASS
std 1/1 ✅ PASS

Overall: ✅ PASS

All Deno tests passed successfully.

AI generated by Build Test Deno

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Smoke Test Results

Last 2 merged PRs:

Tests:

  • ✅ GitHub MCP: Retrieved PRs successfully
  • ✅ Playwright: GitHub page title verified
  • ✅ File Write: Created /tmp/gh-aw/agent/smoke-test-copilot-21735300031.txt
  • ✅ Bash Tool: File read confirmed

Status: PASS 🎉

cc @Mossaka @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Node.js Build Test Results

Project Install Tests Status
clsx PASS PASS
execa PASS PASS
p-limit PASS PASS

Overall: PASS

All Node.js projects successfully installed dependencies and passed their test suites.

AI generated by Build Test Node.js

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

C++ Build Test Results

Project CMake Build Status
fmt PASS
json PASS

Overall: PASS

All C++ projects built successfully.

AI generated by Build Test C++

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Go Build Test Results

Project Download Tests Status
color 1/1 PASS
env 1/1 PASS
uuid 1/1 PASS

Overall: PASS

All Go projects built and tested successfully.

AI generated by Build Test Go

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Smoke Test Results: PASS ✅

Last 2 Merged PRs:

Test Results:

  • ✅ GitHub MCP: Retrieved recent PRs
  • ✅ Playwright: Navigated to github.com, title verified
  • ✅ File Write: Created test file successfully
  • ✅ Bash Tool: Verified file content

Status: PASS

AI generated by Smoke Claude

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

❌ Build Test: Java - FAILED

Status: FAILED - Missing build tools

Issue

Java and Maven build tools are not accessible in the AWF container environment:

  • Java binaries from host ($JAVA_HOME) cannot execute in chroot mode
  • Maven fails with: cannot execute binary file: Exec format error
  • No Java/Maven packages installed in container itself

Test Status

Project Compile Tests Status
gson ⏸️ N/A NOT RUN
caffeine ⏸️ N/A NOT RUN

Overall: FAILED

Root Cause

The AWF agent container is running in chroot mode but lacks Java/Maven installations. Host binaries referenced by environment variables like $JAVA_HOME cannot be executed due to library/interpreter mismatches in the containerized environment.

Resolution

The AWF agent container needs to have Java (OpenJDK 11+) and Maven pre-installed to run Java build tests. Alternative: Run build tests outside the AWF container if build tools are only needed on the host.

AI generated by Build Test Java

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Build Test: Bun - FAILED ❌

Error: Bun package manager is not compatible with the test environment.

Test Results

Project Install Tests Status
elysia N/A FAILED
hono N/A FAILED

Overall: FAIL

Details

  • ✅ Bun installed successfully (v1.3.8)
  • ✅ Repository cloned successfully
  • bun install fails with "NotDir" error in all directories
  • ❌ Issue affects test projects, fresh projects, and allowed directories

Error Message

error: An internal error occurred (NotDir)

This is an environment compatibility issue, not a project configuration problem. The Bun runtime cannot execute package installation in this GitHub Actions environment.

Recommended Actions

  1. Use official oven-sh/setup-bun action instead of curl installer
  2. Verify system requirements (kernel version, glibc compatibility)
  3. Consider testing with Docker-based Bun runtime

AI generated by Build Test Bun

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Chroot Version Comparison Test Results

Runtime Host Version Chroot Version Match?
Python Python 3.12.12 Python 3.12.3 ❌ NO
Node.js v24.13.0 v20.20.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall Result: ❌ FAILED - Not all runtime versions match between host and chroot environment.

The chroot mode successfully accessed host binaries for Go, but Python and Node.js versions differ between the host and chroot container.

AI generated by Smoke Chroot

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2026

Build Test: Rust - Results

Project Build Tests Status
fd 1/1 PASS
zoxide 1/1 PASS

Overall: PASS

All Rust projects built and tested successfully.

AI generated by Build Test Rust

@Mossaka Mossaka merged commit ac4e638 into main Feb 6, 2026
84 checks passed
@Mossaka Mossaka deleted the fix/smoke-chroot-copilot-permissions branch February 6, 2026 06:38
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.

1 participant