Skip to content

Comments

Initial version of a build duty report generator instructions for copilot#52678

Open
marcpopMSFT wants to merge 1 commit intomainfrom
marcpopMSFT-catreport
Open

Initial version of a build duty report generator instructions for copilot#52678
marcpopMSFT wants to merge 1 commit intomainfrom
marcpopMSFT-catreport

Conversation

@marcpopMSFT
Copy link
Member

@marcpopMSFT marcpopMSFT commented Jan 26, 2026

See below for an example report.

Drawback of this is that I had to keep reminding it not to include extra PRs like backports or non-SDK PRs into the VMR as even though that's in the skill, it would forget that. It also had some trouble always remembering to include failure details. Still an interesting first try.

Copilot AI review requested due to automatic review settings January 26, 2026 22:36
@marcpopMSFT
Copy link
Member Author

SDK Build Duty Triage Report

Generated: January 26, 2026
Repos Monitored: dotnet/sdk, dotnet/templating, dotnet/dotnet (VMR - SDK-owned only)


Summary

Category Count
🟢 Ready to Merge 1
⏳ Waiting/On Hold 1
🔴 Failing/Blocked 13
🟡 Branch Lockdown 10
🟠 New/Pending Validation 2

🟢 Ready to Merge PRs (1)

These PRs have all checks passing and are ready for merge.

dotnet/dotnet VMR

PR Title Target Branch Age
#4419 [release/10.0.1xx] Source code updates from dotnet/source-build-reference-packages release/10.0.1xx 0d

🟠 New/Pending Validation PRs (2)

These PRs were just created and are awaiting initial CI validation.

dotnet/sdk

PR Title Target Branch Age
#52673 [release/10.0.1xx] Source code updates from dotnet/dotnet release/10.0.1xx 0d

dotnet/templating

PR Title Target Branch Age
#9757 [release/10.0.1xx] Source code updates from dotnet/dotnet release/10.0.1xx 3d

⏳ Waiting/On Hold PRs (1)

These PRs have passing checks but have comments indicating they should wait before merging.

dotnet/templating

PR Title Target Branch Age Reason
#9754 [release/10.0.3xx] Source code updates from dotnet/dotnet release/10.0.3xx 4d Will break build - Arcade version flow issue. Waiting for Arcade 10 to flow through VMR. CC @MichaelSimons. Also linked to Issue dotnet/sdk#51574.

🟡 Branch Lockdown PRs (10)

These PRs are in branches with lockdown labels and require approval to merge.

dotnet/sdk (8)

PR Title Target Branch Age
#52667 [release/9.0.1xx] Update dependencies from dotnet/roslyn-analyzers release/9.0.1xx 1d
#52624 [release/9.0.3xx] Update dependencies from dotnet/scenario-tests release/9.0.3xx 4d
#52606 [release/9.0.1xx] Update dependencies from dotnet/scenario-tests release/9.0.1xx 5d
#52594 [release/9.0.3xx] Update dependencies from dotnet/msbuild release/9.0.3xx 5d
#52592 [release/9.0.3xx] Update dependencies from dotnet/arcade release/9.0.3xx 5d
#52591 [release/9.0.1xx] Update dependencies from dotnet/source-build-reference-packages release/9.0.1xx 5d
#52590 [release/9.0.1xx] Update dependencies from dotnet/arcade release/9.0.1xx 5d
#52530 Merge branch 'release/8.0.1xx' => 'release/8.0.4xx' release/8.0.4xx 8d

dotnet/templating (2)

PR Title Target Branch Age
#9746 [release/9.0.1xx] Update dependencies from dotnet/arcade release/9.0.1xx 5d
#9744 [release/9.0.3xx] Update dependencies from dotnet/arcade release/9.0.3xx 5d

🔴 Failing/Blocked PRs (13)

PRs with pending or failing status checks.

dotnet/sdk (11)

PR Title Target Branch Age Issue
#52662 [release/10.0.2xx] Source code updates from dotnet/dotnet release/10.0.2xx 3d ⚠️ Opposite codeflow merged - needs decision (merge/close/force)
#52657 Merge branch 'release/10.0.1xx' => 'release/10.0.2xx' release/10.0.2xx 3d ⏳ Checks pending
#52653 [release/10.0.2xx] Update dependencies from microsoft/testfx release/10.0.2xx 3d ⏳ Checks pending
#52652 [release/10.0.1xx] Update dependencies from microsoft/testfx release/10.0.1xx 3d ⏳ Checks pending
#52651 [main] Update dependencies from microsoft/testfx main 3d ⏳ Checks pending
#52596 [main] Source code updates from dotnet/dotnet main 5d ❌ ILLink analyzer error: System.MissingMethodException - Issue dotnet/roslyn#82178
#52588 Merge branch 'release/10.0.2xx' => 'release/10.0.3xx' release/10.0.3xx 5d ❌ Build error: TagHelperCollection not found in RazorSdk - @dotnet/razor-tooling investigating
#52585 [release/10.0.3xx] Source code updates from dotnet/dotnet release/10.0.3xx 5d ⏳ Checks pending
#52523 [release/10.0.2xx] Source code updates from dotnet/dotnet release/10.0.2xx 9d ❌ Restore error NU1603: Microsoft.Deployment.DotNet.Releases version mismatch
#52519 Merge branch 'release/10.0.3xx' => 'main' main 9d ❌ Test failures: XunitMultiTFM, RunWithSolutionFilterAsFirstUnmatchedToken - fix pushed, awaiting green

github-actions[bot] Merge PRs (2)

Note: These are cross-branch merge PRs that require manual attention.

Repo PR Title Target Branch Age Issue
dotnet/sdk #52530 Merge 'release/8.0.1xx' => 'release/8.0.4xx' release/8.0.4xx 8d Branch Lockdown
dotnet/sdk #52529 Merge 'release/8.0.4xx' => 'release/9.0.1xx' release/9.0.1xx 8d Branch Lockdown

Notes

  • Status API shows pending for all PRs - These repos use Azure Pipelines/GitHub Checks API which doesn't populate the Status API. Actual check status determined from comments and PR state.
  • All PRs checked against authors: dotnet-maestro[bot], github-actions[bot] (Merge PRs only)
  • dotnet/dotnet VMR PRs filtered to SDK-owned: dotnet/sdk, dotnet/templating, dotnet/deployment-tools, dotnet/source-build-reference-packages

Total PR Count by Repo

Repo Count
dotnet/sdk 19
dotnet/templating 4
dotnet/dotnet (VMR) 1
Total 24

Key Issues Blocking Multiple PRs

Issue Affected PRs Status
#52599 - ILLink analyzer MissingMethodException #52596 Open, @MiYanni investigating
#51574 - Arcade version flow templating #9754 On hold
RazorSdk TagHelperCollection missing #52588 @dotnet/razor-tooling investigating
Opposite codeflow merged #52662, #52596, #52523 Needs decision: merge/close/force
Branch Lockdown (9.0.x branches) 8 SDK PRs, 2 templating PRs Requires approval

Report generated by SDK Build Duty skill

@marcpopMSFT
Copy link
Member Author

@DonnaChen888 this might make your report generations easier. This is just a first try experiment though.

Copy link
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

This PR introduces two new documentation files to help automate and guide build duty PR triage for the .NET SDK team using GitHub Copilot. The files provide instructions for monitoring, classifying, and reporting on pull requests from automated bots and specific team members across multiple .NET repositories.

Changes:

  • Added a skill definition file that describes the build duty PR triage capability for Copilot
  • Added a prompt file with detailed instructions for executing build duty triage and generating reports

Reviewed changes

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

File Description
.github/copilot/skills/build-duty-pr-triage.md Defines the build duty PR triage skill with monitored repositories, authors, PR classification categories, and example output format
.github/copilot/prompts/build-duty.prompt.md Provides detailed step-by-step instructions for Copilot to perform PR triage, including query syntax, classification logic, and report generation format

### ❌ Category 4: Failing / Blocked
PRs with ANY of:
- `mergeable_state` = `"blocked"` (even if pending - this means required checks failing)
- `get_status` returns `state: "failure"` or `state: "pending"`
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

Inconsistent classification logic for failing PRs. Line 78 states that get_status with "pending" state should be classified as "Failing / Blocked", but "pending" typically means checks are still running, not that they have failed. This could lead to premature classification of PRs as failing when they're simply waiting for CI to complete. Consider separating "pending" (waiting) from "failure" (actually failed) or clarifying that "pending" only belongs in this category if it's been pending for an extended period.

Suggested change
- `get_status` returns `state: "failure"` or `state: "pending"`
- `get_status` returns `state: "failure"` (if `state` is `"pending"`, treat as checks still running and **do not** put in this category unless the PR has been pending unusually long and appears stuck)

Copilot uses AI. Check for mistakes.

