Conversation
|
❌ Agentic Changeset Generator failed and wasn't able to produce a result. |
There was a problem hiding this comment.
Pull request overview
This PR updates the AWF (Agent Workflow Framework) integration to version 0.2.0, which changes how commands are passed to the AWF wrapper and adds filesystem mount support for workspace access.
Key Changes
- Updated AWF command invocation to use
--separator between AWF arguments and the wrapped command (v0.2.0 syntax) - Removed
shellEscapeCommandString()wrapping since AWF v0.2.0 no longer requires the command as a single escaped string - Added
/tmp:/tmp:rwand${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:romount arguments to AWF - Added
${GITHUB_WORKSPACE}to Copilot CLI's--add-dirarguments to enable workspace file discovery
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
pkg/workflow/copilot_engine.go |
Updated AWF command generation: added mount arguments, added workspace to --add-dir, changed command separator to --, removed shellEscapeCommandString() wrapping, updated comments |
.github/workflows/weekly-issue-summary.lock.yml |
Generated workflow with updated AWF syntax: added mount arguments, added -- separator, removed escaped quotes, added workspace to --add-dir |
.github/workflows/test-assign-to-agent.lock.yml |
Added trailing comma to JavaScript object (cosmetic fix) |
.github/workflows/technical-doc-writer.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/smoke-copilot.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/research.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/release-highlights.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/python-data-charts.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/mcp-inspector.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/issue-monster.lock.yml |
Added trailing comma to JavaScript object (cosmetic fix) |
.github/workflows/glossary-maintainer.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/firewall.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/docs-noob-tester.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/daily-repo-chronicle.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/daily-news.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/copilot-pr-prompt-analysis.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/copilot-pr-nlp-analysis.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/cli-version-checker.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/cli-consistency-checker.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/changeset.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/artifacts-summary.lock.yml |
Generated workflow with updated AWF syntax |
.github/workflows/ai-triage-campaign.lock.yml |
Added trailing comma to JavaScript object (cosmetic fix) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // AWF v0.2.0 uses -- to separate AWF args from the actual command | ||
| // The command arguments should be passed as individual shell arguments, not as a single string |
There was a problem hiding this comment.
The comment states "The command arguments should be passed as individual shell arguments, not as a single string," but this is misleading. The command (copilotCommand) is still a single string constructed using shellJoinArgs() - it's not passed as individual arguments.
The key change is that AWF v0.2.0 uses -- as a separator, and the command no longer needs to be wrapped with shellEscapeCommandString() (which would have added extra quotes and escaping). The command is now passed directly after -- without the double-escaping that was needed before.
Consider revising the comment to be more accurate:
// Build the full AWF command with proper argument separation
// AWF v0.2.0 uses -- to separate AWF args from the command to execute
// The command is passed as a single shell-escaped string after the separator| // AWF v0.2.0 uses -- to separate AWF args from the actual command | |
| // The command arguments should be passed as individual shell arguments, not as a single string | |
| // AWF v0.2.0 uses -- to separate AWF args from the command to execute | |
| // The command is passed as a single shell-escaped string after the separator |
| awfArgs = append(awfArgs, "--mount", "/tmp:/tmp:rw") | ||
|
|
||
| // Always mount the workspace directory so Copilot CLI can access it | ||
| awfArgs = append(awfArgs, "--mount", "${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:ro") |
There was a problem hiding this comment.
The workspace mount argument will not work as intended. The value "${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:ro" will be wrapped in single quotes by shellEscapeArg() (line 40-46 in shell.go), resulting in:
--mount '${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:ro'In bash, single quotes prevent variable expansion, so AWF will receive the literal string ${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:ro instead of the actual workspace path like /home/runner/work/repo/repo:/home/runner/work/repo/repo:ro.
Solution: Use an environment variable reference that won't be quoted, or construct the mount path differently. For example:
// Use GitHub Actions expression syntax which will be substituted before shell execution
awfArgs = append(awfArgs, "--mount", "${{ github.workspace }}:${{ github.workspace }}:ro")Or if you need shell expansion:
// Build mount arg without triggering shellEscapeArg quoting
// by pre-quoting strategically or using a different approachThe same issue affects line 117 where --add-dir "${GITHUB_WORKSPACE}" is added to copilotArgs.
| awfArgs = append(awfArgs, "--mount", "${GITHUB_WORKSPACE}:${GITHUB_WORKSPACE}:ro") | |
| awfArgs = append(awfArgs, "--mount", "${{ github.workspace }}:${{ github.workspace }}:ro") |
|
|
||
| // Always add workspace directory to --add-dir so Copilot CLI can access it | ||
| // This allows Copilot CLI to discover agent files and access the workspace | ||
| copilotArgs = append(copilotArgs, "--add-dir", "${GITHUB_WORKSPACE}") |
There was a problem hiding this comment.
Same issue as with the mount argument on line 229. The --add-dir argument with "${GITHUB_WORKSPACE}" will be single-quoted by shellEscapeArg(), preventing shell variable expansion. Copilot CLI will receive the literal string ${GITHUB_WORKSPACE} instead of the actual workspace path.
Solution: Use GitHub Actions expression syntax instead:
copilotArgs = append(copilotArgs, "--add-dir", "${{ github.workspace }}")This way, GitHub Actions will substitute the workspace path before the shell command runs, and shellEscapeArg() will not quote it (since ${{ }} doesn't contain shell special characters).
| copilotArgs = append(copilotArgs, "--add-dir", "${GITHUB_WORKSPACE}") | |
| copilotArgs = append(copilotArgs, "--add-dir", "${{ github.workspace }}") |
|
❌ Agentic Changeset Generator failed and wasn't able to produce a result. |
fd7f0b5 to
1a006ee
Compare
|
✅ Agentic Changeset Generator completed successfully. |
1a006ee to
0462440
Compare
fixed the issue with the wrapping command in a string and the issue with not able to mount GITHUB_WORKSPACE Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
0462440 to
bf3d431
Compare
Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
* update awf to v0.2.0 fixed the issue with the wrapping command in a string and the issue with not able to mount GITHUB_WORKSPACE Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> * change default version of awf to v0.2.0 Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> * allow bash variable expansion Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> * mount the right path to the container Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> * bump copilot CLI version Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> --------- Signed-off-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com>
fixed the issue with the wrapping command in a string and the issue with not able to mount GITHUB_WORKSPACE (#4427)
Signed-off-by: Jiaxiao (mossaka) Zhou duibao55328@gmail.com