Repository navigation
Comment on the newest run for the PR branch to fix lost and stale changelog comments - #422
Merged
Merged
Conversation
Each comment job read the artifact of the run that triggered it. An older run's job could land last and overwrite a newer decision, and the caller's concurrency group could cancel the job of the newest run and leave nobody to post it. Every job now resolves the newest completed run of the workflow for the PR branch and comments on that, whichever run triggered the job. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Requesting changes: the new run-selection and artifact checks currently swallow API/query failures, which can cause stale decisions to be posted or expected comments to be skipped silently.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
theletterf
approved these changes
Oct 14, 2026
A failed run listing fell back to the triggering run, which could post a stale decision, and a failed artifact listing became exists=false, which skipped the comment silently. Both calls are now retried and then fail the step with an error, so a query failure no longer reads as "nothing found". Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
There was a problem hiding this comment.
Approved — no remaining actionable issues found on the current revision.
What is this? | From workflow: PR Review
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The changelog comment job now posts the newest completed run's decision for the PR branch, whichever run triggered the job. This removes two races that leave a wrong or missing changelog comment when runs start close together.
Why
Each comment job downloaded the artifact of the run that triggered it, and skipped itself only if a newer run existed for the same commit. Two cases slipped through:
entries-invalidcomment that the second commit had just posted.What
Resolve the run to comment on
changelog/comment/action.ymllists the workflow's runs for the PR's head repository and branch, ignores cancelled runs, and takes the newest. Whichever job survives posts that run's artifact. If the newest run is still in progress, the job skips, because that run's own completion triggers another job. If the list is empty, the job falls back to the triggering run. Branch values reach the script throughenv, not through the expression.Out of scope: The caller templates keep their concurrency group. It still serializes the comment jobs of different upstream workflows on one PR.
Verify
workflow_runworkflows run from the default branch, so this cannot run end to end from a PR branch. I ran the extracted script against live runs inelastic/docs-playground-release-notes-tagged, replaying the failure above:The selection was also checked against a fixture with a cancelled run, a run from another fork, a newer in-progress run, and no runs.
zizmorreports no findings.After merge, open a PR in a repository that uses the release notes workflows, add two labels at once, and push twice within a second. The final comment should match the last run.
🤖 Generated with Claude Code