Skip to content

Fix generated-output comparisons and fork comments#3077

Merged
schani merged 2 commits into
masterfrom
fix/output-diff-comment-race
Jul 22, 2026
Merged

Fix generated-output comparisons and fork comments#3077
schani merged 2 commits into
masterfrom
fix/output-diff-comment-race

Conversation

@schani

@schani schani commented Jul 22, 2026

Copy link
Copy Markdown
Member

Problems

  1. The snapshot job compared the current base tip against the contributor branch tip. When master advanced after a branch forked, unrelated base changes appeared as modified/deleted generated files. PR Fix generated-output comparisons and fork comments #3077 incorrectly reported 67 differences for this reason.
  2. workflow_run.pull_requests is empty for fork pull requests, so the trusted publisher rejected C#: add --use-records option for C# 9+ record types #3071's comparison artifact and never commented.

Fix

  • Compare the exact base snapshot against GitHub's tested PR merge commit (github.sha). This mirrors GitHub's PR diff semantics and isolates changes introduced by the PR.
  • Resolve the artifact's PR through the GitHub API and validate its base repository/branch and head repository/branch/SHA against trusted workflow_run data.

Verification

@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

No generated-output differences

✅ Generated outputs are unchanged between the PR base and head revisions.

@schani schani changed the title Fix generated-output comments for fork PRs Fix generated-output comparisons and fork comments Jul 22, 2026
@schani
schani merged commit 3df8d20 into master Jul 22, 2026
30 checks passed
@schani
schani deleted the fix/output-diff-comment-race branch July 22, 2026 18:04
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.

1 participant