Fix failing "Integration: Workflow Misc Part 2" tests#31860
Merged
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job Integration: Workflow Misc Part 2
Fix failing "Integration: Workflow Misc Part 2" tests
May 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes failing pkg/workflow integration tests by updating test fixtures/assertions to reflect recent schema validation and GitHub-context template changes.
Changes:
- Removed invalid top-level
command:from workflow frontmatter fixtures inlocal_action_permissions_test.go. - Updated integration-test assertions to expect compound fallback conditionals in the built-in GitHub context prompt (ADR-31820 behavior).
- Minor formatting change in
.github/workflows/agentic_commands.yml(blank line).
Show a summary per file
| File | Description |
|---|---|
| pkg/workflow/template_expression_integration_test.go | Updates assertions to match new GitHub context conditional format (compound fallback expressions) and adjusts related test commentary. |
| pkg/workflow/local_action_permissions_test.go | Removes invalid top-level command: from frontmatter test data to satisfy stricter schema validation. |
| .github/workflows/agentic_commands.yml | Adds a blank line between permissions and steps (formatting only). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 1
Comment on lines
179
to
181
| // After compilation, GitHub expressions are extracted and replaced with placeholders | ||
| // for security. The original ${{ ... }} expressions are not preserved in the compiled output. | ||
| // Instead, we verify that: |
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.
Bug Fix
Two categories of test failures in
pkg/workflow/caused by production code changes that weren't reflected in tests.What was the bug?
1. Invalid top-level
command:in test frontmatter —local_action_permissions_test.gousedcommand: /fixat the top level of workflow YAML frontmatter. Schema validation now correctly rejects unknown top-level fields (commandbelongs underon:). Since the field was never actually parsed from the top level, it was always a no-op — thepre_activationjob was already created by theissues: {types: [opened]}unsafe event trigger.2. Stale template expression assertions — Three tests in
template_expression_integration_test.goexpected env-var placeholder conditions like{{#if __GH_AW_GITHUB_EVENT_ISSUE_NUMBER__ }}. Per ADR-31820,github_context_prompt.mdwas updated to use compound fallback expressions with bare (non-${{ }}-wrapped) conditions, soExtractExpressionsno longer replaces them with placeholders.How did you fix it?
local_action_permissions_test.go: Removed the invalid top-levelcommand: /fixfrom two test frontmatter strings.template_expression_integration_test.go: Updated assertions in three tests to match the compound expression format now emitted:Testing
All 5 previously failing tests pass. Full
pkg/workflowintegration test suite passes with no regressions.