Skip to content

ci: add dogfood do-not-merge and pr-issue-linkage gate callers - #133

Merged
kyle-sexton merged 1 commit into
mainfrom
ci/gate-callers
Jul 17, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
ci/gate-callers

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Rolls out the shared merge gates to this repo per the fleet-wide caller checklists (#120, #121). Callers pin each reusable's merge SHA rather than a local path so the gate cannot be redefined by the change it gates; the pr-issue-linkage caller takes the -self filename because the reusable owns pr-issue-linkage.yml (mirrors claude-review-self.yml). Public repo: the gates run on the reusable's hosted default runner.

No linked issue.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01K3QehVwmWzkBLpKokNCkkt

Rolls out the shared merge gates to this repo per the fleet-wide caller
checklists (#120, #121). Callers pin each reusable's merge SHA rather
than a local path so the gate cannot be redefined by the change it
gates; the pr-issue-linkage caller takes the -self filename because the
reusable owns pr-issue-linkage.yml (mirrors claude-review-self.yml).
Public repo — the gates run on the reusable's hosted default runner.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01K3QehVwmWzkBLpKokNCkkt

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 17, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 53s —— View job


PR Review: ci: add dogfood do-not-merge and pr-issue-linkage gate callers

  • Gather context and read changed files
  • Analyze files for correctness, security, and CLAUDE.md compliance
  • Post review findings

Summary

Two new thin caller workflows that wire this repo into its own gate reusables. The architecture is correct, the security posture is sound, and the required trigger types are all present. One nit on SHA comment format and a note on Dependabot coverage for intra-repo pins.


pull_request_target use — correct and intentional

Both callers use pull_request_target rather than pull_request. While CLAUDE.md's security rules prohibit pull_request_target for the claude-review reusable (which holds an org secret), those rules are scoped to that workflow. The gate callers here carry no secrets and no head-code checkout — the entire purpose of pull_request_target is to run the base-branch gate definition so the PR head cannot redefine or bypass its own gate. The reusable's own inline documentation (pr-issue-linkage.yml line 18: "The caller must use pull_request_target (not pull_request)") makes this requirement explicit.

Permissions are correctly minimized:

  • do-not-merge.yml: pull-requests: read at both workflow and job level — matches the reusable's own declaration
  • pr-issue-linkage-self.yml: {} at both levels — matches the reusable's zero-permission declaration

Trigger types — required events present

do-not-merge.yml L11 includes labeled and unlabeled — required by the gate's documentation so label changes re-evaluate the check. Without these, a label applied after a passing run would not invalidate it.

pr-issue-linkage-self.yml L12 includes edited — required so a PR body edit re-validates. Both callers include merge_group, which is necessary to avoid the merge queue deadlocking on a required check that never reports.

SHA pins — content verified, comment format is a nit

Both pinned SHAs are confirmed real commits in this repo (the original PR merge commits for do-not-merge-gate at #108 and pr-issue-linkage at #118). git diff against the current main HEAD is empty for both files — no content has drifted since those pins.

🟡 Nit — SHA comment format deviates from CLAUDE.md convention. CLAUDE.md specifies # vX.Y.Z as the trailing comment so Dependabot can update both the pin and the label together. The callers use # 8853021 2026-07-16 / # f7e94a8 2026-07-16 (abbreviated SHA + date) instead. For intra-repo reusable workflow pins that have no semver release tag, there is no vX.Y.Z to insert — the date-based format is a reasonable adaptation. If Dependabot is configured to track github-actions dependencies in this repo, it will update the full SHA regardless; the comment label just won't carry the auto-updated version. Worth documenting as the established convention for SHA-only intra-repo pins if this pattern will recur in other consumers.

Concurrency groups

Both callers use github.event.pull_request.number || github.ref as the fallback (for merge_group events where .pull_request.number is undefined). The merge_group head ref is unique per group (refs/heads/gh-readonly-queue/<base>/pr-<n>-<sha>), so this correctly groups merge-group runs without collisions. This differs from claude-review-self.yml's || github.run_id fallback; neither is wrong — github.ref allows cancellation of a superseded merge-group run, run_id doesn't. The choice here is fine.

No issues found

No bugs, injection risks, secret leaks, or CLAUDE.md violations. The design — pinning to the reusable's merged SHA rather than a local ./ path — correctly prevents a PR from redefining the gate that governs it.

@kyle-sexton
kyle-sexton merged commit c36e881 into main Jul 17, 2026
1 check passed
@kyle-sexton
kyle-sexton deleted the ci/gate-callers branch July 17, 2026 12:06
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