Repository navigation
Description
Why this matters
The test-integrity audit on 2026-11-13 found that main is reported by the GitHub API as protected: false, with no repository rulesets. Even a correct heavy final quality gate does not enforce merges if there is no branch protection. PR #497 makes the Quality gate fail closed and restores impact-scoped Playwright, but it cannot install GitHub account-level rules.
Administrator action
In the repository Settings → Rules → Rulesets (or Settings → Branches if using classic protection), add an active rule targeting the default branch main. Require pull requests and required status checks before merge; block force pushes/deletion. Do not impose an impossible self-review requirement on this single-maintainer repository.
Require these exact check names from the existing GitHub Actions runs:
heavy— final aggregate gate, now checks classification, dependency-review, test jobs, Windows packaging, browser expectationBackend tests— validates all four shards and combined coverageLint, types and contractsFrontend checksdependency-review(runs on pull requests)Browser tests(skipped on non-browser-impacting PRs; required on affected PRs)CodeQLif available as a branch protection status check
The Python compatibility workflow intentionally runs after push to main and weekly, not on PRs. Do not list its Python 3.12/3.13/3.14 jobs as required PR checks, since that would block all merges.
Acceptance criteria
GET /repos/dovvnloading/Cortex/branches/mainreturnsprotected: trueor an active main-targeted ruleset is visible.- A PR with a failing
heavyorBackend testscheck cannot merge. - A docs-only PR with legitimately skipped code checks can still merge when
heavyand dependency-review are successful. - Required contexts match the exact case-sensitive GitHub Actions check names.
- Existing single-maintainer squash-merge process remains usable.
Access limit
The installed GitHub connector supports repository file and PR operations but does not expose a branch protection/ruleset update action; branch-protection GET also returns 403 to the connector. This issue deliberately tracks the admin-only configuration rather than claiming it was set.
Activity
docs(ci): prepare maintainer-applied main ruleset for #498
dovvnloading commentedon Nov 14, 2026
Prepared the exact active
mainruleset as a reviewed JSON template with an administrator activation/verification procedure in PR #501. The policy requires PRs, the case-sensitiveheavy,Backend tests,Lint, types and contracts,Frontend checks,dependency-review, andBrowser testscontexts; prevents force pushes/deletion; has no bypass actors; and requires zero approving reviews so the single maintainer can squash-merge. This repository file does not enforce protection on its own. The connected GitHub App lacks repository Administration:write, andGET /branches/main/protectionreturns 403; ruleset POST is not exposed. An owner must activate it via Settings → Rules → Rulesets or the documentedgh apicommand. Leave this issue open until/branches/mainreportsprotected: trueor an active matching ruleset is confirmed.Document main branch protection ruleset activation (#501)
dovvnloading commentedon Nov 14, 2026
Ruleset activated and verified on 2026-11-14.
Activation: ruleset
27268453("Protect main with verified Cortex Quality gates") was imported from.github/rulesets/main-protection.jsonthrough Settings → Rulesets. Read back through the API it matches the file: active, targetsrefs/heads/mainonly, no bypass actors, blocks deletion and force pushes, requires a pull request (squash only, review threads resolved), and requiresheavy,Backend tests,Lint, types and contracts,Frontend checks,dependency-reviewandBrowser tests.GET /branches/mainnow reportsprotected: true.Check names: all six required contexts were confirmed to exist and pass on #502 before activation, so no PR waits on a check that never reports.
Blocking test: throwaway PR #503 added an unused import (Ruff F401).
gh pr merge 503 --squashwas refused: "the base branch policy prohibits the merge" (mergeStateStatus: BLOCKED).Lint, types and contracts,Backend testsandheavyfailed, the same merge was refused again with the same message.#503 was closed unmerged and its branch deleted.
Limit: the ruleset has no bypass actors, so not even the repository owner can merge past a failing required check; adding a bypass actor would be a deliberate settings change. If a Quality job is renamed, this ruleset must be updated at the same time.