Skip to content

[skill] Use Version.Details.xml as VMR snapshot fallback for manual backflow#124129

Merged
lewing merged 3 commits intomainfrom
lewing/vd-xml-fallback
Feb 8, 2026
Merged

[skill] Use Version.Details.xml as VMR snapshot fallback for manual backflow#124129
lewing merged 3 commits intomainfrom
lewing/vd-xml-fallback

Conversation

@lewing
Copy link
Member

@lewing lewing commented Feb 7, 2026

Version.Details.xml as primary VMR snapshot source + forward flow scanning

Problem

The codeflow status script relied on PR body metadata and commit messages to determine the VMR snapshot. When manual backflow was used (e.g., \darc vmr backflow\ pushed directly), the PR body was stale and commit messages didn't follow the expected format, causing incorrect freshness reporting.

Changes

Commit 1: VD.xml as primary snapshot

  • \�ng/Version.Details.xml\ (<Source Sha=...>) is now checked first as the authoritative snapshot source
  • XML parser with regex fallback, 40-char SHA validation
  • Commit messages are secondary confirmation, PR body is last resort
  • Case-insensitive SHA comparison throughout
  • \2>\\ for stderr isolation on all \gh\ calls

Commit 2: Forward flow scanning in -CheckMissing

  • -CheckMissing\ now scans open forward flow PRs (product repo → dotnet/dotnet)
  • Detects conflicts and staleness via Maestro comment scanning
  • Combined summary showing backflow + forward flow health

Testing

  • VD.xml: Tested against sdk#52727 (manual backflow mismatch), sdk#52885 (conflicted), aspnetcore#65338 (deleted branch), runtime#124098 (normal), sourcelink#1581 (fresh)
  • Forward flow: Tested against dotnet/sdk (4 PRs: 2 healthy, 1 stale, 1 conflict) and dotnet/runtime (3 PRs: 2 healthy, 1 stale)

Cross-repo context: dotnet/sdk#52727, dotnet/sdk#52885

Copilot AI review requested due to automatic review settings February 7, 2026 07:29
@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 7, 2026
@lewing lewing added the area-skills Agent Skills label Feb 7, 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

Improves reliability of GitHub “skills” automation scripts by (1) making VMR snapshot detection resilient to manual backflow commit message formats and (2) working around a Helix API artifact URI bug for subdirectory files.

Changes:

  • Add a fallback to read eng/Version.Details.xml on the PR branch to infer the VMR snapshot SHA when commit messages aren’t parseable.
  • Improve snapshot validation messaging (identify whether snapshot came from commit messages vs Version.Details.xml).
  • Rebuild Helix artifact file URIs from FileName for subdirectory artifacts and document the known Helix API issue.

Reviewed changes

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

File Description
.github/skills/vmr-codeflow-status/scripts/Get-CodeflowStatus.ps1 Adds Version.Details.xml fallback and refines snapshot validation/status output.
.github/skills/azdo-helix-failures/scripts/Get-HelixFailures.ps1 Workaround for broken Helix artifact URIs for files in subdirectories by reconstructing URLs.
.github/skills/azdo-helix-failures/references/helix-artifacts.md Documents the Helix API bug and the script’s workaround.

@lewing lewing force-pushed the lewing/vd-xml-fallback branch 2 times, most recently from b9b70b4 to 3090c43 Compare February 7, 2026 07:40
Copilot AI review requested due to automatic review settings February 7, 2026 07:40
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 no new comments.

@lewing lewing force-pushed the lewing/vd-xml-fallback branch from 3090c43 to 3969355 Compare February 7, 2026 07:47
@lewing lewing changed the title Use Version.Details.xml as VMR snapshot fallback for manual backflow [skill] Use Version.Details.xml as VMR snapshot fallback for manual backflow Feb 7, 2026
@lewing lewing removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Feb 7, 2026
Copilot AI review requested due to automatic review settings February 7, 2026 07:52
@lewing lewing force-pushed the lewing/vd-xml-fallback branch from 3969355 to b5e3166 Compare February 7, 2026 07:52
@lewing lewing force-pushed the lewing/vd-xml-fallback branch 2 times, most recently from 2fa670d to 33ae35f Compare February 7, 2026 07:55
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 1 out of 1 changed files in this pull request and generated 4 comments.

@lewing lewing force-pushed the lewing/vd-xml-fallback branch from 33ae35f to 0062b79 Compare February 7, 2026 07:59
@lewing lewing force-pushed the lewing/vd-xml-fallback branch from 0062b79 to c0c18fd Compare February 7, 2026 16:59
Copilot AI review requested due to automatic review settings February 7, 2026 17: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 2 out of 2 changed files in this pull request and generated 4 comments.

Version.Details.xml's <Source Sha=...> is the authoritative record of
which VMR commit a product repo branch is based on. Previously the script
treated it as a fallback after commit message parsing. Now it's checked
first, with commit messages as secondary confirmation.

This correctly handles:
- Manual backflow (darc vmr backflow pushed directly)
- Normal codeflow (Maestro-managed)
- Conflicted PRs (VD.xml reflects pre-codeflow state)
- Forward flow PRs (skips VD.xml, uses commit messages)

Tested against sdk#52727 (manual backflow) and sdk#52885 (conflicted).
-CheckMissing now scans open forward flow PRs (product repo → dotnet/dotnet)
in addition to missing backflow PRs. For each forward flow PR it detects:
- Conflict (Maestro 'Conflict detected' comment)
- Staleness (opposite codeflow merged while PR was open)
- Healthy (no issues)

Summary section now shows both directions.

Also fixes: dotnet-maestro comment author matching (gh CLI returns
'dotnet-maestro' not 'dotnet-maestro[bot]' for login field).

Tested against dotnet/sdk (4 forward PRs: 2 healthy, 1 stale, 1 conflict)
and dotnet/runtime (3 forward PRs: 2 healthy, 1 stale).
@lewing lewing force-pushed the lewing/vd-xml-fallback branch from 5cc04ae to adc8cb1 Compare February 7, 2026 17:19
Copilot AI review requested due to automatic review settings February 7, 2026 17:21
@lewing lewing force-pushed the lewing/vd-xml-fallback branch from 6daddd0 to 9d21ee3 Compare February 7, 2026 17:23
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 2 out of 2 changed files in this pull request and generated 4 comments.

Comments suppressed due to low confidence (1)

.github/skills/vmr-codeflow-status/scripts/Get-CodeflowStatus.ps1:265

  • Forward-flow lookup derives $repoShortName by stripping only the dotnet/ prefix. If -Repository is ever used with a non-dotnet/* repo, this produces an invalid search string (e.g., dotnet/otherOwner/repo). Consider deriving the repo name via ($Repository -split '/',2)[1] (or parsing owner/name once) so the search is robust and independent of the owner.
            Write-Host "    ✅ Open backflow PR #$($openBranches[$branchName]) exists" -ForegroundColor Green
            $coveredCount++

- Use 2>$null instead of 2>&1 for gh pr view to prevent stderr
  corrupting JSON stream
- Wrap ConvertFrom-Json in try/catch for forward flow PR details
- Tighten regex fallback to require exactly 40-char hex SHA
- Use case-insensitive StringComparison for SHA matching
@lewing lewing force-pushed the lewing/vd-xml-fallback branch from 9d21ee3 to 7ed5756 Compare February 8, 2026 01:35
@lewing lewing requested a review from steveisok February 8, 2026 02:41
@lewing lewing merged commit 77d947a into main Feb 8, 2026
18 checks passed
@lewing lewing deleted the lewing/vd-xml-fallback branch February 8, 2026 02:44
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.

2 participants