Repository navigation
Org-standard required-check stubs need merge_group triggers: agent-shield and dependency-audit block merge-queue adoption in consumer repos #1157
Description
Summary
petry-projects/.github-private is adopting a GitHub merge queue to end the rebase treadmill documented in petry-projects/.github-private#1864 (one merge to main forced a full re-review of every other open PR; ≈154 forced re-reviews over 48h, zero merges).
A merge queue only merges a PR once its required status checks report on the queue's temporary gh-readonly-queue/* ref, which means every workflow providing a required check must trigger on the merge_group event. Two of the affected workflows are org-standard thin caller stubs whose triggers this repo owns:
standards/workflows/agent-shield.yml→ provides required checkagent-shield / AgentShieldstandards/workflows/dependency-audit.yml→ provides required checkdependency-audit / Detect ecosystems
Both stubs carry the standing instruction:
You MUST NOT change: trigger events, the
uses:line, or the job name (used as a required status check).
So the consumer repo cannot add merge_group itself without violating the stub contract. The change belongs here, in the templates.
What is needed
Add merge_group to the trigger block of both stub templates, alongside the existing push / pull_request triggers:
on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:The reusables themselves are workflow_call and need no change — they are indifferent to the outer event. The job names must stay exactly as they are, since they are the required-check contexts.
Acceptance Criteria
standards/workflows/agent-shield.ymlandstandards/workflows/dependency-audit.ymltrigger onmerge_groupin addition to their current events.- Job names are unchanged, so the required-check contexts (
agent-shield / AgentShield,dependency-audit / Detect ecosystems) still match. - The stub headers' "MUST NOT change: trigger events" guidance is updated to note that
merge_groupis part of the standard trigger set, so a future consumer-side sync does not strip it and a future reviewer does not flag it as drift. - Any stub-drift checker that compares consumer triggers against the template accepts the new trigger set (
scripts/caller_stub_freeze.sh/template_stub_drift.sh/fleet_stub_drift.shin the consumer repo reason about this — confirm none of them pin the old trigger list). standards/ci-standards.mdstates that org-standard required-check workflows must supportmerge_group, so this is a property of the standard rather than a one-off patch for one repo.
Why it is worth doing at the standard level
Any repo in the org that later adopts a merge queue hits exactly this wall. Making merge_group part of the standard trigger set for required-check stubs means the next adopter needs no cross-repo change at all.
Sequencing
Blocking prerequisite for petry-projects/.github-private#1864's merge-queue step. Note that repo has already dropped strict_required_status_checks_policy (2026-09-21), which removed the forced-rebase driver; the queue restores the "tested against the post-merge state" guarantee that strict was approximating. Until both land, that repo is running with neither — so this is time-sensitive rather than merely tidy.
References
petry-projects/.github-private#1864— the treadmill measurement and the approved merge-queue decisionpetry-projects/.github-private#1866— a related defect where a sync rewrote stub fields it was told to preserve; the trigger set must not become a second instance of that- GitHub docs: merge queue requires
merge_groupevent support for required checks
Activity
don-petry commentedon Sep 21, 2026
Dev-Lead Implementation Plan
Issue: #1157 — Org-standard required-check stubs need
merge_grouptriggers: agent-shield and dependency-audit block merge-queue adoption in consumer reposScope
Add
merge_groupto the trigger block of the two org-standard required-check caller stubs (agent-shield.yml,dependency-audit.yml), update their "MUST NOT change" header guidance to notemerge_groupis part of the standard trigger set, and codify inci-standards.mdthat org-standard required-check workflows must supportmerge_group— so merge-queue adoption needs no cross-repo change.Implementation Checklist
standards/workflows/agent-shield.yml— addmerge_group:toon:; job nameagent-shieldunchangedstandards/workflows/dependency-audit.yml— addmerge_group:toon:; job namedependency-auditunchangedmerge_groupis part of the standard trigger set (so a sync doesn't strip it / a reviewer doesn't flag it as drift — the #1866 concern)standards/ci-standards.md— state org-standard required-check workflows must supportmerge_group(property of the standard, not a one-off)on:-block drift checkers (caller_stub_freeze.sh/template_stub_drift.sh/fleet_stub_drift.sh, and the source-sidecheck_stub_surface_driftincompliance-audit.sh) compare theon:block against the template dynamically (hash/normalize), pinning no fixed trigger list — so they accept the new trigger set once the template carries it. No change needed; documented in report.Tests to Write
test/scripts/standards-templates/merge-group-required-checks.bats— template guard asserting both required-check stub templates carry amerge_group:trigger and their required-check job names are unchanged (mirrors the existingvform-pins.bats/s7635-secrets-inherit.batsguards)Test Command
bats --print-output-on-failure test/scripts/standards-templates/don-petry commentedon Sep 21, 2026
Dev-Lead: Progress (in progress — not yet durable)
Plan Execution (intended)
merge_groupto theon:trigger set of both required-check stubs.merge_groupis part of the standard trigger set (so a sync won't strip it anda reviewer won't flag it as drift — the #1866 concern).
merge_group" subsection tostandards/ci-standards.md(Tier-1on:-surface section), making it a propertyof the standard.
vform-pins/s7635-secrets-inheritguards.on:-block drift checkers (caller_stub_freeze.sh,template_stub_drift.sh,fleet_stub_drift.sh, and source-sidecheck_stub_surface_drift) compare theon:block against the templatedynamically (blob-SHA / byte-identity), pinning no fixed trigger list — they
accept the new trigger set once the template carries it. No change needed.
Files touched (this workspace, not yet pushed)
standards/workflows/agent-shield.yml:merge_group:trigger + header note.standards/workflows/dependency-audit.yml:merge_group:trigger + header note.standards/ci-standards.md: required-checkmerge_groupsubsection.test/scripts/standards-templates/merge-group-required-checks.bats: new guard.Local check output (provisional — not the pushed run)
Notes
Behavior-preserving for existing push/PR runs; the only new behavior is triggering
on the merge-queue event. Reusables are
workflow_calland unchanged. Required-checkjob names are unchanged, so branch-protection contexts still match.
don-petry commentedon Sep 21, 2026
Dev-Lead: Implementation Complete — PR #1158
The implementation for issue #1157 is durable: commits are pushed and a pull request is open. This record is backed by verifiable artifacts you can confirm in one click.
5c62c7fc1d242e25152f591fd94c8f6524a5188cReview happens on the PR. Acceptance criteria and test results are evidenced by the PR's diff and CI checks — not asserted here. If a later stage fails, this claim is retracted in place.
feat: implement issue #1157 — Org-standard required-check stubs need …