Ensure inline sub-agents always trigger interpolation step generation#39651
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
⚠️ Not ready to approve
The new regression test does not currently validate the intended “GitHub context suppressed” scenario, so the key behavior change isn’t reliably covered.
Pull request overview
This PR updates the gh-aw workflow compiler to ensure the “Interpolate variables and render templates” activation step is emitted whenever inline sub-agent blocks are present, even when GitHub-context templating is otherwise suppressed, so interpolate_prompt.cjs runs and extracts inline sub-agents into the activation artifact.
Changes:
- Treat inline
## agent: \name`` markers as an explicit trigger for generating the interpolation/template step. - Add a regression test intended to cover the “GitHub context suppressed” + inline sub-agent scenario.
- Regenerate
pr-code-quality-reviewer.lock.ymlmetadata.
File summaries
| File | Description |
|---|---|
| pkg/workflow/template.go | Adds inline sub-agent detection to force interpolation/template step generation. |
| pkg/workflow/template_test.go | Adds a regression test for interpolation step generation with inline sub-agents. |
| .github/workflows/pr-code-quality-reviewer.lock.yml | Updates generated workflow lock metadata (frontmatter hash). |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 2
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot run pr-finisher skill |
…sed GitHub context Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done. Two fixes in the latest commit:
|
Workflows with inline
## agent:blocks could compile without theInterpolate variables and render templatesactivation step when GitHub-context templating was suppressed (for exampletools.github: false). That preventedinterpolate_prompt.cjsfrom running, so inline sub-agents were never extracted into the activation artifact.Compiler gating fix
pkg/workflow/template.goto treat inline sub-agent markers as an explicit trigger.## agent: \name``)Focused regression coverage
TestGenerateInterpolationAndTemplateStep_WithInlineSubAgentinpkg/workflow/template_test.go.tools.github: false) and asserts thatinterpolate_prompt.cjsis still included.