Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: CI

# The repository ruleset on main requires the merge queue and the ci-ok check from this
# workflow. merge_group is the landing proof; pull_request is feedback; push to main is
# post-merge (and still re-runs the gate until a follow-up thins it). See MAINTAINERS.md.

on:
pull_request:
push:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ While you work, `npm run check:fast` answers in under a minute: it builds, then

CI also enforces test coverage floors (93% lines, 87% branches, 93% functions) with `npm run test:coverage`. New code should come with tests so the number stays up; raise the floors in `package.json` when coverage rises, never lower them to make a change pass.

The pull request gate GitHub enforces is one status check, `ci-ok`. It runs after every other CI job and fails when any of them failed or was cancelled; a skipped job counts as passing. Only `ci-ok` is required by branch protection, so the jobs behind it can change without editing repository settings. Maintainers enable the merge queue in [MAINTAINERS.md](MAINTAINERS.md#branch-protection-and-the-merge-queue).
The pull request gate GitHub enforces is one status check, `ci-ok`, and the merge queue is the only path onto `main`. `ci-ok` runs after every other CI job and fails when any of them failed or was cancelled; a skipped job counts as passing. Only `ci-ok` is required in the ruleset, so the jobs behind it can change without editing repository settings. Details: [MAINTAINERS.md](MAINTAINERS.md#branch-protection-and-the-merge-queue).

### Optional pre-push hook

Expand Down
2 changes: 1 addition & 1 deletion GOVERNANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ There is no steering committee or formal vote. The current maintainer grants mai

Most decisions are made in the issue or pull request where the work happens. Contributors argue for an approach with evidence, tests, and a working change; the maintainer decides when discussion does not settle it. There is no vote count and no requirement that every objection be withdrawn, only that it be answered.

Every merge needs a green `npm run check` and resolved review conversations. CI also runs the rules check on changed registry files and the self-scan that fails on findings outside the baseline. The branch protection rule on `main` requires one status check, `ci-ok`, which fails when any CI job failed or was cancelled and passes when a job was skipped; the merge queue runs it on `merge_group` before a pull request lands. The rule does not require an approving review. Review is therefore a convention the project keeps, not a gate GitHub enforces: a change to the paths in `.github/CODEOWNERS`, to lifecycle evidence, or to a public contract waits for the code owner, and green CI is not a substitute for that review.
Every merge needs a green `npm run check` and resolved review conversations. CI also runs the rules check on changed registry files and the self-scan that fails on findings outside the baseline. The repository ruleset on `main` requires the merge queue and one status check, `ci-ok`, which fails when any CI job failed or was cancelled and passes when a job was skipped; the queue runs it on `merge_group` before a pull request lands. Direct pushes to `main` are closed. The ruleset does not require an approving review. Review is therefore a convention the project keeps, not a gate GitHub enforces: a change to the paths in `.github/CODEOWNERS`, to lifecycle evidence, or to a public contract waits for the code owner, and green CI is not a substitute for that review.

### When a written decision is required

Expand Down
12 changes: 10 additions & 2 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@ Library maintainers who ship CLE lifecycle declarations for *their* packages: se

## Branch protection and the merge queue

`main` requires one status check, `ci-ok`. The CI workflow reports it after every other job, and it passes when each needed job succeeded or was skipped; it fails when any of them failed or was cancelled. Keep the individual jobs, and the public-corpus run, out of the required list so the matrix can change without editing repository settings.
`main` accepts commits only through the merge queue. The repository ruleset named `main` (Settings → Rules → Rulesets) requires:

The merge queue is part of the same rule and runs CI on `merge_group` before it lands a pull request. To turn both on for a repository: **Settings → Rules → the `main` rule → Require status checks to pass**, add `ci-ok`, then enable **Require merge queue** and pick the merge method and grouping. The `merge_group` trigger in `.github/workflows/ci.yml` is what gives the queued pull request its `ci-ok`; without it a queued pull request waits forever.
1. A pull request (no direct pushes).
2. The single status check **`ci-ok`**.
3. The merge queue (squash; up to five entries built and merged together; 45-minute check timeout; `ALLGREEN`).

`ci-ok` is reported by [`.github/workflows/ci.yml`](.github/workflows/ci.yml) after every other job in that workflow. It passes when each needed job succeeded or was skipped, and fails when any of them failed or was cancelled. Keep the individual jobs, and the public-corpus run, out of the required list so the matrix can change without editing the ruleset. The `merge_group` trigger in that workflow is what gives a queued pull request its `ci-ok`; without it a queued pull request waits forever.

### Release-bot exception

There is none. The ruleset has an empty `bypass_actors` list, so no actor (including admins and GitHub Actions) may push past the queue onto `main`. Release workflows do not need a bypass: they push to `release/<tag>` (Action bundle), floating major tags, and the `badges` branch — never to `main`. A release commit reaches `main` the same way as any other change: through a pull request and the merge queue.

## Detector owners

Expand Down
17 changes: 9 additions & 8 deletions docs/CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ every needed job succeeded or was skipped. Keep individual jobs, the public corp
fuzz, mutation, and package smoke **out** of the required list so the matrix can change without
editing repository settings.

How to turn the check and the merge queue on: [MAINTAINERS.md](../MAINTAINERS.md#branch-protection-and-the-merge-queue).
The ruleset and the merge queue are on; details and the (absent) release-bot exception: [MAINTAINERS.md](../MAINTAINERS.md#branch-protection-and-the-merge-queue).
Contributor-facing note: [CONTRIBUTING.md](../CONTRIBUTING.md#quality-standards).

## Lanes at a glance
Expand Down Expand Up @@ -135,24 +135,25 @@ the site instead.
**Rules.**

- Never cancel a `merge_group` run for a newer push.
- The merge queue is the only path to `main` once #2029 is done; until then, treat a green queue
run as the intended proof even if direct merges still exist.
- The merge queue is the only path to `main` (repository ruleset; see
[MAINTAINERS.md](../MAINTAINERS.md#branch-protection-and-the-merge-queue)).
- Do not put corpus, mutation, or Scorecard into the queue budget.

## Main (15 minutes)

**Goal.** After the merge queue is the only path, do not re-prove the same gate on every push.
**Goal.** The merge queue is the only path, so do not re-prove the same gate on every push.

**Target (after #2029 and #2030).**
**Target.**

- Badge publish to the `badges` branch.
- Pages deploy **once per merge batch**, not once per commit (#2031).
- Pages deploy **once per merge batch**, not once per commit.
- Any remaining release-branch Action bundle build the release chain still starts from `main`.
- Do not cancel a `main` run that is the only verification left for a commit. Report cancelled
share; keep it under 5%.

**Until the queue is enforced.** Keep the full `ci.yml` gate on `push` to `main` so history stays
covered. That transitional cost is accepted; removing it is #2030's job after #2029.
**Today.** The full `ci.yml` gate still runs on `push` to `main` as a belt-and-suspenders check
while post-merge jobs (badges, Pages) share that workflow. Thinning `main` to side effects only
stays a follow-up; the queue is already the landing proof.

## Nightly and scheduled (60 minutes per workflow)

Expand Down
2 changes: 1 addition & 1 deletion docs/PARALLEL_WORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Three causes, 8 conflicting tasks. `examples/capabilities.json` is an assembled
## What this does not show

- The tasks are replayed from history, not started fresh from one base, so some conflicts are really dependencies (the later task was written on top of the earlier one). The causes above are the shared paths either way.
- The merge queue is not on (#2029 is open), so the merges were local `git merge` runs, not queue runs.
- When this experiment ran, the merge queue was not yet on, so the merges were local `git merge` runs, not queue runs. The queue is now the only path to `main` (see [MAINTAINERS.md](../MAINTAINERS.md#branch-protection-and-the-merge-queue)).
- Rerun this experiment after each cause is fixed. The goal stays zero textual conflicts.

## After the fix for hard-coded counts (#2581)
Expand Down
Loading