Conversation
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
🔮 Oracle Smoke Ledger
Warning
|
There was a problem hiding this comment.
Pull request overview
Adds diagnosability and documentation around how AWF makes GitHub Actions setup-* installed tools available inside the chroot by merging $GITHUB_PATH into AWF_HOST_PATH.
Changes:
- Add debug-level logs when
$GITHUB_PATHis unset or unreadable inreadGitHubPathEntries(). - Document the
$GITHUB_PATH→AWF_HOST_PATH→ chrootPATHpipeline and troubleshooting steps indocs/environment.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/docker-manager.ts |
Adds debug logs for previously silent $GITHUB_PATH read/merge failure paths. |
docs/environment.md |
Documents setup-* tool availability inside chroot and adds debug troubleshooting guidance. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 2. AWF reads this file at startup and merges its entries (prepended, higher priority) into `AWF_HOST_PATH`. | ||
| 3. The chroot entrypoint exports `AWF_HOST_PATH` as `PATH` inside the chroot, so tools like `uv`, `node`, `python3`, `ruby`, etc. resolve correctly. | ||
|
|
||
| This behavior was introduced in **awf v0.60.0** and is active automatically — no extra flags are required. |
There was a problem hiding this comment.
This doc claims the behavior was introduced in awf v0.60.0, but the repo’s current package version is 0.23.1 (package.json). Unless there’s a separate versioning scheme for the released CLI, this looks incorrect/misleading—suggest removing the specific version or updating it to the correct AWF release version that introduced the feature.
| This behavior was introduced in **awf v0.60.0** and is active automatically — no extra flags are required. | |
| This behavior is active automatically — no extra flags are required. |
| **Troubleshooting:** Run AWF with `--log-level debug` to see whether `GITHUB_PATH` is set and how many entries were merged: | ||
|
|
||
| ``` | ||
| [DEBUG] Merged 3 path(s) from $GITHUB_PATH into AWF_HOST_PATH | ||
| ``` | ||
|
|
||
| If you see instead: | ||
|
|
||
| ``` | ||
| [DEBUG] GITHUB_PATH env var is not set; skipping $GITHUB_PATH file merge … | ||
| ``` | ||
|
|
||
| the runner did not set `GITHUB_PATH`, and the tool's bin directory must already be in `$PATH` at AWF launch time. |
There was a problem hiding this comment.
The troubleshooting snippet’s debug line (GITHUB_PATH env var is not set; skipping $GITHUB_PATH file merge …) doesn’t match the actual log message emitted in readGitHubPathEntries() (it includes the parenthetical sudo/PATH note and no ellipsis). To avoid confusing users, update the docs to match the exact emitted message(s) (including the unreadable-file case).
| } catch { | ||
| // File doesn't exist or isn't readable — expected outside GitHub Actions | ||
| logger.debug(`GITHUB_PATH file at '${githubPathFile}' could not be read; skipping file merge`); |
There was a problem hiding this comment.
In the unreadable-file path, the catch block discards the underlying error (e.g., ENOENT vs EACCES). Since the goal here is diagnosability, consider capturing the error (catch (error)) and including it in the debug log (as a second arg) so users can tell why the file couldn't be read.
| } catch { | |
| // File doesn't exist or isn't readable — expected outside GitHub Actions | |
| logger.debug(`GITHUB_PATH file at '${githubPathFile}' could not be read; skipping file merge`); | |
| } catch (error) { | |
| // File doesn't exist or isn't readable — expected outside GitHub Actions | |
| logger.debug(`GITHUB_PATH file at '${githubPathFile}' could not be read; skipping file merge`, error); |
readGitHubPathEntries()silently returned[]whenGITHUB_PATHwas unset or unreadable, making it impossible to diagnose why tools installed bysetup-*actions (e.g.astral-sh/setup-uv) resolved ascommand not foundinside the AWF chroot.Changes
src/docker-manager.ts—readGitHubPathEntries(): emitdebug-level log messages for the two previously silent failure paths:GITHUB_PATHenv var not set (includes a note that sudo PATH reset may be the cause)GITHUB_PATHfile path set but unreadable (logs the attempted path)With
--log-level debugyou now see one of:docs/environment.md— New "GitHub Actionssetup-*Tool Availability" section documenting:GITHUB_PATHis absent (relies onprocess.env.PATHwhich sudo may have reset)--log-level debugtroubleshooting guidance with expected log output✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.