Skip to content

Handle PRs rejected by the merge queue in the PR continuation tooling - #123379

Merged
alexey-milovidov merged 1 commit into
masterfrom
continue-pr-merge-queue-rejections
Oct 2, 2026
Merged

alexey-milovidov merged 1 commit into
masterfrom
continue-pr-merge-queue-rejections

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

The merge queue re-tests a PR merged with the latest base branch, so it can reject a PR whose own CI is green, typically because of a semantic conflict with master: a newly added test that pins behaviour the PR changes, or an API the PR uses that changed. Such a PR stays CLEAN and green, so none of the PR continuation tooling noticed it:

  • utils/continue-all-prs.sh reported such a PR as GREEN and never dispatched it. The GraphQL pre-check now also reads the latest merge-queue event. If the PR was removed (for any reason other than merged) after its last commit, is not back in the queue, and the current user hasn't commented since, that is a pending item naming the tested merge-queue commit. The triage prompt now says that a clean merge alone does not resolve it.
  • .claude/tools/fetch_ci_report.js with a PR URL showed only the PR workflow. It now detects the removal, takes the MergeQueueCI report link from the statuses of the tested commit, and adds that run's failed jobs to the output. It also had a second bug: it took report links from the newest bot comment that had any. A later :build-profile-diff: comment therefore hid the whole PR workflow, and only "Build profile diff" was shown. The :report: comment is now preferred, and every top-level report is expanded into its jobs.
  • The continue-pr and continue-pr-auto skills now check for a merge-queue rejection first in step 4, explain how to reach its report, and merge the base branch for it in step 3.

Checked against the two PRs that motivated this. For each, the pre-check reports the removal and fetch_ci_report.js shows the failing merge-queue job:

Related: #117667
Related: #120910

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/123379]

Version info

  • Merged into: 26.10.1.1317-master (included in 26.10 and later)

The merge queue re-tests a PR merged with the latest base branch, so it can
reject a PR whose own CI is green, typically because of a semantic conflict
with the base branch: a newly added test that pins behaviour the PR changes,
or an API the PR uses that changed. Such a PR stays `CLEAN` and green, so
nothing in the tooling noticed it:

- `utils/continue-all-prs.sh` reported it as `GREEN` and never dispatched it.
  The pre-check now also reads the latest merge-queue event; a removal (other
  than `merged`) after the last commit, with the PR not back in the queue and
  no comment from the current user since, is a pending item that names the
  tested merge-queue commit. The triage prompt says that a clean merge alone
  does not resolve it.
- `.claude/tools/fetch_ci_report.js` with a PR URL showed only the PR workflow.
  It now detects the removal, takes the `MergeQueueCI` report link from the
  statuses of the tested commit, and adds that run's failed jobs. It also took
  the report links from the newest bot comment that had any, so a later
  `:build-profile-diff:` comment hid the whole PR workflow (only "Build profile
  diff" was shown); the `:report:` comment is now preferred, and every
  top-level report is expanded into its jobs.
- The `continue-pr` and `continue-pr-auto` skills now check for a merge-queue
  rejection first in step 4, explain how to reach its report, and merge the
  base branch for it in step 3.

Examples: #117667 (merge-queue
`Fast test` failed on `05315_jit_multiif_decimal_scale_lift_overflow`, added on
`master`) and #120910 (merge-queue
`Build (amd_binary)` failed because `master` changed the type of
`read_until_position`).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ec11445]

Summary: ✅


AI Review

Summary

This PR teaches continue-all-prs, the continue-pr skills, and fetch_ci_report.js to notice merge-queue rejections on otherwise-green PRs. The direction is good and the helper now does surface the motivating failures, but two issues still make the new workflow unreliable in practice: the PR-URL path explodes an all-green PR workflow into every concrete job before it shows the single failing MergeQueueCI child, and the new skill text tells agents to hand-build a job.log S3 path that does not match Praktika’s artifact layout.

Findings

⚠️ Majors

  • [.claude/tools/fetch_ci_report.js:812] The new merge-queue path now runs the common green-PR, red-MergeQueueCI case through the all-green PR fan-out. On the motivating examples (#117667 / #120910), node .claude/tools/fetch_ci_report.js <pr-url> --failed expanded the green PR workflow into 146 concrete job reports before the single failing MergeQueueCI child, so the new diagnosis path is slow and noisy instead of focused. Suggested fix: when another top-level workflow already contributes failed children (or when --failed is set), keep the all-green PR aggregator collapsed instead of expanding every green child.
  • [.claude/skills/continue-pr/SKILL.md:180] The new direct-log example hardcodes .../mergequeueci/<job>/job.log, but Praktika puts attached files under an extra normalized sub-result segment. Real failures do not live at that path — for example the Build ClickHouse log for the motivating Build (amd_binary) rejection is under .../mergequeueci/build_amd_binary/build_clickhouse/build_clickhouse.log. Suggested fix: tell the reader to follow the links from result_<job>.json or use node .claude/tools/fetch_ci_report.js <report> --links / --download-logs instead. The same broken path is duplicated in .claude/skills/continue-pr-auto/SKILL.md:237.
Final Verdict
  • Status: ⚠️ Request changes
  • Minimum required actions:
    • Keep the default PR-URL path focused on the merge-queue failure instead of expanding every green PR job.
    • Fix the new skill text so it does not send agents to a nonexistent hand-built job.log URL.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Oct 2, 2026
Comment thread .claude/tools/fetch_ci_report.js Resolved
Comment thread .claude/skills/continue-pr/SKILL.md Resolved
@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Oct 2, 2026
@alexey-milovidov alexey-milovidov self-assigned this Oct 2, 2026

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok.

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok.

@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Oct 2, 2026
Merged via the queue into master with commit 26090bf Oct 2, 2026
149 checks passed
@alexey-milovidov
alexey-milovidov deleted the continue-pr-merge-queue-rejections branch October 2, 2026 19:37
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 2, 2026
robinld pushed a commit to robinld/ClickHouse that referenced this pull request Oct 4, 2026
Address the review of ClickHouse#123379:

- `.claude/tools/fetch_ci_report.js` with a PR URL expanded the all-green `PR`
  workflow into all its ~146 green job reports even when the `MergeQueueCI`
  run of a PR rejected by the merge queue contributed the failed job, burying
  the one failure that matters. An all-green top-level report is now expanded
  only when no other workflow has failed jobs; for the merge-queue rejection of
  ClickHouse#120910 the output shrinks from
  147 reports to the single failed `Build (amd_binary)` job.
- The `continue-pr` and `continue-pr-auto` skills suggested building the log
  URL as `.../mergequeueci/<job>/job.log`, but Praktika stores attached files
  under normalized sub-result directories, so such a URL returns
  `AccessDenied`. They now say to follow the `links` of the failed results
  (as printed by `fetch_ci_report.js`, also with `--links`) or to use
  `--download-logs`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@clickhouse-gh clickhouse-gh Bot added comp-ai-tooling Tooling of AI coding agents in the repository: skills, hooks, permission settings, instructions a... and removed comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ai-tooling Tooling of AI coding agents in the repository: skills, hooks, permission settings, instructions a... pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants