| name | vmr-codeflow-status |
| description | 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. |
VMR Codeflow Status
Analyze the health of VMR codeflow PRs in both directions:
- Backflow:
dotnet/dotnet â product repos (e.g., dotnet/sdk)
- Forward flow: product repos â
dotnet/dotnet
đ¨ NEVER use gh pr review --approve or --request-changes. Only --comment is allowed. Approval and blocking are human-only actions.
Prerequisites
- GitHub CLI (
gh) â must be installed and authenticated (gh auth login)
- Run scripts from the skill directory or use the full path to the script
When to Use This Skill
Use this skill when:
- A codeflow PR (from
dotnet-maestro[bot]) has failing tests and you need to know if it's stale
- You need to check if a specific fix has flowed through the VMR pipeline to a codeflow PR
- A PR has a Maestro staleness warning ("codeflow cannot continue") or conflict
- You need to understand what manual commits would be lost if a codeflow PR is closed
- You want to check the overall state of flow for a repo (backflow and forward flow health)
- You need to know why backflow PRs are missing or when the last VMR build was published
- You're asked questions like "is this codeflow PR up to date", "has the runtime revert reached this PR", "why is the codeflow blocked", "what is the state of flow for the sdk", "what's the flow status for net11"
Two Modes
| 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 -PRNumber and -CheckMissing together â they are separate modes. -CheckMissing scans branches discovered from open and recent backflow PRs (unless -Branch is provided), not a specific PR.
Quick Start
# 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"
Key Parameters
| 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) |
What the Script Does
PR Analysis Mode (default)
- Parses PR metadata â Extracts VMR commit, subscription ID, build info from PR body
- Validates snapshot â Cross-references PR body commit against branch commit messages to detect stale metadata
- Checks VMR freshness â Compares PR's VMR snapshot against current VMR branch HEAD
- Shows pending forward flow â For behind backflow PRs, finds open forward flow PRs that would close part of the gap
- Detects staleness & conflicts â Finds Maestro "codeflow cannot continue" warnings and "Conflict detected" messages with file lists and resolve commands
- Analyzes PR commits â Categorizes as auto-updates vs manual commits
- Traces fixes (with
-TraceFix) â Checks if a specific fix has flowed through VMR â codeflow PR
- Recommends actions â Suggests force trigger, close/reopen, merge as-is, resolve conflicts, or wait
Flow Health Mode (-CheckMissing)
- Checks official build freshness â Queries
aka.ms shortlinks for latest published VMR build dates per channel
- Scans backflow PRs â Finds branches where a backflow PR should exist but doesn't, and checks health of open PRs (conflict/staleness/resolved status)
- Scans forward flow â Checks open forward flow PRs into
dotnet/dotnet for staleness and conflicts
- Produces summary â Counts healthy/blocked/missing PRs across both directions
â Never assume "Unknown" health means healthy. When gh API 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.
Interpreting Results
Freshness
- â
Up to date: PR has the latest VMR snapshot
- â ī¸ VMR is N commits ahead: The PR is missing updates. Check if the missing commits contain the fix you need.
- đ Forward flow coverage: Shows how many missing repos have pending forward flow PRs that would close part of the gap once merged.
Snapshot Validation
- â
Match: PR body commit matches the branch's actual "Backflow from" commit
- â ī¸ Mismatch: PR body is stale â the script automatically uses the branch-derived commit for freshness checks
- âšī¸ Initial commit only: PR body can't be verified yet (no "Backflow from" commit exists)
Staleness & Conflicts
- â
No warnings: Maestro can freely update the PR
- â ī¸ Staleness warning: A forward flow merged while this backflow PR was open. Maestro blocked further updates.
- đ´ Conflict detected: Maestro found merge conflicts. Shows conflicting files and
darc vmr resolve-conflict command.
Manual Commits
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.
Fix Tracing
When using -TraceFix:
- â
Fix is in VMR manifest: The fix has flowed to the VMR
- â
Fix is in PR snapshot: The codeflow PR already includes this fix
- â Fix is NOT in PR snapshot: The PR needs a codeflow update to get this fix
Darc Commands for Remediation
After analyzing the codeflow status, common next steps involve darc commands:
darc trigger-subscriptions --id <subscription-id> --force
darc trigger-subscriptions --id <subscription-id>
darc get-subscriptions --target-repo dotnet/sdk --source-repo dotnet/dotnet
darc get-build --id <bar-build-id>
darc vmr resolve-conflict --subscription <subscription-id>
Install darc via eng\common\darc-init.ps1 in any arcade-enabled repository.
References