-
Notifications
You must be signed in to change notification settings - Fork 32
feat: make agent-fix pipeline fully autonomous (end-to-end) #758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,15 +35,15 @@ tools: | |
| safe-outputs: | ||
| create-pull-request: | ||
| auto-merge: false | ||
| draft: true | ||
| draft: false | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MODERATE — Duplicate reviews on bot-created PRs (Flagged by: 3/3 reviewers) With Both workflows share the concurrency group Concrete scenario: Agent-fix creates PR #100 (non-draft) → Suggested fix: Add a bot-user guard to |
||
| preserve-branch-name: true | ||
| protected-files: fallback-to-issue | ||
| add-comment: | ||
| max: 3 | ||
| target: "*" | ||
| dispatch-workflow: | ||
| workflows: [polypilot-integration, verify-build] | ||
| max: 2 | ||
| workflows: [polypilot-integration, verify-build, review.agent] | ||
| max: 3 | ||
|
|
||
| timeout-minutes: 90 | ||
|
|
||
|
|
@@ -171,9 +171,9 @@ For each finding from the self-review: | |
|
|
||
| Repeat Steps 6-7 up to **3 times** (max 3 review rounds). | ||
|
|
||
| ## Step 8: Dispatch Integration Tests | ||
| ## Step 8: Dispatch Integration Tests and Review | ||
|
|
||
| After all fixes are committed, dispatch the integration test workflows. | ||
| After all fixes are committed, dispatch the integration test workflows AND the expert code review. | ||
|
|
||
| **Important:** Use the exact branch name from the PR. If you named your branch `fix/issue-N`, the safe-outputs job will use that name without modification (because `preserve-branch-name: true` is set). If you're unsure, use `get_pull_request` to read the PR and get the `headRefName` field. | ||
|
|
||
|
|
@@ -194,8 +194,17 @@ dispatch_workflow({ | |
| "scenario": "smoke" | ||
| } | ||
| }) | ||
|
|
||
| dispatch_workflow({ | ||
|
Comment on lines
+197
to
+198
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 MINOR — Review dispatched concurrently with build; may review stale code (Flagged by: 1/3 reviewers initially, confirmed 3/3 after follow-up) All three dispatches ( This is correctly a minor concern: the happy path (build passes) is unaffected, and adding sequencing would increase latency for every pipeline run. But it may be worth documenting as a known trade-off with a comment here. |
||
| "workflow": "review.agent", | ||
| "inputs": { | ||
| "pr_number": "<PR number>" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MODERATE — The placeholder An LLM following this template will likely substitute as Suggested fix: Remove the quotes to signal numeric intent: |
||
| } | ||
| }) | ||
| ``` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MODERATE — The prompt example passes The Suggested fix: Change the example to use an unquoted placeholder: or add a note: "Pass as an integer, not a string." |
||
|
|
||
| The review workflow runs a multi-model expert code review on the PR. This is dispatched via `workflow_dispatch` to bypass the approval gate that blocks `pull_request`-triggered workflows for bot-created PRs. | ||
|
|
||
| ## Step 9: Post Summary | ||
|
|
||
| Post an `add_comment` on issue #${{ github.event.issue.number || inputs.issue_number }} with: | ||
|
|
@@ -204,6 +213,7 @@ Post an `add_comment` on issue #${{ github.event.issue.number || inputs.issue_nu | |
| - Test results (unit tests passed/failed count) | ||
| - Review summary (findings found and fixed) | ||
| - Integration test dispatch status | ||
| - Expert review dispatch status | ||
| - **For visual changes:** note that screenshots are available in the integration test CI artifacts (link to the workflow run) | ||
|
|
||
| ## Rules | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 MODERATE — Duplicate review runs
With
draft: false, the PR is created as non-draft immediately. This fires thepull_request: [opened]event, which triggersreview-on-open.agent(it matchesopened+draft == false). Then in Step 8, agent-fix also explicitly dispatchesreview.agentviaworkflow_dispatch.Both workflows share the concurrency group
review-$\{\{ PR_NUMBER }}withcancel-in-progress: false, so they serialize rather than deduplicate — the second review queues behind the first and runs in full. This doubles compute cost (~90 min × 2) and produces two separate review comment threads on the same PR for the same diff.Mitigation options (pick one):
draft: trueand rely solely on the explicitreview.agentdispatch (original approach minus the approval-gate problem).draft: falsebut remove the explicitdispatch_workflowforreview.agentin Step 8, relying onreview-on-open.agentto auto-trigger.review-on-open.agentskips PRs created byagent-fix(e.g.,if: github.actor != 'copilot-agentic-workflow[bot]').