Repository navigation
Keep a finished docs review from resetting to queued on the PR menu - #8827
Merged
Merged
Conversation
A refresh after a push passes no status override and finds no check run on the PR head commit, so the menu fell back to "Status: queued." and replaced the completed status. The menu now keeps the status already in the comment. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
Member
Author
|
@bmorelli25 This fixes one of the issues identified by @vishaangelova. Could you approve? |
A review with no findings posts its summary as a regular PR comment, not as a PR review, so the menu gave no sign that the review had run. After a successful review the menu now checks what the bot posted since the box was ticked and reads "Status: completed, no findings." when only the summary comment exists. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
technige
approved these changes
Oct 14, 2026
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.
Summary
The AI PR menu keeps a finished docs review's status after a push, and it says
Status: completed, no findings.when the review posted only its summary comment.Why
The menus on #8742, #8757, and #8208 all said
Status: queued.although the reviews posted. The edit history of each menu comment shows the same sequence. The post-review job writesStatus: completed.. Between 6 and 30 minutes later, a push triggers thePost or refresh AI PR menujob throughDocs PR AI menu (collect). That job refreshes the menu with no status override and finds noDocs AIcheck run on the PR head commit, andgetStatusTexthas no fallback to the status already in the comment, so it writesStatus: queued.. The issue menu script has that fallback.The two reviews that looked like they never ran, #8186 and #8385, did run. A review with no findings posts its "Docs review summary" as a regular PR comment, not as a PR review. The menu stayed on "queued", so nothing showed that the review had finished.
What
A finished status survives a refresh
getStatusTextin.github/scripts/docs_pr_ai_menu.cjskeeps the status already in the comment when the box is ticked and the status is neither "not started" nor "queued". An unticked menu still reads "not started", and an explicit override still wins.The menu shows the outcome of a finished review
getDocsReviewOutcomelooks at whatgithub-actions[bot]posted since the box was ticked, using the menu comment'supdated_atfrom the event payload as the start time. A PR review means findings, so the text staysStatus: completed.. A "## Docs review summary" issue comment and no review means no findings, so the text becomesStatus: completed, no findings..upsertMenuCommentruns this only for a successful completed override, so a failed or cancelled job makes no API calls. If the lookup throws, the menu falls back toStatus: completed.with a warning. No change todocs-pr-ai-menu.ymlis needed.Out of scope: A run that leaves nothing visible, for example a
noopwhen no markdown file is eligible, still showsStatus: completed.. I cannot tell it apart from a silent failure. #8385 run 1 is such a run. The status also stays "completed" after a later push, even if the new commit has not been reviewed. The check-run lookup on the PR head commit is unchanged.Verify
Tested with local Node checks, which are not committed. I ran the script from
mainand from this branch throughupsertMenuCommentwith a mocked GitHub client and a real menu body from #8742.The six cases from the previous commit give the same text before and after this commit. I also ran the real
getDocsReviewOutcomeagainst live PRs, with the start time set to the tick time from each menu's edit history and the data cut off when the run completed:I read these PRs before I wrote down what each run should return, so this shows that the logic reproduces what I saw. It is not an independent test.
Not tested: the workflows themselves, the
github.paginatecalls in a realgithub-scriptstep, and whethercontext.payload.comment.updated_atequals the tick time in a liveissue_commentevent. The comparison reads that field and not the review's start time.Related to elastic/docs-eng-team#1035
Generative AI disclosure
Tool(s) and model(s) used: Claude Code (Claude Sonnet 5.5)
🤖 Generated with Claude Code