Skip to content

Add mobile platform failure scanner agentic workflow#126952

Open
kotlarmilos wants to merge 8 commits intodotnet:mainfrom
kotlarmilos:apple-mobile-agentic-workflows
Open

Add mobile platform failure scanner agentic workflow#126952
kotlarmilos wants to merge 8 commits intodotnet:mainfrom
kotlarmilos:apple-mobile-agentic-workflows

Conversation

@kotlarmilos
Copy link
Copy Markdown
Member

@kotlarmilos kotlarmilos commented Apr 15, 2026

Description

This adds a daily scheduled agentic workflow that scans the runtime-extra-platforms https://dev.azure.com/dnceng-public/public/_build?definitionId=154 for Apple mobile (iOS, tvOS, MacCatalyst) and Android failures on main.

What it does

  • Daily scan: queries the latest completed build, finds failed mobile jobs, reads failure logs
  • Triage: classifies failures as infrastructure (reports on tracking issues with machine details) or code (traces to recent commits)
  • Fix: opens draft PRs for code failures, caps at 2 PRs, 2 issues, 5 comments per run
  • Self-improvement: updates its own skill document when it learns new failure patterns

Files

File Purpose
.github/skills/mobile-platforms/SKILL.md Domain knowledge: CI pipeline structure, code paths, failure triage, platform gotchas
.github/workflows/mobile-scan.md Daily scan workflow (schedule trigger, write-access gated)
.github/workflows/mobile-scan.lock.yml Compiled lock file

Safety

  • Read-only permissions; writes go through safe-outputs with strict caps
  • Only admins, maintainers, and contributors with write access can modify
  • Log excerpts are sanitized before posting (no secrets, tokens, PII)
  • Concurrency group prevents overlapping runs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GitHub Agentic Workflow to automatically scan Azure DevOps “runtime-extra-platforms” (definition 154) for Apple mobile/Android failures, triage them, and produce bounded remediation outputs (issues/PRs/comments). Also introduces a new mobile triage skill document and the compiled workflow lockfile needed to run the workflow in production.

Changes:

  • Add a scheduled “Mobile Platform Failure Scanner” agentic workflow definition (mobile-scan.md) plus its compiled lock workflow (mobile-scan.lock.yml).
  • Add a new domain skill document for mobile-platform CI triage and fixes (.github/skills/mobile-platforms/SKILL.md).
  • Update the Agentic Workflows action lock entries and include an unrelated test change in System.Diagnostics.FileVersionInfo.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/libraries/System.Diagnostics.FileVersionInfo/tests/System.Diagnostics.FileVersionInfo.Tests/FileVersionInfoTest.cs Small platform check tweak (note: unrelated to the PR’s stated workflow purpose).
.github/workflows/mobile-scan.md New agentic workflow source: schedule + prompt/instructions + safe-output caps.
.github/workflows/mobile-scan.lock.yml Generated compiled workflow to execute in GitHub Actions.
.github/skills/mobile-platforms/SKILL.md New skill doc capturing mobile CI pipeline structure and triage guidance.
.github/aw/actions-lock.json Updates action lock entries used by agentic workflows.

Comment thread .github/workflows/mobile-scan.md Outdated
Comment thread .github/workflows/mobile-scan.md Outdated
Comment thread .github/skills/mobile-platforms/SKILL.md Outdated
kotlarmilos and others added 2 commits April 15, 2026 19:07
Use OperatingSystem.IsWindows() instead of PlatformDetection.IsWindows
for the OriginalTestAssemblyInternalName field initializer. On Apple
mobile CI, EnableAggressiveTrimming=true causes PlatformDetection.IsWindows
(which chains through RuntimeInformation.IsOSPlatform) to be incorrectly
evaluated during cross-compilation trimming. OperatingSystem.IsWindows()
is a compile-time constant in the BCL, immune to trimmer mis-evaluation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a daily scheduled agentic workflow that scans the runtime-extra-platforms
pipeline (AzDO definition 154) for Apple mobile and Android test/build failures.
The agent triages failures as infrastructure or code, reports infrastructure
issues on tracking issues with machine details, and opens draft PRs for code
fixes.

Files added:
- .github/skills/mobile-platforms/SKILL.md: domain knowledge covering CI
  pipeline structure, code paths, failure triage, platform gotchas, and
  self-improvement guidance
- .github/workflows/mobile-scan.md: daily scan workflow with safe-output
  caps (2 PRs, 2 issues, 5 comments)
- .github/workflows/mobile-scan.lock.yml: compiled lock file

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kotlarmilos kotlarmilos force-pushed the apple-mobile-agentic-workflows branch from d13c49e to 3815708 Compare April 15, 2026 17:08
Copilot AI review requested due to automatic review settings April 15, 2026 17:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/mobile-scan.md
Comment thread .github/skills/mobile-platforms/SKILL.md
Comment thread .github/workflows/mobile-scan.md
Comment thread .github/workflows/mobile-scan.md Outdated
Comment thread .github/workflows/mobile-scan.md
Comment thread .github/workflows/mobile-scan.md Outdated
kotlarmilos and others added 2 commits April 16, 2026 10:44
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix BUILD_ID capture and timeline API URL
- Rename concurrency group to mobile-scan
- Add network allowlist for dev.azure.com and helix.dot.net
- Add known build error check before investigating
- Reference ci-analysis skill for structured failure data
- Align self-improvement guidance between workflow and skill
- Skip PR creation if a fix PR already exists for the issue

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 16, 2026 08:50
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread .github/workflows/mobile-scan.md
Comment thread .github/workflows/mobile-scan.md
Comment thread .github/workflows/mobile-scan.md Outdated
Comment thread .github/workflows/mobile-scan.lock.yml Outdated
- Move roles under on: so schedule trigger runs without role check
- Delegate CI failure analysis to ci-analysis skill (Get-CIStatus.ps1)
- Add pwsh to bash tool allowlist for ci-analysis script
- Update self-improvement guidance: record learnings on issues instead
  of modifying SKILL.md in fix PRs (protected by safe-outputs)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kotlarmilos
Copy link
Copy Markdown
Member Author

I don't have permissions to create/update .github/workflows. Could someone push it to the origin repo (instead of my fork) so I can run it manually to verify?

@kotlarmilos
Copy link
Copy Markdown
Member Author

I don't have permissions to create/update .github/workflows. Could someone push it to the origin repo (instead of my fork) so I can run it manually to verify?

/cc: @danmoseley @vitek-karas @JanKrivanek Anyone with permissions to change workflows?

vitek-karas added a commit that referenced this pull request Apr 17, 2026
Port the net changes from #126952 onto a direct runtime branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
YAML parsed '!github.event.repository.fork' as a tag. Replace with
'github.event.repository.fork == false' to avoid the leading '!'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 17, 2026 10:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread .github/skills/mobile-platforms/SKILL.md
Comment thread .github/skills/mobile-platforms/SKILL.md
Comment thread .github/workflows/mobile-scan.md Outdated
github-actions bot added a commit that referenced this pull request Apr 17, 2026
Port the net changes from #126952 onto a direct runtime branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…PR base)

Squash of iterations from upstream/pr-126952-mobile-scan:
- drill into Helix logs and auto-fix platform-unsupported tests
- expand bash allowlist; persist state to files to avoid shell guard
- allow blob storage; use script-file pattern for $(...)
- branch from origin/main to avoid protected-file fallback on patch
- require os-* and area-* labels on PRs/issues

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kotlarmilos
Copy link
Copy Markdown
Member Author

Generated PRs: #127081 and #127082

@steveisok
Copy link
Copy Markdown
Member

@kotlarmilos I think this should try to incorporate the "CI Investigator" agent and skills from https://github.com/dotnet/arcade-skills/tree/main/plugins/dotnet-dnceng. I also think we should not hold ourselves to just mobile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-skills Agent Skills

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants