fix: ensure .copilot directory permissions before Copilot CLI install#547
fix: ensure .copilot directory permissions before Copilot CLI install#547
Conversation
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>
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
✅ Coverage Check PassedOverall Coverage
Coverage comparison generated by |
There was a problem hiding this comment.
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
.copilotdirectory before Copilot CLI installation - Apply the fix in both the
.mdsource file and the compiled.lock.ymlworkflow 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.
Deno Build Test Results
Overall: ✅ PASS All Deno tests passed successfully.
|
Smoke Test ResultsLast 2 merged PRs:
Tests:
Status: PASS 🎉 cc @Mossaka
|
Node.js Build Test Results
Overall: PASS ✅ All Node.js projects successfully installed dependencies and passed their test suites.
|
C++ Build Test Results
Overall: PASS ✅ All C++ projects built successfully.
|
Go Build Test Results
Overall: PASS ✅ All Go projects built and tested successfully.
|
Smoke Test Results: PASS ✅Last 2 Merged PRs:
Test Results:
Status: PASS
|
❌ Build Test: Java - FAILEDStatus: FAILED - Missing build tools IssueJava and Maven build tools are not accessible in the AWF container environment:
Test Status
Overall: FAILED Root CauseThe AWF agent container is running in chroot mode but lacks Java/Maven installations. Host binaries referenced by environment variables like ResolutionThe 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.
|
Build Test: Bun - FAILED ❌Error: Bun package manager is not compatible with the test environment. Test Results
Overall: FAIL Details
Error MessageThis is an environment compatibility issue, not a project configuration problem. The Bun runtime cannot execute package installation in this GitHub Actions environment. Recommended Actions
|
Chroot Version Comparison Test Results
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.
|
Build Test: Rust - Results
Overall: PASS All Rust projects built and tested successfully.
|
Summary
EACCES: permission denied, mkdir '/home/runner/.copilot/pkg'sudo -E awfwhich can create/home/runner/.copilotas root. The subsequent Copilot CLI install (running asrunneruser) then fails to create subdirectories.mkdir -p /home/runner/.copilot && sudo chown -R runner:runner /home/runner/.copilotbefore the Copilot CLI install step in both the.mdsource and.lock.ymlTest plan
🤖 Generated with Claude Code
/cc @copilot for review