You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[governance] Enforce the ADR merge prohibition on the GitHub side — prose did not propagate; two seats merged docs/adr/** PRs within an hour of the ruling #6785
The maintainer confirms neither was them; both were retroactively ratified on #6741 — ratification covered those two merges only and explicitly declined to set precedent. The mechanism failure is structural: a ruling written into an issue (or into one lane's SKILL.md) does not reach sessions that never read that issue. #6732 was merged while in draft state, which also demonstrates that parking a PR as draft is not a reliable barrier. The repo's own doctrine — declared = enforced — applies to governance exactly as it applies to metadata.
What to build
Machine enforcement: a PR whose diff touches docs/adr/** must not be mergeable without the maintainer's explicit approval. Two complementary halves; the split matters because only one half is self-serve:
Half 1 — in-repo, a dev can land it
.github/CODEOWNERS entry routing docs/adr/ to the maintainer (@hotlong), so review is requested automatically and a code-owner-review requirement has something to bind to.
A CI check (workflow + script, in the family of check-changeset-presence in objectui#3769) that:
runs on every PR with no path filter on the trigger — the script reads the diff and decides; a filtered-out required check never reports and hangs the merge queue for the ruleset timeout (objectui#3523's lesson, restated in 黑洞型数据库端点:每个查询挂 30 秒,然后报一句指向错误方向的 "the pool is probably full" #3769);
subscribes to merge_group as well, so a queued build reports rather than stalling;
passes when the diff does not touch docs/adr/**;
when the diff does touch it, passes only if the PR carries an APPROVED review from the maintainer's own account — a bot-identity approval must not satisfy it (the shared-identity problem is the root cause here; an approval from os-*/claude identities is exactly what must not count);
carries a self-test, and the PR proves the red path with direction predicted before each ablation (a docs/adr/** diff with no approval → RED; same diff plus maintainer approval → GREEN; non-ADR diff → GREEN without lookups).
Half 2 — repo settings, only the maintainer can flip it
Document, in the PR body, the exact ruleset/branch-protection changes for the maintainer to apply by hand: require code-owner review on docs/adr/** paths (binding to the CODEOWNERS entry), and add the new check to required status checks. ⛔ The dev must not attempt to modify repository settings via API even if the token permits it — the entire point of this card is that governance actions belong to the maintainer; the deliverable is the button-by-button instruction, not the pressed button.
Scope guards
⛔ No edits under docs/adr/** itself.
⛔ This gate governs merging, not authoring — drafting ADR PRs remains permitted to all seats; only the merge is reserved.
The check must not block the emergency lever the maintainer already has: their own approval + merge is the intended green path, zero extra friction for them.
Account-identity detail to verify rather than assume: the maintainer's GitHub login for CODEOWNERS/approval-matching purposes (the seat's records say hotlong; confirm against the repo's admin/collaborator list).
Self-referential smoke: the gate runs green on its own PR (which touches .github/ and scripts/, not docs/adr/**).
Related: #6741 (the ruling and both violation records), #6634/PR #6732, #1825/PR #6671, objectui#3769 (the presence-gate pattern this borrows), #6170 (the sibling prohibition on release actions — worth checking whether the same mechanism can carry it later, but ⛔ out of scope for this card).
Filed at the maintainer's direction (2026-08-08, Claude Code session of the devx PM seat): 「两个 ADR 都追认,GitHub 侧的 ruleset 门禁开卡去做」.
The ruling to enforce
#6741, maintainer, verbatim: 「adr 只能由维护者自己确认,人工合并,ai 不得擅自合并。」
Why prose enforcement is measured-insufficient
The ruling was filed at 13:52Z on 2026-08-08. Within the following hour, two different AI-operated seats merged
docs/adr/**PRs:os-zhuangos-project-managerThe maintainer confirms neither was them; both were retroactively ratified on #6741 — ratification covered those two merges only and explicitly declined to set precedent. The mechanism failure is structural: a ruling written into an issue (or into one lane's SKILL.md) does not reach sessions that never read that issue. #6732 was merged while in draft state, which also demonstrates that parking a PR as draft is not a reliable barrier. The repo's own doctrine — declared = enforced — applies to governance exactly as it applies to metadata.
What to build
Machine enforcement: a PR whose diff touches
docs/adr/**must not be mergeable without the maintainer's explicit approval. Two complementary halves; the split matters because only one half is self-serve:Half 1 — in-repo, a dev can land it
.github/CODEOWNERSentry routingdocs/adr/to the maintainer (@hotlong), so review is requested automatically and a code-owner-review requirement has something to bind to.check-changeset-presencein objectui#3769) that:merge_groupas well, so a queued build reports rather than stalling;docs/adr/**;os-*/claudeidentities is exactly what must not count);docs/adr/**diff with no approval → RED; same diff plus maintainer approval → GREEN; non-ADR diff → GREEN without lookups).Half 2 — repo settings, only the maintainer can flip it
Document, in the PR body, the exact ruleset/branch-protection changes for the maintainer to apply by hand: require code-owner review on
docs/adr/**paths (binding to the CODEOWNERS entry), and add the new check to required status checks. ⛔ The dev must not attempt to modify repository settings via API even if the token permits it — the entire point of this card is that governance actions belong to the maintainer; the deliverable is the button-by-button instruction, not the pressed button.Scope guards
docs/adr/**itself.hotlong; confirm against the repo's admin/collaborator list).Acceptance
.github/andscripts/, notdocs/adr/**).Related: #6741 (the ruling and both violation records), #6634/PR #6732, #1825/PR #6671, objectui#3769 (the presence-gate pattern this borrows), #6170 (the sibling prohibition on release actions — worth checking whether the same mechanism can carry it later, but ⛔ out of scope for this card).