```
# All maestro PRs in SDK
is:open is:pr repo:dotnet/sdk author:app/dotnet-maestro
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

Inconsistency in query examples between files. In the skill file, line 156 shows "is:open is:pr repo:dotnet/sdk author:app/dotnet-maestro" but in the prompt file at line 21, it references the same bot as "dotnet-maestro[bot]". While both may work, having consistent naming across the instruction files would improve clarity. The query format "author:app/dotnet-maestro" is correct for GitHub searches, but it should be consistently documented.

Copilot uses AI. Check for mistakes.
### Special: dotnet/dotnet VMR Filtering

For the dotnet/dotnet repo, only include PRs that:
1. Are authored by `dotnet-maestro[bot]}}`
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

There is a syntax error in the bot mention. The line contains dotnet-maestro[bot]}} with extra closing braces. This should be dotnet-maestro[bot] to match the format used elsewhere in the document.

Suggested change
1. Are authored by `dotnet-maestro[bot]}}`
1. Are authored by `dotnet-maestro[bot]`

Copilot uses AI. Check for mistakes.

### 1. ✅ Ready to Merge
PRs that meet all of the following criteria:
- mergeable_state is "clean" or not "blocked"
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The logic for "Ready to Merge" classification is contradictory. Line 49 states the criteria includes 'mergeable_state is "clean" or not "blocked"', which would include states like "unstable" or "pending". However, this conflicts with the more precise definition in the prompt file (lines 52-55) and the Category 4 definition (lines 64-68) which treats "unstable" and "blocked" states as failing. The criterion should be simplified to only accept mergeable_state as "clean" for consistency.

Suggested change
- mergeable_state is "clean" or not "blocked"
- mergeable_state is exactly "clean"

Copilot uses AI. Check for mistakes.

1. **Fetch Open PRs**: Query for all open pull requests in the monitored repositories
2. **Check CI Status**: For each PR, determine the status of all required checks
3. **Classify PRs**: Sort PRs into the three categories above
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The Workflow Instructions mention "three categories" but the document defines four categories: Ready to Merge, Branch Lockdown, Changes Requested, and Failing/Blocked. The text should be updated to accurately reflect the number of categories.

Suggested change
3. **Classify PRs**: Sort PRs into the three categories above
3. **Classify PRs**: Sort PRs into the four categories above

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +3
applyTo: chat
description: "Triage pull requests across .NET SDK repositories for build duty. Classifies PRs into: Ready to Merge, Passing but Branch Lockdown, and Failing Checks."
---
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The frontmatter at the top of the file appears to be incomplete or malformed. Line 1 contains "applyTo: chat" but line 3 has "---" which typically closes YAML frontmatter, leaving the description on line 2 in an ambiguous position. Standard YAML frontmatter should open with "---" on the first line, contain the metadata, and close with "---". Either add an opening "---" before line 1, or clarify the intended format for this file type.

Copilot uses AI. Check for mistakes.
1. **dotnet-maestro[bot]** - Automated dependency updates and codeflow PRs
- Query: `author:app/dotnet-maestro`

2. **github-actions[bot]** - Only inter-branch merge PRs
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

Inconsistent terminology for the same tool. The document uses "github-actions[bot]" (lowercase with hyphens) in some places but refers to the same entity as "app/github-actions" in queries. While "app/github-actions" is correct for GitHub search queries, the bot should be consistently referred to using its actual username format. Consider standardizing the reference format or clarifying which context requires which format.

Suggested change
2. **github-actions[bot]** - Only inter-branch merge PRs
2. **github-actions[bot]** - Only inter-branch merge PRs (GitHub search represents this bot as `app/github-actions`)

Copilot uses AI. Check for mistakes.
Comment on lines +52 to +54
- `mergeable_state` is `"clean"` (this is the primary check)
- `get_status` returns `state: "success"`
- Not a draft PR
Copy link

Copilot AI Jan 26, 2026

Choose a reason for hiding this comment

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

The instruction states to check if 'mergeable_state is "clean"' as the primary check, but then immediately adds an OR condition with get_status. However, the logic should be AND, not OR. A PR should have both mergeable_state as "clean" AND get_status as "success" to be truly ready to merge. The current wording with separate bullet points makes this unclear. Consider clarifying that ALL criteria must be met simultaneously.

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,193 @@
# Build Duty PR Triage Skill
Copy link
Member

Choose a reason for hiding this comment

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

issue: Skill does not conform to the Agent Skill specification.

Comment on lines +70 to +82
## Usage

To use this skill, ask Copilot to:

```
@workspace Check the build duty PR status for today
```

or

```
@workspace Triage open PRs in dotnet/sdk for build duty
```
Copy link
Member

Choose a reason for hiding this comment

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

issue: Skill definition should not include instructions on how to use the skill. Instead, examples of when the skill should be invoked should be in the YAML frontmatter/description.

Comment on lines +88 to +98
1. **Fetch Open PRs**: Query for all open pull requests in the monitored repositories
2. **Check CI Status**: For each PR, determine the status of all required checks
3. **Classify PRs**: Sort PRs into the three categories above
4. **Report Summary**: Provide a formatted summary with:
- PR number and title
- Author
- Target branch
- Status category
- Link to the PR
- Age of the PR (days open)
- Any blocking issues or notes
Copy link
Member

Choose a reason for hiding this comment

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

suggestion: Most of this seems well defined and could be extracted into a file-based app that is included in the skill. It's faster and more efficient to have something like "For each PR, determine the status of all required checks" encoded in a script than rely on the LLM to do that.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I had originally envisioned a bunch of gh CLI calls to pull this info but copilot advocated for using the GH MCP instead (it seemed to think it could be more parallelized). Does it only do CLI calls in the terminal so would it end up being serial calls? I can have it try the other way and see what it does as the results were definitely a bit unpredictable and having specific script calls would be better.

Copy link
Member

Choose a reason for hiding this comment

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

A file-based app can be parallelized however you want. Then the SKILL.md file can include instructions on how to use it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants