Skip to content

Improve version database consistency check#51374

Merged
BillyONeal merged 5 commits into
masterfrom
version-database-consistency-check
Apr 27, 2026
Merged

Improve version database consistency check#51374
BillyONeal merged 5 commits into
masterfrom
version-database-consistency-check

Conversation

@BillyONeal

Copy link
Copy Markdown
Member

In writing the PR comment #51353 (comment) I nerd sniped myself to improve the "check for common mistakes" check to emit better instructions for updating the version database.

Fixes / changes:

  • The check should now fail if whitespace is wrong or baseline.json is in the wrong sort order.
  • The check should now fail if more than one version is added because we run x-add-version in the merge-base versions directory contents and x-add-version will only ever add one version, so there will be a diff if the user added more than one.
  • The suggested user operations completely reset "versions" to before the user edited it and have them rerun x-add-version, which means there is no need to conditionally --overwrite-version or similar. Moreover, this will generate warnings if they edited port-version more than once in a PR or similar.
  • Diffs get printed into the check "summary".

This hopefully shuts down accidentally merging changes like #51110 which cause whitespace diffs in many subsequent changes like happened in #51272

Demonstration: #51372
Demonstration: #51373

/cc @autoantwort @dg0yt

BillyONeal and others added 4 commits April 24, 2026 17:17
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@BillyONeal

Copy link
Copy Markdown
Member Author
demonstration that the whitespace mistake is caught

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances the “Check For Common Mistakes” GitHub Actions workflow to make the version database consistency check stricter and the resulting guidance more actionable for contributors updating the versions/ database.

Changes:

  • Reworks the version-db verification to reset versions/ to the PR merge-base and re-run vcpkg x-add-version to detect whitespace/sort-order issues and multi-version edits.
  • Improves CI feedback by moving generated diffs into the workflow summary and updating remediation instructions.
  • Updates the workflow runner to ubuntu-latest.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/untrustedPR.yml
Comment thread .github/workflows/untrustedPR.yml Outdated
Comment thread .github/workflows/untrustedPR.yml
Comment thread .github/workflows/untrustedPR.yml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BillyONeal BillyONeal merged commit e8c12cb into master Apr 27, 2026
16 checks passed
@BillyONeal BillyONeal deleted the version-database-consistency-check branch April 27, 2026 18:34
@bc-lee bc-lee mentioned this pull request May 5, 2026
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants