Skip to content

The 'main' ruleset is active but inert — it targets no refs, and its required checks match no job #236

Description

@eaitbrahim

Found while making CI manual-only (#234). Recording it because it is currently providing zero protection while appearing configured.

What's there

ruleset "main"  (id 20701832, created 2026-08-11 11:20)
  enforcement: ACTIVE
  conditions.ref_name.include: []
  conditions.ref_name.exclude: []
  required_status_checks: "Lint, Unit tests, Build", "Integration Tests"
  required approving reviews: 1

Authoritative check — GET /repos/CodeGateSoftware/keel/rules/branches/main returns []: 0 rules in force on main.

(Note GET /branches/main/protection returns 404 "Branch not protected". That is the classic protection API and does not see rulesets, which is why this was initially missed.)

Two independent defects

  1. It targets nothing. include is empty, so the ruleset matches no ref. Enforcement is active but there is nothing to enforce it on.
  2. Its required checks match no job in this repo. It requires contexts "Lint, Unit tests, Build" and "Integration Tests". The jobs this repo actually defines are test (ci.yml), migrate (migrate.yml), and release (release.yml). Those contexts look copied from a different project.

Defect 2 is the dangerous one: fixing only the targeting would block every PR forever, waiting on status checks that can never report.

Why it matters now

#234 makes ci.yml workflow_dispatch-only, so nothing verifies a PR automatically before merge. That was an accepted trade — but it was accepted on the understanding that no branch protection existed. In fact a ruleset exists and is simply not working, which is a different and more fixable situation.

To fix, both halves are needed

  • Set conditions.ref_name.include to ["~DEFAULT_BRANCH"] (or refs/heads/main).
  • Replace the required contexts with ones this repo actually produces. With CI now manual-only, the honest options are to require no status checks (review-only), or to restore an automatic trigger for the one check you want to require. Requiring test while ci.yml only runs on dispatch would mean a human must remember to dispatch CI on every PR before it can merge.

Decide the intent first — review-only gate, or automatic check + required context — because the two halves have to agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciCI/workflows (Docs, CI & tooling)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions