Add regression coverage for Copilot AWF chroot-home cleanup#42736
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix HTTP 400 bad request in Copilot PR Conversation NLP analysis
Add regression coverage for Copilot AWF chroot-home cleanup
Jul 1, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a regression test to ensure the Copilot CLI install script continues to perform AWF chroot-home cleanup, protecting Copilot CLI startup from EACCES failures caused by stale root-owned /tmp/awf-*-chroot-home directories created by prior AWF host-access runs.
Changes:
- Added a new
vitestsuite that assertsinstall_copilot_cli.shcontains (and orders) the ownership-fix and stale chroot-home cleanup steps. - Locked in the presence of the
sudo find /tmp ... -name 'awf-*-chroot-home' ... -exec rm -rfcleanup command.
Show a summary per file
| File | Description |
|---|---|
| actions/setup/js/chroot_home_cleanup.test.js | Adds regression coverage that inspects install_copilot_cli.sh for the AWF chroot-home cleanup sequence. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Low
Comment on lines
+145
to
+153
| const ownershipFixIndex = script.indexOf('sudo chown -R "$(id -u):$(id -g)" "$COPILOT_DIR"'); | ||
| const cleanupBannerIndex = script.indexOf('echo "Cleaning up stale AWF chroot home directories..."'); | ||
| const cleanupCommandIndex = script.indexOf( | ||
| "sudo find /tmp -maxdepth 1 -name 'awf-*-chroot-home' -type d -exec rm -rf -- {} + 2>/dev/null || true" | ||
| ); | ||
|
|
||
| expect(ownershipFixIndex).toBeGreaterThanOrEqual(0); | ||
| expect(cleanupBannerIndex).toBeGreaterThan(ownershipFixIndex); | ||
| expect(cleanupCommandIndex).toBeGreaterThan(cleanupBannerIndex); |
This was referenced Jul 1, 2026
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.
The Copilot PR Conversation NLP Analysis failure was caused by stale root-owned
/tmp/awf-*-chroot-homedirectories left behind by AWF host-access runs. When those directories persisted, Copilot CLI cleanup could fail withEACCES, surfacing as an engine-side HTTP 400 / unexpected termination.What changed
actions/setup/js/chroot_home_cleanup.test.js.actions/setup/sh/install_copilot_cli.sh, so future edits do not silently drop the stale-directory removal that protects Copilot startup.Why this matters
Coverage added
install_copilot_cli.shstill:"$COPILOT_DIR"sudo find /tmp ... -name 'awf-*-chroot-home' ... -exec rm -rf