Skip to content

Copilot CI: Structured phase outputs, autonomous execution, iOS support, and CI pipeline#34040

Merged
jfversluis merged 130 commits intomainfrom
copilot-ci
Mar 3, 2026
Merged

Copilot CI: Structured phase outputs, autonomous execution, iOS support, and CI pipeline#34040
jfversluis merged 130 commits intomainfrom
copilot-ci

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Feb 13, 2026

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 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.

rmarinho and others added 30 commits February 11, 2026 20:56
Clarify the Copilot PR-review prompt to execute five explicit phases (Understanding, Test Review, Fix Exploration, Alternative Comparison, Final Review). Add a new pipeline step that invokes a Copilot "post-comment" skill, captures its exit code, logs output to $(Build.ArtifactStagingDirectory)/copilot-logs, and sets a PostCommentFailed variable on failure. Ensure artifacts dir exists, surface warnings on failure, and make the original post-comment fallback step run only when the skill step failed. Update step display names and preserve artifact publishing.
Add a pipeline step (Cache Prompt File) that loads eng/pipelines/prompts/pr-review-prompt.md and copies it to /tmp/copilot-prompts/pr-review-prompt.md before the PR branch checkout. Update the later Copilot step to read the prompt from the cached location and adjust the error message. This prevents failures when the prompt file is absent on the PR branch by ensuring a stable copy is available for the review step.
Replace brittle iPhone Xs + iOS 18.5 lookup with a prioritized selection routine. The script now iterates preferred iOS versions and device models, picks the first available preferred device or falls back to the first available iPhone, and finally falls back to any available simulator. It also surfaces runtime info when listing available simulators and reports the selected device name and UDID before booting.
Replace direct checkout of the PR branch with logic that fetches the PR, computes the merge-base against the current branch, and cherry-picks commits from the merge-base..PR_HEAD onto the current branch (using --no-commit). Adds commit counting, a warning when no commits are found, conflict handling with status and diff output, and extra logging (current branch, merge base, commit count, last commit and status). Also updates the pipeline step display name to 'Cherry-pick PR Changes' and tweaks the fetch message.
Add a CI step to run ./build.ps1 --target=dotnet-buildtasks (Release, diagnostic) to compile MSBuild tasks required for MAUI builds. The step includes a retry on failure and sets DOTNET_TOKEN and PRIVATE_BUILD environment variables for accessing internal artifacts. Placed before the simulator/emulator listing to ensure tasks are available for subsequent MAUI jobs.
Add provisioning steps to eng/pipelines/common/provision.yml to create an iPhone Xs simulator with iOS 18.5 (falling back to iOS 18.x if 18.5 is not available). The script finds the appropriate runtime and device type, checks for an existing simulator to avoid duplicates, attempts creation if missing, and prints available iPhone simulators. This ensures the required simulator is present for UI tests and logs useful diagnostics if runtimes or device types are not available.
@jfversluis jfversluis deleted the copilot-ci branch March 3, 2026 10:50
evgenygunko pushed a commit to evgenygunko/CopyWordsDA that referenced this pull request Mar 11, 2026
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [Microsoft.Extensions.Logging.Debug](https://dot.net/) ([source](https://github.com/dotnet/dotnet)) | nuget | patch | `10.0.3` -> `10.0.4` |
| [Microsoft.Maui.Controls](https://github.com/dotnet/maui) | nuget | patch | `10.0.41` -> `10.0.50` |

---

### Release Notes

<details>
<summary>dotnet/maui (Microsoft.Maui.Controls)</summary>

### [`v10.0.50`](https://github.com/dotnet/maui/releases/tag/10.0.50)

[Compare Source](dotnet/maui@10.0.41...10.0.50)

#### What's Changed

.NET MAUI 10.0.50 introduces significant improvements across all platforms with focus on quality, performance, and developer experience. This release includes 78 commits with various improvements, bug fixes, and enhancements.

#### AI

-   Enable packing and independent preview versioning for Essentials.AI by [@&#8203;mattleibow](https://github.com/mattleibow) in dotnet/maui#33976

-   Move Essentials.AI preview iteration to eng/Versions.props by [@&#8203;mattleibow](https://github.com/mattleibow) in dotnet/maui#34025

-   \[Feature] Add Microsoft.Maui.Essentials.AI - Apple Intelligence by [@&#8203;mattleibow](https://github.com/mattleibow) in dotnet/maui#33519

#### Ai Agents

-   Copilot agent infrastructure, emulator reliability, and try-fix workflow improvements by [@&#8203;PureWeen](https://github.com/PureWeen) via [@&#8203;Copilot](https://github.com/Copilot) in dotnet/maui#33937

-   Update PR agent models to claude-sonnet-4.6 and gpt-5.3-codex by [@&#8203;kubaflo](https://github.com/kubaflo) in dotnet/maui#34109

-   ci-copilot: set pipeline run title early using build.updatebuildnumber by [@&#8203;jfversluis](https://github.com/jfversluis) via [@&#8203;Copilot](https://github.com/Copilot) in dotnet/maui#34156

-   Revamp find-reviewable-pr skill: priorities, defaults, and doc fixes by [@&#8203;PureWeen](https://github.com/PureWeen) in dotnet/maui#34160

-   Add correct CI pipeline names to Copilot instructions by [@&#8203;jfversluis](https://github.com/jfversluis) in dotnet/maui#34255

-   Add resilience to UI tests for frozen/unresponsive apps by [@&#8203;PureWeen](https://github.com/PureWeen) in dotnet/maui#34023

-   Copilot CI: Structured phase outputs, autonomous execution, iOS support, and CI pipeline by [@&#8203;kubaflo](https://github.com/kubaflo) in dotnet/maui#34040

-   Agent Workflow Metrics via GitHub Labels by [@&#8203;kubaflo](https://github.com/kubaflo) in dotnet/maui#33986

#### Animation

-   \[Android] Fixed TransformProperties issue when a wrapper view is present by [@&#8203;Ahamed-Ali](https://github.com/Ahamed-Ali) in dotnet/maui#29228

    <...
This was referenced Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-ai-agents Copilot CLI agents, agent skills, AI-assisted development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants