Analyze VMR codeflow PR status for dotnet repositories. Use when investigating stale codeflow PRs, checking if fixes have flowed through the VMR pipeline, debugging dependency update issues in PRs authored by dotnet-maestro[bot], checking overall flow status for a repo, or diagnosing why backflow PRs are missing or blocked.
Analyze the health of VMR codeflow PRs in both directions:
dotnet/dotnet → product repos (e.g., dotnet/sdk)dotnet/dotnet🚨 NEVER use
gh pr review --approveor--request-changes. Only--commentis allowed. Approval and blocking are human-only actions.
📝 AI-generated content disclosure: When posting any content to GitHub (PR comments, analysis summaries) under a user's credentials — i.e., the account is not a dedicated "copilot" or "bot" account/app — you MUST include a concise, visible note (e.g. a
> [!NOTE]alert) indicating the content was AI/Copilot-generated. Skip this if the user explicitly asks you to omit it.
Workflow: Run the script → read the human-readable output + JSON → synthesize recommendations yourself. The script collects data; you generate the advice.
[CODEFLOW_SUMMARY]gh) — must be installed and authenticated (gh auth login)Use this skill when:
dotnet-maestro[bot]) has failing tests and you need to know if it's stale| Mode | Use When | Required Params |
|---|---|---|
| PR analysis | Investigating a specific codeflow PR | -PRNumber (and optionally -Repository) |
Flow health (-CheckMissing) | Checking overall repo flow status | -CheckMissing (optional: -Repository, -Branch) |
⚠️ Common mistake: Don't use
-PRNumberand-CheckMissingtogether — they are separate modes.-CheckMissingscans branches discovered from open and recent backflow PRs (unless-Branchis provided), not a specific PR.
# Check codeflow PR status (most common)
./scripts/Get-CodeflowStatus.ps1 -PRNumber 52727 -Repository "dotnet/sdk"
# Trace a specific fix through the pipeline
./scripts/Get-CodeflowStatus.ps1 -PRNumber 52727 -Repository "dotnet/sdk" -TraceFix "dotnet/runtime#123974"
# Show individual VMR commits that are missing
./scripts/Get-CodeflowStatus.ps1 -PRNumber 52727 -Repository "dotnet/sdk" -ShowCommits
# Check overall flow health for a repo (backflow + forward flow)
./scripts/Get-CodeflowStatus.ps1 -Repository "dotnet/roslyn" -CheckMissing
# Check a specific branch only
./scripts/Get-CodeflowStatus.ps1 -Repository "dotnet/sdk" -CheckMissing -Branch "main"
| Parameter | Required | Default | Description |
|---|---|---|---|
-PRNumber | Yes (unless -CheckMissing) | — | GitHub PR number to analyze |
-Repository | No | dotnet/sdk | Target repo in owner/repo format |
-TraceFix | No | — | Trace a repo PR through the pipeline. Format: owner/repo#number (e.g., dotnet/runtime#123974) |
-ShowCommits | No | $false | Show individual VMR commits between PR snapshot and branch HEAD |
-CheckMissing | No | $false | Check overall flow health: missing backflow PRs, forward flow status, and official build freshness |
-Branch | No | — | With -CheckMissing, only check a specific branch (e.g., main, release/10.0) |
Design principle: Assess current state from primary signals first, then use Maestro comments as historical context — not the other way around. Comments tell you the history, not the present.
-TraceFix) — Checks if a specific fix has flowed through VMR → codeflow PR[CODEFLOW_SUMMARY] JSON block with all key facts for the agent to reason overAfter the script runs, you (the agent) generate recommendations. The script collects data; you synthesize the advice. See Generating Recommendations below.
-CheckMissing)aka.ms shortlinks for latest published VMR build dates per channeldotnet/dotnet for staleness and conflicts❌ Never assume "Unknown" health means healthy. When
ghAPI calls fail (auth, rate limiting), the script returns "Unknown" status — this is explicitly excluded from healthy/covered counts.
⚠️ aka.ms redirect behavior: 301 is expected and treated as a valid product URL (→ ci.dot.net). Non-301 redirects (often 302, which goes to Bing) indicate an invalid URL. The script only accepts 301.
darc vmr resolve-conflict command.Manual commits on the PR branch are at risk if the PR is closed or force-triggered. The script lists them so you can decide whether to preserve them.
When using -TraceFix:
After the script outputs the [CODEFLOW_SUMMARY] JSON block, you synthesize recommendations. Do not parrot the JSON — reason over it.
Check isCodeflowPR first — if false, skip all codeflow-specific advice:
isCodeflowPR = false or flowDirection = "unknown"): State this clearly. No darc commands, no codeflow recommendations. Treat as a normal PR.Then read currentState:
| State | Action |
|---|---|
MERGED | No action needed. Mention Maestro will create a new PR if VMR has newer content. |
CLOSED | Suggest triggering a new PR if subscriptionId is available. |
NO-OP | PR has no meaningful changes. Recommend closing or merging to clear state. If subscriptionId is available, offer force-trigger as a third option. |
IN_PROGRESS | Someone is actively working. Recommend waiting, then checking back. |
STALE | Needs attention — see warnings below for what's blocking. |
ACTIVE | PR is healthy — check freshness and warnings for nuance. |
Then layer in context from warnings, freshness, and commits:
warnings.conflictCount > 0, conflictMayBeResolved = false): Lead with "resolve conflicts" using darc vmr resolve-conflict --subscription <id>. Offer "close & reopen" as alternative.conflictMayBeResolved = true): Note the force push post-dates the conflict warning. Suggest verifying, then merging.stalenessCount > 0, stalenessMayBeResolved = false): Codeflow is blocked. Options: merge as-is, force trigger, or close & reopen.commits.manual > 0): Warn that force-trigger or close will lose them. If commits.codeflowLikeManual > 0, note the freshness gap may be partially covered.freshness.aheadBy > 0): Mention the PR is missing updates. If staleness is blocking, a force trigger is needed. Otherwise, Maestro should auto-update.When recommending actions, include the relevant darc command with the actual subscriptionId from the summary. Be precise about what each command does:
| Command | What it does | When to use |
|---|---|---|
darc trigger-subscriptions --id <id> | Normal trigger — only works if subscription isn't stale. Creates a new PR if none exists. | PR was closed, or no PR exists |
darc trigger-subscriptions --id <id> --force | Force trigger — overwrites the existing PR branch with fresh VMR content. Does not create a new PR. | PR exists but is stale/no-op and you want to reuse it |
darc vmr resolve-conflict --subscription <id> | Resolve conflicts locally and push to the PR branch | PR has merge conflicts |
⚠️ Common mistake: Don't say "close then force-trigger" — force-trigger pushes to the existing PR. If you close first, use a normal trigger instead (which creates a new PR). The two paths are: (A) force-trigger to refresh the existing PR, or (B) close + normal-trigger to get a new PR.
Be direct. Lead with the most important action. Use 2-4 bullet points, not long paragraphs. Include the darc command inline so the user can copy-paste.
After analyzing the codeflow status, common next steps involve darc commands:
# Force trigger the subscription to get a fresh codeflow update
darc trigger-subscriptions --id <subscription-id> --force
# Normal trigger (only works if not stale)
darc trigger-subscriptions --id <subscription-id>
# Check subscription details
darc get-subscriptions --target-repo dotnet/sdk --source-repo dotnet/dotnet
# Get BAR build details
darc get-build --id <bar-build-id>
# Resolve codeflow conflicts locally
darc vmr resolve-conflict --subscription <subscription-id>
Install darc via eng\common\darc-init.ps1 in any arcade-enabled repository.
When the script shows a missing backflow PR with "Maestro may be stuck" (builds are fresh but no PR was created), follow these diagnostic steps:
Check the subscription to find when it last consumed a build:
darc get-subscriptions --target-repo <repo> --source-repo dotnet/dotnet
Look at the Last Build field — if it's weeks old while the channel has newer builds, the subscription is stuck.
Compare against the latest channel build to confirm the gap:
darc get-latest-build --repo dotnet/dotnet --channel "<channel-name>"
Channel names follow patterns like .NET 11.0.1xx SDK, .NET 10.0.1xx SDK, .NET 11.0.1xx SDK Preview 1.
Trigger the subscription manually to unstick it:
darc trigger-subscriptions --id <subscription-id>
If triggering doesn't produce a PR within a few minutes, the issue may be deeper — check Maestro health or open an issue on dotnet/arcade.