Skip to content

Redesign the machine user's permissions: approve everywhere, own no rules #89

Closed

Description

@don-petry

Part of the epic "Epic: slice 1, first approval. A Release on next reviews a pull request to this repo, and the machine user's approval stands" (moved from slice 0 on 2026-10-21, oversight steering point 3). This is org-wide in effect; the Factory's design is what drives it.

Why. donpetry-bot, the machine user and the Factory's approver (decision 0005, config/defaults.json), is a member of the org-leads team. That gives it two things it should not hold together:

  • The maintain role, on this repo and on at least seven others (google-app-scripts, broodly, markets, TalkTerm, ContentTwin, .github, bmad-bgreat-suite). Approving needs only write; maintain adds repository-settings powers the machine user never uses.
  • Code-owner status on every path, because every CODEOWNERS file in the org reads * @combsmith/org-leads. Six repos require code-owner review. Design §5.1 makes the Maintainer the only code owner of the Factory's own rules, so a machine user whose approval satisfies code-owner review on lifecycle/, config/ or .github/ breaks that.

The Maintainer ruled on 2026-10-15 that the machine user's approval should satisfy code-owner review everywhere, and that its permissions should be redesigned to get there safely. Until then nothing changes, and the bot stays in org-leads.

Facts gathered on 2026-10-15

  • Approving requires write. A code owner's approval also requires write, plus membership of the team that CODEOWNERS names.
  • The bot's maintain role comes only from org-leads; it is not a direct collaborator. The org's default role for members is write.
  • In the six repos that require code-owner review, the last four merges in each carry no reviews at all. They passed through the Maintainer's org-admin bypass, or through App 3167543's bypass. The bot's code-owner status is unused today.
  • This repo's main ruleset requires 0 approvals and no code-owner review. The tag ruleset for refs/tags/factory/* (The Factory repo's rulesets hold the Release tags and each required check's App #62) lets only the admin role bypass, so the bot cannot move release tags.

Done when

  • A decision record states the machine user's least privilege: its role, which teams it belongs to, and which paths it may own as a code owner. It reconciles "satisfies code-owner review everywhere" with §5.1. One way is a dedicated team holding the bot, named in CODEOWNERS for ordinary paths, while the Factory's rule paths (lifecycle/, config/authority.json, config/rubric-*, config/defaults.json, .github/, the hooks, the gate and the brakes) name the Maintainer alone.
  • The bot holds write, not maintain, wherever that is enough, and loses nothing it needs to approve.
  • CODEOWNERS in this repo, and wherever else the decision applies, reflects the decision. The change in the org's repo-template is noted, since decision 0014 copies the org file word for word.
  • config/apps.json and decision 0005 agree with the result, and a fixture or check records the bot's real role, so drift is visible.

Needs. The Maintainer, for the team and role changes at org level.

Activity

  1. don-petry commented on Oct 19, 2026

    @don-petry
    ContributorAuthor

    Sequence (plan review, 2026-10-19)

    Not on slice 0's exit: the main ruleset requires no review until the Factory's reviewer serves the repo (design §9.12), and the machine user is a code owner through org-leads today, which is what slice 1's first approval needs. This is the last story before slice 1's ruleset switch (the new story "The ruleset switch: main requires the machine user's approval of the latest push" under the slice-1 epic), and it runs after P-24 has a fixture (#27), since P-24 is the evidence for the dedicated-path option.

    When its ruling is drafted, its last Done-when must name the check: a fixture under trials/ of the machine user's role on each repo and its team memberships, read through the Maintainer's login, compared by a check as tools/check_apps.py compares the Apps' grants, so that a change of role or team is visible.

  2. don-petry commented on Nov 1, 2026

    @don-petry
    ContributorAuthor

    The Maintainer's answers on #89 (2026-10-31, relayed by the orchestrator).

    1. Role: "Write everywhere, via org level settings, not repo." So org-leads gets the org role all_repo_write, and all_repo_maintain comes off. The orchestrator reads this as removing the team's 7 repo grants too, so the org role alone governs. That is the orchestrator's reading, not his words.
    2. Paths: every path, as now.
    3. Joaolfelicio: stays as is.

    Why ruling 2 changed. His answer of 2026-10-21 chose to lower the team on "eight repos", with one PUT a repo. A read of 2026-10-31 found the role is an org role on all 15 active repos, all_repo_maintain, and this repo has no grant of its own, so those commands would have left the bot at maintain here. Ruling 2, the table of acts in ruling 8 and the scope point are corrected in place, each marked.

    Nothing has changed at org level yet. The commands are with the orchestrator for him.

    🤖 Written by Claude Code

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions