You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copilot CI: Structured phase outputs, autonomous execution, iOS support, and CI pipeline (dotnet#34040)
<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!
### Description of Change
Major overhaul of the Copilot CI PR reviewer agent infrastructure with
five key areas:
**1. Structured Phase Output Artifacts**
- Replace monolithic state file (`pr-XXXXX.md`) with per-phase
`content.md` files under
`CustomAgentLogsTmp/PRState/{PRNumber}/PRAgent/{phase}/content.md`
- `post-ai-summary-comment.ps1` now auto-loads from phase directories
instead of a single state file
- Removed `-Content` and `-StateFile` parameters; script always
auto-discovers phase files
- Updated all comment scripts to use new `PRAgent/` subdirectory paths
**2. Autonomous (Non-Interactive) Execution**
- Agent no longer stops and asks user on environment blockers — retries
once, then skips and continues
- Removed all "STOP and ask user" guidance from agent docs (`pr.md`,
`SHARED-RULES.md`, `post-gate.md`, `PLAN-TEMPLATE.md`)
- Added "AUTONOMOUS EXECUTION" section to `Review-PR.ps1` prompt
- `verify-tests-fail.ps1` now errors if `-PRNumber` is not provided (no
"unknown" fallback)
**3. iOS Platform Support for CI Pipeline**
- Added `Platform` parameter to `ci-copilot.yml` (android/ios)
- Skip Android SDK/JDK/emulator provisioning when Platform=ios
- Added iOS simulator boot step with DEVICE_UDID propagation
- Install both Appium drivers (uiautomator2 + xcuitest)
**4. CI Pipeline & Test Infrastructure**
- New `eng/pipelines/ci-copilot.yml` pipeline definition (682 lines)
- `BuildAndRunHostApp.ps1`: Set `APPIUM_LOG_FILE` env var, collect test
screenshots/page source artifacts
- `provision.yml`: Changed defaults for copilot CI builds
- Deleted 4 archived `.github/agent-pr-session/` files
**5. Documentation & Cleanup**
- Removed all references to "state file" from agent docs, skills, and
scripts
- Updated `learn-from-pr`, `try-fix` skills to remove state file
references
- Fixed stdin hang and validation improvements in comment scripts
### Issues Fixed
Infrastructure improvements — no specific issue number.
### ⚠️ Review Notes
**`provision.yml` and `variables.yml` changes affect shared CI
infrastructure** — these files are used by all pipelines, not just
copilot CI. The changes should be carefully reviewed to ensure they do
not break `maui-pr`, `dotnet-maui`, or other existing pipelines.
description: Sequential 4-phase workflow for GitHub issues - Pre-Flight, Gate, Fix, Report. Phases MUST complete in order. State tracked in CustomAgentLogsTmp/PRState/
3
+
description: Sequential 4-phase workflow for GitHub issues - Pre-Flight, Gate, Fix, Report. Phases MUST complete in order.
4
4
---
5
5
6
6
# .NET MAUI Pull Request Agent
@@ -48,13 +48,13 @@ After Gate passes, read `.github/agents/pr/post-gate.md` for **Phases 3-4**.
48
48
- Follow Templates EXACTLY (no `open` attributes, no "improvements")
49
49
- No Direct Git Commands (use `gh pr diff/view`, let scripts handle files)
50
50
- Use Skills' Scripts (don't bypass with manual commands)
51
-
- Stop on Environment Blockers (strict retry limits, report and ask user)
51
+
- Stop on Environment Blockers (retry once, then skip and continue autonomously)
52
52
- Multi-Model Configuration (5 models for Phase 4)
53
53
- Platform Selection (must be affected AND available on host)
54
54
55
55
**Key points:**
56
56
- ❌ Never run `git checkout`, `git switch`, `git stash`, `git reset` - agent is always on correct branch
57
-
- ❌ Never continue after environment blocker - STOP and ask user
57
+
- ❌ Never stop and ask user - use best judgment to skip blocked phases and continue
58
58
- ❌ Never mark phase ✅ with [PENDING] fields remaining
59
59
60
60
Phase 3 uses a 5-model exploration workflow. See `post-gate.md` for detailed instructions after Gate passes.
@@ -65,8 +65,6 @@ Phase 3 uses a 5-model exploration workflow. See `post-gate.md` for detailed ins
65
65
66
66
> **⚠️ SCOPE**: Document only. No code analysis. No fix opinions. No running tests.
67
67
68
-
**🚨 CRITICAL: Create the state file BEFORE doing anything else.**
69
-
70
68
### ❌ Pre-Flight Boundaries (What NOT To Do)
71
69
72
70
| ❌ Do NOT | Why | When to do it |
@@ -79,141 +77,11 @@ Phase 3 uses a 5-model exploration workflow. See `post-gate.md` for detailed ins
79
77
80
78
### ✅ What TO Do in Pre-Flight
81
79
82
-
- Create/check state file
83
80
- Read issue description and comments
84
81
- Note platforms affected (from labels)
85
82
- Identify files changed (if PR exists)
86
83
- Document disagreements and edge cases from comments
87
84
88
-
### Step 0: Check for Existing State File or Create New One
0 commit comments