Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ Test method names are converted to lowercase snake_case for snapshot filenames t
- **DO NOT** modify test snapshots in `target/copilot-sdk/test/snapshots/` - these come from reference implementation
- **DO NOT** alter the Eclipse formatter configuration in `pom.xml` without team consensus
- **DO NOT** remove or skip Checkstyle or Spotless checks
- **YOU MUST ALWAYS** run `gh aw compile <workflow-name>` after editing any `.github/workflows/*.md` agentic workflow source file to regenerate the corresponding `.lock.yml`. The lock file contains a content hash of the frontmatter — any edit to the `.md` without recompiling will cause the workflow to fail at runtime with a "lock file out of sync" error.
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This new rule claims that any edit to an agentic workflow .md without recompiling will cause a runtime "lock file out of sync" error, but the generated lock files themselves state that "Not all edits will cause changes to this file" and the metadata records only a frontmatter_hash. Please narrow/reword this guidance to reflect what actually triggers out-of-sync (e.g., frontmatter/tooling changes) so we don’t encode incorrect instructions for future contributors.

Suggested change
- **YOU MUST ALWAYS** run `gh aw compile <workflow-name>` after editing any `.github/workflows/*.md` agentic workflow source file to regenerate the corresponding `.lock.yml`. The lock file contains a content hash of the frontmatter — any edit to the `.md` without recompiling will cause the workflow to fail at runtime with a "lock file out of sync" error.
- When editing a `.github/workflows/*.md` agentic workflow source file, run `gh aw compile <workflow-name>` if the change affects the compiled workflow or lock-file inputs (for example, frontmatter, tooling, or other compilation-relevant metadata) so the corresponding `.lock.yml` stays in sync. Not every markdown edit changes the lock file, so avoid claiming that any `.md` edit without recompiling will always fail at runtime.

Copilot uses AI. Check for mistakes.
- **DO NOT** edit `.github/workflows/*.lock.yml` directly — these are auto-generated by `gh aw compile` from the `.md` source files.

### Security Guidelines

Expand Down
35 changes: 17 additions & 18 deletions .github/workflows/codegen-agentic-fix.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions .github/workflows/codegen-agentic-fix.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ tools:
toolsets: [context, repos]

safe-outputs:
push_to_pull_request_branch:
max: 3
add_comment:
push-to-pull-request-branch:
add-comment:
target: "*"
max: 5
noop:
Expand Down Expand Up @@ -204,7 +203,7 @@ For each attempt:

### Step 5: Push fixes

After `mvn verify` passes, commit all changes and use the `push_to_pull_request_branch` safe-output tool to push to PR #${{ inputs.pr_number }}:
After `mvn verify` passes, commit all changes and use the `push-to-pull-request-branch` safe-output tool to push to PR #${{ inputs.pr_number }}:
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow prompt lists the safe-output tool as push_to_pull_request_branch (snake_case), but these instructions tell the agent to use push-to-pull-request-branch (kebab-case). That mismatch will likely cause the agent to attempt a non-existent tool call at runtime. Update the text here (and the follow-up sentence below) to reference the actual tool name exposed in the prompt.

This issue also appears on line 215 of the same file.

Copilot uses AI. Check for mistakes.

```bash
git add -A
Expand All @@ -213,13 +212,13 @@ git commit -m "Fix codegen and build failures after @github/copilot update
Automated fix applied by codegen-agentic-fix workflow."
```

Then call the `push_to_pull_request_branch` tool to push your commits to the PR branch.
Then call the `push-to-pull-request-branch` tool to push your commits to the PR branch.

### Step 6: Failure handling

If all 3 attempts fail:

1. Call the `add_comment` tool on PR #${{ inputs.pr_number }} explaining:
1. Call the `add-comment` tool on PR #${{ inputs.pr_number }} explaining:
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compiled safe-output tool name is add_comment (snake_case), but this instruction says add-comment (kebab-case). This will confuse the agent and can lead to an invalid tool invocation. Update the prompt text to use the tool name shown in the prompt's safe-output tools list.

Suggested change
1. Call the `add-comment` tool on PR #${{ inputs.pr_number }} explaining:
1. Call the `add_comment` tool on PR #${{ inputs.pr_number }} explaining:

Copilot uses AI. Check for mistakes.
- What errors remain
- What fixes were attempted
- Whether the issue is in the code generator or handwritten code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install gh-aw extension
uses: github/gh-aw/actions/setup-cli@ce1794953e0ec42adc41b6fca05e02ab49ee21c3 # v0.68.3
with:
version: v0.42.17
version: v0.68.3

# Setup Node.js
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
Expand Down
Loading