Skip to content

Require status checks in the main ruleset #166

Closed

Description

Context and request

Protect main so a pull request cannot merge until the repository's CI checks succeed. At the recorded baseline, the inherited ruleset required a pull request and approval but declared no required status checks, allowing auto-merge to land on approval alone. The approved repository-only supplemental rule now enforces the existing PR checks; the operational audit below records its scope and verification. #147 documents this gap; it does not change repository governance.

Acceptance criteria

  • The main ruleset requires the CI status checks that verify this repository's pull requests.
  • An auto-merge waits for those checks and the existing approval requirements.
  • A pull request with a failing, pending, or absent required check cannot merge.
  • The configured checks match the jobs currently expected by the repository's pull-request workflow.
  • The change and its verification have durable audit evidence on this issue.

Constraints and non-goals

Technical decisions

This is an operational Task: the deliverable is a GitHub ruleset configuration, not a repository file. The user approved adding a repository-only supplemental rule for refs/heads/main, because the existing GitHub Flow rule is organization-wide and must remain unchanged. Require Lint, Links, Test, Build, and Cross-repository links from GitHub Actions integration 15368, with no bypass actors. Preserve the existing deletion, non-fast-forward, linear-history, code-owner, last-push approval, stale-review dismissal, thread-resolution, and squash-only rules. Verify scope and enforcement through live rules/check-context reads and GitHub documented status-check semantics; do not attempt a merge or inject CI failures solely to test governance.

Implementation plan

  • Record the existing main ruleset and CI check names as the baseline verification evidence.
  • Configure the main ruleset to require the selected CI status checks.
  • Verify against a pull request that auto-merge and manual merge remain blocked while a required check is pending, failing, or absent.
  • Verify that merge is permitted only after every required check succeeds and the existing approval requirements are met.
  • Add an audit comment with the ruleset evidence and independent verification result.

Activity

  1. MariusStorhaug commented on Oct 31, 2026

    @MariusStorhaug
    MemberAuthor

    Applied the user-approved repository-only CI rule at 2026-10-31T11:48:48.0617336Z, through the linked Marius Storhaug (@MariusStorhaug) account.

    Baseline: MSXOrg/docs/main inherited active organization ruleset GitHub Flow (19735160), with deletion, non-fast-forward, linear-history, and pull-request rules but no required status checks. No repository ruleset existed.

    Change: Added main CI checks as an active repository ruleset scoped only to refs/heads/main. It requires Lint, Links, Test, Build, and Cross-repository links, each bound to the verified GitHub Actions integration 15368. The skipped Publish job and dynamic per-linter status names are not required. No bypass actors were added; the API reports current_user_can_bypass: never. No additional up-to-date-branch policy was enabled.

    Read-back evidence: GET /repos/MSXOrg/docs/rulesets/26269003 returns the exact source, target, five contexts and empty bypass list. GET /repos/MSXOrg/docs/rules/branches/main includes those required checks plus the original inherited rules. The non-target release-check-scope-control branch evaluation contains no required-status-check rule. Ruleset listing still shows the original organization rule unchanged alongside the new repository-only rule.

    The existing contexts and source integration were confirmed against PR #209's published check runs. Independent gate verification is still pending; this comment records the operational change, not completion of every acceptance criterion. No pull request was merged, no CI result was altered, and no organization-wide rule was edited.

  2. MariusStorhaug commented on Oct 31, 2026

    @MariusStorhaug
    MemberAuthor

    Independent read-only verification completed at 2026-10-31T11:56:05.3698669Z by the canonical-contract delivery session, separate from the configuration actor.

    • Ruleset 26269003 is active, sourced from MSXOrg/docs, and targets only refs/heads/main. It requires exactly Lint, Links, Test, Build, and Cross-repository links from GitHub Actions app 15368. There are no bypass actors and current_user_can_bypass is never.
    • The control ref has no effective required-check rule. The original organization rule 19735160 remains active and preserves its code-owner, last-push approval, stale-review dismissal, thread-resolution, and squash-only constraints.
    • On PR Pull request guidance describes complete source-bound records #209 head 48533dc, the independent inspector confirmed all five actual contexts originate from app 15368. Four had succeeded and Lint was still in progress at inspection; the candidate therefore had not satisfied its required-check readiness gate.
    • GitHub's documented required-status-check semantics apply to this active, non-bypassable configuration. Missing, pending, and failed required contexts do not satisfy it; the inherited review requirements also remain necessary. GitHub owns evaluation for both manual and automatic merge.

    This verifies the applied configuration, real context/source binding, scope, and enforcement contract. No live rejected merge attempt, injected failed/missing CI case, approval bypass, or merge was performed or claimed. Closing this operational configuration Task does not mark PR #209, #196, or #208 ready; their actual CI/review gates remain separate.

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

    release:skipValidate the change without publishing a release.

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions