Skip to content

CI: labels and assignee for PRs of the coverage agent - #124393

Merged
alexbakharew merged 2 commits into
masterfrom
abakharew/ci-agent-pr-labels-assignee
Oct 7, 2026
Merged

alexbakharew merged 2 commits into
masterfrom
abakharew/ci-agent-pr-labels-assignee

Conversation

@alexbakharew

@alexbakharew alexbakharew commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

PRs that the coverage agent opens under the clickgapai account on branches covgap/* need three things that the agent's own token cannot set, because the account has no triage rights on the repository: the label can be tested, so that CI runs for an account outside trusted_contributors.json; the label ci-force-all, so that a test-only PR gets the full CI run; and the human owner as assignee, who answers reviewers (the agent never does, per AI_POLICY.md).

The label hook runs with the CI bot's rights and before the trust gate, so it sets all three. The rule is data-driven (AGENT_PRS), keyed by the agent login and a branch prefix: other agents that share the account, such as ClickGap on qa-bot/*, are not affected, and the account itself gains no standing.

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...


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

Version info

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

PRs that the coverage agent opens under the `clickgapai` account on branches
`covgap/*` need three things that the agent's own token cannot set, because the
account has no triage rights on the repository: the label `can be tested`, so
that CI runs for an account outside `trusted_contributors.json`; the label
`ci-force-all`, so that a test-only PR gets the full CI run; and the human owner
as assignee, who answers reviewers (the agent never does, per `AI_POLICY.md`).

The label hook runs with the CI bot's rights and before the trust gate, so it
sets all three. The rule is data-driven (`AGENT_PRS`), keyed by the agent login
and a branch prefix: other agents that share the account, such as ClickGap on
`qa-bot/*`, are not affected, and the account itself gains no standing.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@alexbakharew
alexbakharew requested a review from maxknv October 7, 2026 09:49
@clickhouse-gh

clickhouse-gh Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [a9300ab]

Summary: ✅


AI Review

Summary

This PR adds a data-driven allowlist for clickgapai pull requests on covgap/*, auto-applies the ci-force-all / can be tested labels, and assigns the human owner. The follow-up change in trusted.py fixes the earlier first-run failure by teaching can_be_tested about the same allowlist, and I do not see any remaining correctness or trust-boundary bugs in the current diff.

PR Metadata
  • 💡 Changelog category should be CI Fix or Improvement (changelog entry is not required) instead of Not for changelog (changelog entry is not required), because this patch changes CI workflow behavior.
  • Changelog entry is not required for the CI category, so leaving ... here is acceptable once the category is corrected.
Final Verdict

✅ No blocking findings in the current code. The only issue I would still clean up before merge is the changelog-category mismatch above.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Oct 7, 2026
@clickhouse-gh clickhouse-gh Bot added the comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). label Oct 7, 2026
… the label hook

The PR workflow runs `can_be_tested` as its first pre-hook and the label hook
fourth, so the label `can be tested` added by the label hook came too late for
the first run of an agent PR: `Config Workflow` failed with "'can be tested'
label is required". `can_be_tested` now consults the same `AGENT_PRS` rules
through `agent_pr_rules`, so a registered agent PR passes the trust check on
the first run. The label hook keeps adding the label for visibility.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@alexbakharew
alexbakharew enabled auto-merge October 7, 2026 10:52
@alexbakharew
alexbakharew added this pull request to the merge queue Oct 7, 2026
Merged via the queue into master with commit 412f9c1 Oct 7, 2026
152 checks passed
@alexbakharew
alexbakharew deleted the abakharew/ci-agent-pr-labels-assignee branch October 7, 2026 12:50
@robot-ch-test-poll3 robot-ch-test-poll3 added the pr-synced-to-cloud The PR is synced to the cloud repo label Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). pr-not-for-changelog This PR should not be mentioned in the changelog 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.

3 participants