Skip to content

[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

Closed

Description

@os-project-manager

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:

PR merged at (UTC) merged_by
#6671 14:23:32 os-zhuang
#6732 14:38:56 os-project-manager

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

  1. .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.
  2. A CI check (workflow + script, in the family of check-changeset-presence in objectui#3769) that:

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).

Acceptance

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).

Activity

  1. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    CollaboratorAuthor

    Claim: PM loop round 8 (devx seat) — dispatched immediately at the maintainer's direction.

    Session: session_01F8q5J1MQyocgtNspb15fSn
    Branch: claude/issue-6785-adr-merge-gate
    Worktree: objectstack-issue-6785
    Domain: domain:devx
    File surface: .github/CODEOWNERS (new or extended), .github/workflows/ (new workflow file — do NOT widen an existing one), scripts/ (check script + self-test). ⛔ Not docs/adr/**, not repo settings via API.
    Container: M — mode:subagent, shared container.

    Serial constraints checked: the SKILL.md sweep in flight touches .claude/skills/ only; the #6731 conflict fix touches scripts/check-adr-links.mjs and lint.yml — ⚠️ if wiring the new check into .github/workflows/lint.yml proves necessary rather than a standalone workflow file, stop and coordinate via report instead of racing #6731's merge resolution on that file. A standalone workflow file avoids the collision entirely and is the preferred shape.


    Generated by Claude Code


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions