588. A merge needs a review no fork can supply
(Number minted at promotion.) Promoted from the proposal
a-merge-needs-a-review-no-fork-can-supply, filed 2026-09-24, after calef ruled on it the same
day: options 2 and 3 adopted, option 1 not taken and still open. Option 2 is set live (workflow
approval is required for all external contributors). Option 3's tree side is pull request #1215:
the three jobs that mint the App token (merge-drain.yml, trunk-health.yml, toolchain-bump.yml)
name the automation environment (name provisional), whose deployment branches are main only.
Option 3 is protective as of 2026-10-03 (UTC): calef deleted the organization-level copies, and
the secrets now exist only on the environment (see ## Follow-on). The text below is the proposal's own, unedited
except for this paragraph, the gate's first sentence, and the ## Follow-on and ## Index row
sections; the ruling paragraph under the gate was added to the proposal before promotion. Its long sentences are split to meet §213 (writing standards). As filed: Raised by the 2026-09-24 security audit
(design/audit-reports/2026-09-24-new-trust-boundaries.md, finding 1). It found that
helpers/merge-drain.sh armed auto-merge on every open, non-draft pull request against main
from any author. It found that the ruleset on main requires zero approving reviews, and that a
merge-group build runs a pull request's own workflow edits with this repository's secrets. The audit closed the
path in the script (helpers/queue-eligible.jq refuses a head in another repository); this is the
rung above it.
Option 1 is still an architect's to rule, and the secret move is an organization setting only he can make. As filed: every option below is a repository or organization setting, which is a fact that leaves the tree. No lane can change it, and every lane works under it from the moment it changes. It is an architect's.
Ruled the same day, in part (calef, 2026-09-24 UTC): options 2 and 3 are adopted. Option 2 is
set: the repository's fork approval policy now reads all_external_contributors, so no outside
contributor's workflow runs without a click. Option 3 is pull request #1215 (the App's secrets
move behind a main-only environment), which touches the three scheduled workflows. Option 1 is
not ruled and is what this proposal still asks about; its cost stands as written below.
What is true today
- The repository is public and forkable; 991 pull requests by calef's account, 9 by dependabot, none from a fork, ever.
- The
mainruleset:required_approving_review_count: 0, merge queue on, required checks are the CI jobs. A pull request the queue can build green is a pull request the queue merges. nife-smelter[bot]arms auto-merge every five minutes frommerge-drain.yml, and now only for heads in this repository. That is rung two of AGENTS.md's ladder: a gate somebody wrote, in a script, that a future edit can un-write. The self-test underscript/lintis what stops that happening silently, and it is still a script.- Workflows on a first-time contributor's fork wait for a click (
approval_policy: first_time_contributors); a returning contributor's run automatically, with a read-only token and no secrets. A merge-group run is in this repository and sees the organization's secrets,AUTOMATION_APP_IDandAUTOMATION_APP_KEYamong them, and runs the workflow file as the pull request left it.
Options, with what each costs
- Require one approving review, and let the App give it to a lane. Set
required_approving_review_count: 1. calef cannot approve his own pull requests, so every lane would stall unless something else approves them.merge-drain.sh, holding the App token, would approve a pull request that passes the same admission predicate before arming it. A fork's pull request then needs a person. Cost: the App's review is a rubber stamp by construction. A reader of the pull request page sees "approved by nife-smelter" on work nobody read, which is the record lying in a new way. The platform enforces the rule, which is the point; the honesty cost is real and should be weighed against it. - Require workflow approval for every outside contributor (
approval_policy: all_external_contributors). One setting. A fork's pull request then cannot go green without a person clicking, so it cannot enter the queue and cannot reach a merge-group run. Cost: a collaborator working from a fork waits for a click on every push. No lane is affected. - Put the App's secrets in an environment the queue cannot use. Move
AUTOMATION_APP_IDandAUTOMATION_APP_KEYinto an Actions environment whose deployment branches aremainonly, and have the scheduled workflows name it. A merge-group ref (gh-readonly-queue/main/...) is notmain, so a job on it that named the environment would be refused. A job that did not name it cannot read the secrets. Cost: three workflow files gain anenvironment:line; the toolchain-bump workflow, which opens a pull request under the App, keeps working because it runs frommain.
Recommendation
2 and 3 together, now: each is one setting, and neither touches a lane. Between them a stranger's code cannot run with a secret whether or not the drain is right. 1 is the only one that makes the review a platform rule rather than a script's. It is offered rather than recommended because its cost is a review record that says something false. If calef takes 1, the App's approval comment should say in its body that it is the admission predicate speaking and not a reader.
What is blocked until it is answered
Nothing in the tree. The script-level fix holds today; this decides whether it is the only thing holding.
Follow-on
- Done. On 2026-10-03 (UTC) calef deleted the organization-level
AUTOMATION_APP_IDandAUTOMATION_APP_KEY; they now exist only as secrets of the environmentautomation.trunk-healthrun 37156264104 (workflow_dispatch, 2026-10-03 21:46 UTC) succeeded after the deletion; run 37149031146 had succeeded before it, on the environment secrets. (On 2026-09-24 the environment's secrets endpoint listed none, and an org secret reaches every job regardless of environment.) - Refused. Option 1, a required approving review the App would give. calef ruled on 2026-10-07
(UTC): "Refuse the App-given required review and close 588 as BUILT." The reasons and the
condition for revisiting it are in §257 (a required review that the App would give is refused).
The
mainruleset still readsrequired_approving_review_count: 0, on purpose. - Done. Option 2, a repository setting made 2026-09-24; the fork approval endpoint reads
approval_policy: all_external_contributors. - Done. Option 3's tree side, pull request #1215, merged 2026-09-24. Dispatch runs from
mainafter the merge: merge-drain 36052027971 and trunk-health 36052031966 succeeded; toolchain-bump 36052036224 failed on a quoting bug unrelated to the environment (fixed in #1237) and succeeded on re-run 36059259805.
Index row
A merge-group build runs a pull request's own workflow edits with this repository's secrets, and the main ruleset requires no review. calef adopted two of three fixes on 2026-09-24: workflow approval for every outside contributor, and the App's secrets behind a main-only environment. The secrets now exist only on that environment. calef refused the third fix, a required review the App would give, on 2026-10-07: it would be a rubber stamp and the record would lie (§257).