Skip to content

chore(ci): add hardened trusted-bot auto-merge tier#7

Merged
ANcpLua merged 1 commit into
mainfrom
chore/hardened-trusted-bot-lane
May 5, 2026
Merged

chore(ci): add hardened trusted-bot auto-merge tier#7
ANcpLua merged 1 commit into
mainfrom
chore/hardened-trusted-bot-lane

Conversation

@ANcpLua

@ANcpLua ANcpLua commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

Re-introduces ai-agent-auto-merge as Tier 2 in the reusable workflow, but with a trust model qualitatively different from the version dropped in #6.

Why

The original lane used github.actor + branch prefix. A human pushing a branch named claude/foo from their own account satisfied that condition — that's why dropping it was the right call at the time.

The version this PR adds requires all three of:

  1. pull_request.user.login matches a known bot identity (copilot[bot], jules[bot], or claude-code[bot]) — immutable original author, not spoofable on re-runs
  2. Branch prefix matches the agent (copilot/, jules/, claude/) — intent signal
  3. PR is not in draft

That's a trusted-bot pattern (same trust shape as Tier 1a/1b for Dependabot/Renovate), not a rubber-stamp.

Why now (and why not later)

coderabbit-auto-merge (Tier 3) and per-PR claude-review actions are the proper independent-reviewer approach. But today:

  • CodeRabbit App is not installed on ANcpLua.NET.Sdk, Roslyn.Utilities, Analyzers, Agents
  • Anthropic backend is flaking the claude-review action class (also affecting /ultrareview)

So agent-authored fix PRs would currently sit forever waiting for a review that never lands. This trusted-bot tier provides a pragmatic fast lane while those gaps close.

When CodeRabbit is everywhere AND the Anthropic action is reliable, this tier can be dropped again — it's intentionally additive, not load-bearing for any other tier.

Diff shape

  • 1 file changed
  • Tier numbering shifts: 1a/1b stay, trusted-bot is new Tier 2, CodeRabbit becomes Tier 3, Owner becomes Tier 4

Coordinated PRs

This unblocks four thin-caller drafts that consume the reusable:

And qyl#186 which converts qyl from standalone to thin-caller (drops its own ai-agent block now that the reusable carries the hardened version).

Test plan

  • CI green on this PR
  • After merge: open a PR from a claude/* branch authored by a non-bot user, confirm Tier 2 does NOT match
  • After merge: confirm an actual claude-code[bot]-authored claude/* PR matches Tier 2 and auto-merges
  • Confirm Tiers 1a, 1b, 3, 4 unchanged

Re-introduces ai-agent-auto-merge as Tier 2, but with a trust model
qualitatively different from the version dropped in #6:

- Keys off `pull_request.user.login` (immutable original author) instead
  of `github.actor` (whoever triggered the workflow run, spoofable on
  re-runs).
- Requires bot identity AND branch prefix AND not-draft. A human pushing
  a branch named `claude/foo` from their own account no longer satisfies
  the condition because they aren't `claude-code[bot]`.
- App token threaded through the same approval/merge sequence the other
  tiers use; no GITHUB_TOKEN identity for the merge action.

This is the "trusted-bot fast lane" referenced in qyl#186 — established
bot identities with verified intent get an auto-approve + auto-merge,
which is necessary while CodeRabbit isn't installed on every framework
repo and the per-PR claude-review action is unreliable. Once those gaps
close, this tier can be dropped again in favor of pure reviewer-driven
merges.

Tier numbering: dependabot stays 1a, renovate stays 1b, trusted-bot is
the new Tier 2, CodeRabbit becomes Tier 3, Owner becomes Tier 4.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 5, 2026 18:25
@ANcpLua
ANcpLua merged commit 25b2825 into main May 5, 2026
8 checks passed
@ANcpLua
ANcpLua removed the request for review from Copilot May 5, 2026 18:46
@ANcpLua
ANcpLua deleted the chore/hardened-trusted-bot-lane branch May 5, 2026 19:15
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