Skip to content

drift: unmanaged repo-level rulesets default-branch-baseline on MCP repos #56

Description

@millsmillsymills

Context

Surfaced during rule-insights snapshot for issue #41 (commented on PR #16). Each of the four MCP repos has a repo-level ruleset that is not declared anywhere in this tofu state:

Repo Ruleset ID Name source_type enforcement
`unifi-mcp` 16150589 `default-branch-baseline` Repository active
`unraid-mcp` 16150590 `default-branch-baseline` Repository active
`gandi-mcp` 16150591 `default-branch-baseline` Repository active
`protonmail-mcp` 16150592 `default-branch-baseline` Repository active

The ruleset enforces `required_status_checks` requiring 6 checks, plus `pull_request`, `required_linear_history`, `non_fast_forward`, `deletion` rules. It is producing failures on direct pushes to `main` (see the per-repo table in PR #16 comment): unifi-mcp 5 fails, unraid-mcp 8 fails, gandi-mcp 1 fail.

These are pre-existing — likely created via `gh ruleset` CLI or the GitHub UI before the org came under tofu management, or by tooling outside this repo.

Why this needs a decision

The org-wide evaluate→active flip (PR #16) will layer the org-wide `default-branch-protection` ruleset (ID 16259943) on top of these existing repo-level rulesets. After the flip, two rulesets will evaluate every push to a default branch on these repos:

  • Repo-level `default-branch-baseline` (currently active, producing fails because no PR-driven workflows feed the required-status-checks contexts).
  • Org-level `default-branch-protection` (becomes active post-flip).

Without resolving the drift, the rule-insights signal on these repos will continue to be dominated by failures from a ruleset we don't control via tofu. That makes future audits of the org-wide ruleset's behavior harder.

Decision needed

Pick one:

  1. Import into tofu — extend `modules/repo-baseline` to declare a `github_repository_ruleset` resource that matches the existing shape (or a deliberately-revised shape). Then `import` block in `repos_existing.tf` to bring the four IDs into state. The 6-context required-checks list would need to be defined; current contexts unknown without inspecting one of the repos.
  2. Delete — `gh ruleset delete --repo millsymills-com/` per repo, then let the org-wide ruleset be the only enforcement layer. Simpler; reduces surface; but removes whatever protection the MCP repos currently have.
  3. Accept and document — leave the repo-level rulesets in place, document them in `repos_existing.tf` as known unmanaged config, and accept the perpetual rule-insights noise. Cheapest in tofu work; worst for audit clarity.

Out of scope

  • The management repo's `management-repo-checks` ruleset is intentionally repo-level and declared in `repos_meta.tf`. This issue is only about the four MCP repos.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions