[AGR] Implement autonomous issue-to-PR pipeline for agent-candidate bugs
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 306
Description
# Implement autonomous issue-to-PR pipeline for agent-candidate bugs
> **Status as of 2026-06-02:** This remains the Pillar 2 issue under #32454. The core invariant is unchanged: do not open an agent-authored PR unless a failing pre-fix reproduction has been confirmed. The surrounding dependencies are now clearer: triage readiness comes from #35051, CI truth comes from #35052, PR review comes from #35048, and release readiness consumes the result through #35711.
## Problem
The current agent workflow is still mostly PR-first: review an existing PR, classify its tests/CI, try alternative fixes, and report. The higher-leverage path is issue-first:
```text
verified issue -> generated/selected failing test -> fix -> validation -> PR with evidence
```
Without a standardized issue-to-PR workflow, agent PRs can arrive without tests, without confirmed reproduction, or without enough evidence for maintainers to trust them.
## Workflow target
```text
Issue with actionable triage signal
|
v
1. Pre-flight
- read issue/comments
- identify affected platforms and area
- find related issues/PRs (#34196)
- determine expected test type
|
v
2. Test generation or selection
- use write-tests-agent / verify-tests-fail-without-fix
- prefer unit/XAML tests when possible; UI/device tests only when needed
|
v
3. Reproduction gate - HARD STOP
- test must fail without the fix
- no PR is opened if this gate cannot be proven
|
v
4. Fix implementation
- use try-fix or equivalent single/limited attempts
- preserve platform-specific conventions and hot-path guidance
|
v
5. Fix gate
- generated/selected test passes with fix
- relevant existing tests pass where feasible
|
v
6. CI/review handoff
- CI truth from #35052
- PR review pipeline from #35048
- metrics/state tracking in #34604
|
v
7. PR creation
- structured title/description
- test evidence
- reproduction-gate evidence
- validation evidence
```
## Hard invariants
- No PR without a confirmed failing pre-fix reproduction.
- Do not treat "tests pass after the fix" as proof that the test caught the bug.
- Do not use CI check summaries alone to decide readiness; consume structured CI evidence from #35052.
- Do not apply `s/agent-ready` here; that gate belongs to #35051.
- Do not use raw `s/agent-*` labels as success metrics; #34604 owns label semantics and time-in-state.
- Do not broaden autonomous fixing until the CI/review/release-readiness evidence chain is trustworthy.
## Dependencies
| Item | Why it matters |
|------|----------------|
| #35051 | Provides actionable triage and eventual `s/agent-ready` signal. |
| #32463 | Android direct-to-test launch remains a prerequisite for reliable Android issue-fixing automation. |
| #34196 | Related issue/PR discovery should be a reusable pre-flight step. |
| #34195 | Platform-split detection should become a pre-flight/review guardrail. |
| #35052 | Provides structured CI truth and failure classification. |
| #35048 | Reviews PR output, reruns tests, and performs code/expert review. |
| #34604 | Tracks lifecycle, gate outcomes, and effectiveness metrics. |
| #34814 | Provides eval lifecycle for critical skills and workflows. |
| #35711 | Downstream release-readiness consumer once PRs affect release trains. |
## Acceptance criteria
- [ ] A `Resolve-Issue.ps1` script or equivalent workflow exists and drives the full issue-to-PR flow.
- [ ] The workflow accepts an issue number and gathers trusted issue, label, milestone, and comment context.
- [ ] The workflow refuses to proceed when the issue is blocked by `s/needs-info`, `s/needs-repro`, or equivalent signals.
- [ ] Related issues/PRs are discovered and summarized before fix work begins.
- [ ] The workflow writes or selects an appropriate test type.
- [ ] The reproduction gate proves the test fails without the fix.
- [ ] The workflow hard-stops and opens no PR if the reproduction gate fails.
- [ ] The fix gate proves the test passes with the fix.
- [ ] Relevant regression/stage-2 tests are run where feasible.
- [ ] Created PRs include structured reproduction, fix, and validation evidence.
- [ ] Created PRs hand off cleanly to #35048 and #35052.
- [ ] Gate outcomes and time-in-state are tracked for #34604.
## Related
- Parent epic: #32454
- Triage/readiness: #35051
- PR review: #35048
- CI truth: #35052
- Metrics: #34604
- Release readiness: #35711
Contributor guide
Assessment
This issue has not been assessed yet.