Repository: dotnet/runtime
File: .github/skills/vmr-codeflow-status/scripts/Get-CodeflowStatus.ps1 (PowerShell)

Code before:
            Write-Host "    VMR is $ahead commit(s) ahead since last merged PR" -ForegroundColor Yellow
            Write-Host "    VMR HEAD: $(Get-ShortSha $vmrHeadSha) ($vmrHeadDate)" -ForegroundColor DarkGray
            Write-Host "    Last merged VMR commit: $(Get-ShortSha $vmrCommitFromPR)" -ForegroundColor DarkGray

            # Check how long ago the last PR merged
            $mergedTime = [DateTimeOffset]::Parse($lastPR.closedAt).UtcDateTime
            $elapsed = [DateTime]::UtcNow - $mergedTime
            if ($elapsed.TotalHours -gt 6) {
                Write-Host "    ⚠️  Last PR merged $([math]::Round($elapsed.TotalHours, 1)) hours ago — Maestro may be stuck" -ForegroundColor Yellow
            }
            else {
                Write-Host "    ℹ️  Last PR merged $([math]::Round($elapsed.TotalHours, 1)) hours ago — Maestro may still be processing" -ForegroundColor DarkGray
            }
            $missingCount++
        }
    }

    # Also check open-only branches (that weren't in merged list)
    foreach ($branchName in ($openBranches.Keys | Sort-Object)) {
        if (-not $branchLastMerged.ContainsKey($branchName)) {
            if ($Branch -and $branchName -ne $Branch) { continue }
            Write-Host ""
            Write-Host "  Branch: $branchName" -ForegroundColor White
            Write-Host "    ✅ Open backflow PR #$($openBranches[$branchName]) exists" -ForegroundColor Green
            $coveredCount++
        }
    }

    # --- Forward flow: check PRs from this repo into the VMR ---
    $repoShortName = $Repository -replace '^dotnet/', ''
    Write-Host ""
    Write-Section "Forward flow PRs ($Repository → dotnet/dotnet)"

    $fwdPRsJson = gh search prs --repo dotnet/dotnet --author "dotnet-maestro[bot]" --state open "Source code updates from dotnet/$repoShortName" --json number,title --limit 50 2>$null
    $fwdPRs = @()
    if ($LASTEXITCODE -eq 0 -and $fwdPRsJson) {
        try { $fwdPRs = ($fwdPRsJson -join "`n") | ConvertFrom-Json } catch { $fwdPRs = @() }
    }
    # Filter to exact repo match (avoid dotnet/sdk matching dotnet/sdk-container-builds)
    $fwdPRs = @($fwdPRs | Where-Object { $_.title -match "from dotnet/$([regex]::Escape($repoShortName))$" })

    $fwdHealthy = 0
    $fwdStale = 0
    $fwdConflict = 0

    if ($fwdPRs.Count -eq 0) {
        Write-Host "  No open forward flow PRs found" -ForegroundColor DarkGray
    }
    else {
        foreach ($fpr in $fwdPRs) {
            $fprBranch = if ($fpr.title -match '^\[([^\]]+)\]') { $Matches[1] } else { "unknown" }

Review comment (suggestion):
PR description/title focus on Version.Details.xml snapshot fallback, but this hunk also adds a new forward-flow PR scan in `-CheckMissing` output. Please update the PR description to mention this additional behavior (or split it into a separate PR) so scope/intent are clear.

Code after:
            Write-Host "    VMR is $ahead commit(s) ahead since last merged PR" -ForegroundColor Yellow
            Write-Host "    VMR HEAD: $(Get-ShortSha $vmrHeadSha) ($vmrHeadDate)" -ForegroundColor DarkGray
            Write-Host "    Last merged VMR commit: $(Get-ShortSha $vmrCommitFromPR)" -ForegroundColor DarkGray

            # Check how long ago the last PR merged
            $mergedTime = [DateTimeOffset]::Parse($lastPR.closedAt).UtcDateTime
            $elapsed = [DateTime]::UtcNow - $mergedTime
            if ($elapsed.TotalHours -gt 6) {
                Write-Host "    ⚠️  Last PR merged $([math]::Round($elapsed.TotalHours, 1)) hours ago — Maestro may be stuck" -ForegroundColor Yellow
            }
            else {
                Write-Host "    ℹ️  Last PR merged $([math]::Round($elapsed.TotalHours, 1)) hours ago — Maestro may still be processing" -ForegroundColor DarkGray
            }
            $missingCount++
        }
    }

    # Also check open-only branches (that weren't in merged list)
    foreach ($branchName in ($openBranches.Keys | Sort-Object)) {
        if (-not $branchLastMerged.ContainsKey($branchName)) {
            if ($Branch -and $branchName -ne $Branch) { continue }
            Write-Host ""
            Write-Host "  Branch: $branchName" -ForegroundColor White
            Write-Host "    ✅ Open backflow PR #$($openBranches[$branchName]) exists" -ForegroundColor Green
            $coveredCount++
        }
    }

    # --- Forward flow: check PRs from this repo into the VMR ---
    $repoShortName = $Repository -replace '^dotnet/', ''
    Write-Host ""
    Write-Section "Forward flow PRs ($Repository → dotnet/dotnet)"

    $fwdPRsJson = gh search prs --repo dotnet/dotnet --author "dotnet-maestro[bot]" --state open "Source code updates from dotnet/$repoShortName" --json number,title --limit 10 2>$null
    $fwdPRs = @()
    if ($LASTEXITCODE -eq 0 -and $fwdPRsJson) {
        try { $fwdPRs = ($fwdPRsJson -join "`n") | ConvertFrom-Json } catch { $fwdPRs = @() }
    }
    # Filter to exact repo match (avoid dotnet/sdk matching dotnet/sdk-container-builds)
    $fwdPRs = @($fwdPRs | Where-Object { $_.title -match "from dotnet/$([regex]::Escape($repoShortName))$" })

    $fwdHealthy = 0
    $fwdStale = 0
    $fwdConflict = 0

    if ($fwdPRs.Count -eq 0) {
        Write-Host "  No open forward flow PRs found" -ForegroundColor DarkGray
    }
    else {
        foreach ($fpr in $fwdPRs) {
            $fprBranch = if ($fpr.title -match '^\[([^\]]+)\]') { $Matches[1] } else { "unknown" }