Skip to content

Add official build freshness check to vmr-codeflow-status skill#124146

Merged
lewing merged 11 commits intomainfrom
lewing/vmr-codeflow-build-freshness
Feb 8, 2026
Merged

Add official build freshness check to vmr-codeflow-status skill#124146
lewing merged 11 commits intomainfrom
lewing/vmr-codeflow-build-freshness

Conversation

@lewing
Copy link
Member

@lewing lewing commented Feb 8, 2026

Summary

Adds official build freshness checking, improved conflict/staleness detection, and better diagnostic output to the vmr-codeflow-status Copilot skill.

Motivation

When investigating widespread backflow staleness across dotnet repos, the root cause is often broken VMR official builds — not Maestro subscription issues. The skill previously had no way to surface this, leading to misleading "Maestro may be stuck" warnings. Open backflow PRs were also reported as healthy even when they had unresolved conflicts.

Changes

Build freshness check (Get-VMRBuildFreshness)

  • Queries aka.ms/dotnet/{channel}/daily/dotnet-sdk-win-x64.zip (301 redirect → ci.dot.net blob)
  • HEADs the blob to get Last-Modified timestamp = last successful official build publish
  • Maps VMR branches to aka.ms channels (main, preview, release)
  • Uses HttpClient throughout (no Invoke-WebRequest mixing), 15-second timeouts, proper disposal
  • Shown before per-branch analysis so users understand upstream context first

Smarter conflict/staleness detection (Get-CodeflowPRHealth)

  • Shared helper checks both backflow and forward flow PRs
  • Detects conflict/staleness from Maestro comments, then checks Codeflow verification status
  • Correctly distinguishes active conflicts from resolved ones ("✅ Conflict resolved")
  • Staleness resolution requires commits after the warning (not just Codeflow verification)
  • Open backflow PRs are now checked for health (previously just "✅ exists")

Better diagnostic messaging

  • When builds are stale: "backflow blocked upstream" instead of "Maestro may be stuck"
  • dotnet/dotnet self-check skips nonsensical self-backflow, shows only build freshness
  • Forward flow shows resolution status: "Conflict resolved", "Updated since staleness warning"

New: references/vmr-build-topology.md

Reference doc covering build pipeline structure, aka.ms technique, channel mapping, Version.Details.xml cross-referencing, darc validation, diagnosis patterns, bootstrap problem, and common failures.

Bug fixes

  • Merged PR selection uses closedAt comparison (not gh search --sort updated order)
  • gh search failures warn explicitly instead of silently treating as empty results
  • HttpResponseMessage objects properly disposed in all code paths

SKILL.md

  • Added Prerequisites section
  • Expanded Key Parameters table
  • Documented build freshness check in "What the Script Does"

Copilot AI review requested due to automatic review settings February 8, 2026 17:57
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 8, 2026
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

Adds an “official build freshness” signal to the vmr-codeflow-status skill to help distinguish missing backflow PRs caused by Maestro delays vs. broken VMR official builds, and documents the relevant VMR build topology/codeflow concepts.

Changes:

  • Introduces Get-VMRBuildFreshness and integrates it into -CheckMissing flow to query aka.ms redirects and blob Last-Modified timestamps.
  • Improves backflow PR selection logic (uses closedAt) and makes gh search failures explicitly warn.
  • Adds/updates reference documentation (vmr-codeflow-reference.md, vmr-build-topology.md) and expands SKILL.md.

Reviewed changes

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

File Description
.github/skills/vmr-codeflow-status/scripts/Get-CodeflowStatus.ps1 New/updated script implementing missing-backflow detection, forward-flow scanning, and official build freshness checks.
.github/skills/vmr-codeflow-status/references/vmr-codeflow-reference.md New reference explaining codeflow concepts, metadata, and common remediation commands.
.github/skills/vmr-codeflow-status/references/vmr-build-topology.md New reference describing public vs official VMR builds and the aka.ms freshness technique.
.github/skills/vmr-codeflow-status/SKILL.md Skill documentation updates (frontmatter/license, prerequisites, parameters, and behavior description).

- Add Get-VMRBuildFreshness function that checks aka.ms shortlinks to
  determine when the last successful official VMR build was published
- Integrate into CheckMissing mode: automatically reports build freshness
  when missing backflow PRs are detected
- Add vmr-build-topology.md reference doc covering build pipeline structure,
  channel-to-branch mapping, bootstrap chicken-and-egg problem, and
  diagnostic patterns
- Fix merged PR selection to use closedAt instead of search sort order
- Add explicit error handling when gh search fails (auth/rate-limit)
- Set HTTP timeouts (15s) and proper HttpClient disposal
- Update SKILL.md: add license, prerequisites, expanded parameter docs
@lewing lewing force-pushed the lewing/vmr-codeflow-build-freshness branch from 6c41176 to b7009c4 Compare February 8, 2026 18:04
@lewing lewing added area-skills Agent Skills and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Feb 8, 2026
Copilot AI review requested due to automatic review settings February 8, 2026 18:09
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@lewing
Copy link
Member Author

lewing commented Feb 8, 2026

it appears @copilot doesn't understand the license frontmatter yet

● ⚠ The following skills have warnings:
    • C:\Users\lewing\.copilot\skills\vmr-codeflow-status\SKILL.md: unknown field ignored: license

…check

Replaces Invoke-WebRequest with HttpClient HEAD for consistency.
Fixes Nullable<DateTimeOffset> handling in PowerShell (unwrapped
automatically, so .Value doesn't work — must cast instead).
Copilot AI review requested due to automatic review settings February 8, 2026 18:25
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

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

…rting

Previously the script flagged PRs as conflicted/stale based on Maestro
comments alone. When someone resolves the conflict (e.g. via darc vmr
resolve-conflict), no new comment is posted, but the Codeflow
verification check turns green. Now checks that status before reporting,
and shows 'Conflict resolved' when applicable.
…elper

Previously open backflow PRs got a blanket '✅ exists' without checking
if they had unresolved conflicts or staleness. Now uses the same
Get-CodeflowPRHealth helper for both backflow and forward flow PRs,
which checks Maestro comments and Codeflow verification status.
Copilot AI review requested due to automatic review settings February 8, 2026 18:51
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

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

- Show build freshness BEFORE per-branch analysis for upstream context
- Say 'backflow blocked upstream' instead of 'Maestro may be stuck' when
  official builds are stale (the real root cause)
- Fix staleness resolution: only clear conflict on Codeflow verification
  SUCCESS, staleness needs commits after the warning to be 'resolved'
- Skip self-backflow check for dotnet/dotnet (nonsensical), just show
  build freshness
- Extract Get-CodeflowPRHealth into reusable helper
…lure, summary wording

- Move HEAD request disposal into finally blocks (handles timeout/error)
- Fix codeflowCheck array bug: Select-Object -First 1 for safe boolean test
- Return 'Unknown' instead of 'Healthy' when API calls fail
- Tighten repo validation regex to [A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+
- Split summary: 'blocked open PRs' vs 'MISSING backflow PRs'
- Remove stale 'CI status' comment from Get-CodeflowPRHealth
Copilot AI review requested due to automatic review settings February 8, 2026 19:10
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

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

- Don't count 'Unknown' health status as healthy/covered in backflow
  or forward flow counters (3 spots)
- Verified gh pr checks uses 'state' field (not 'conclusion') — SUCCESS
  is the correct value to check
- Review feedback: copilot-pull-request-reviewer round 4
Copilot AI review requested due to automatic review settings February 8, 2026 19:22
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

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

- Staleness resolution now parses timestamps as DateTimeOffset for
  robust comparison instead of lexicographic string comparison
- Cache PR body in first pass to avoid double-fetching in per-branch loop
- Review feedback: copilot-pull-request-reviewer round 5
@lewing lewing merged commit bb9ae8f into main Feb 8, 2026
17 checks passed
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.

3 participants