CI: change-aware scope for check, coverage and live-e2e (PLAT-986) #344

Merged
stephen merged 1 commit from ci-opt/plat-986-change-scope into main 2026-12-02 12:52:13 +00:00
Owner

PLAT-986, change-aware CI, fj (first of the Rust batch with regent and rs-matter). A pull request that changes only docs or project notes no longer runs the Rust steps; the required ci / check keeps its name and still reports.

What counts as content. docs/**, CHANGELOG.md, CONTRIBUTING.md, SECURITY.md, CLAUDE.md (.forgejo/ci-scope.patterns). The root README.md is not content: the content-unread guard found that tests in src/cli/mod.rs read it (the global-flags paragraph and the install snippets must match the code). Everything else, mixed changes, unknown paths, pushes, tags and a failed or missing classification run what runs today.

Classifier and guard. scripts/ci-scope.sh and scripts/ci-content-unread.sh are the canonical copies from fleet ci/change-scope (fleet#1134, #1135; check-vendored.sh reports no drift), with the generic classifier test. The guard fails when any non-content file names a content file; .forgejo/ci-scope.mentions records the 50 reviewed mentions, each bound by checksum to the mention itself, with a reason: document links and template text, user-facing hint text in src/client/capability.rs and proxy.rs, fixture strings, the tag-time release.yml (it copies README and CHANGELOG, and is not a pull request check), Cargo.toml's readme key (read by cargo package at release), the local scripts/preflight.sh pathspec exclusions, and the classifier's own files. scripts/ci-scope-fj.test.sh covers this repo's rules and fails if a step after the classifier loses its gate. All three run first in check.

Wiring in ci.yml. The nine Rust steps after the classifier (setup, cache, fmt, clippy, test, audit install and run, release build, smoke) carry != 'content', so an empty or failed classification runs them. coverage and live-e2e (both needs: check, neither required) skip on the same output at job level.

Time to green.

  • Before: successful PR runs of ci.yml over the last 14 days (n=19): run p50 26.9 min, p90 50.0; queue wait p50 0.0, p90 13.9; run plus queue p50 27.9, p90 59.6. A docs-only PR paid all of it, including coverage and live-e2e.
  • After: not measured. This PR changes .forgejo/** and runs full by design. Expectation for a content-only PR: container start, checkout, the three self-tests and the classifier, about a minute or two, and no coverage or live-e2e. The first real content-only run goes into this body after merge.

Self-review: no findings.

PLAT-986, change-aware CI, fj (first of the Rust batch with regent and rs-matter). A pull request that changes only docs or project notes no longer runs the Rust steps; the required `ci / check` keeps its name and still reports. **What counts as content.** `docs/**`, `CHANGELOG.md`, `CONTRIBUTING.md`, `SECURITY.md`, `CLAUDE.md` (`.forgejo/ci-scope.patterns`). **The root `README.md` is not content:** the content-unread guard found that tests in `src/cli/mod.rs` read it (the global-flags paragraph and the install snippets must match the code). Everything else, mixed changes, unknown paths, pushes, tags and a failed or missing classification run what runs today. **Classifier and guard.** `scripts/ci-scope.sh` and `scripts/ci-content-unread.sh` are the canonical copies from fleet `ci/change-scope` (fleet#1134, #1135; `check-vendored.sh` reports no drift), with the generic classifier test. The guard fails when any non-content file names a content file; `.forgejo/ci-scope.mentions` records the 50 reviewed mentions, each bound by checksum to the mention itself, with a reason: document links and template text, user-facing hint text in `src/client/capability.rs` and `proxy.rs`, fixture strings, the tag-time `release.yml` (it copies README and CHANGELOG, and is not a pull request check), `Cargo.toml`'s `readme` key (read by `cargo package` at release), the local `scripts/preflight.sh` pathspec exclusions, and the classifier's own files. `scripts/ci-scope-fj.test.sh` covers this repo's rules and fails if a step after the classifier loses its gate. All three run first in `check`. **Wiring in `ci.yml`.** The nine Rust steps after the classifier (setup, cache, fmt, clippy, test, audit install and run, release build, smoke) carry `!= 'content'`, so an empty or failed classification runs them. `coverage` and `live-e2e` (both `needs: check`, neither required) skip on the same output at job level. **Time to green.** - Before: successful PR runs of `ci.yml` over the last 14 days (n=19): run p50 26.9 min, p90 50.0; queue wait p50 0.0, p90 13.9; run plus queue p50 27.9, p90 59.6. A docs-only PR paid all of it, including `coverage` and `live-e2e`. - After: not measured. This PR changes `.forgejo/**` and runs full by design. Expectation for a content-only PR: container start, checkout, the three self-tests and the classifier, about a minute or two, and no coverage or live-e2e. The first real content-only run goes into this body after merge. Self-review: no findings.
CI: change-aware scope for check, coverage and live-e2e (PLAT-986)
All checks were successful
ci / check (pull_request) Successful in 30m55s
ci / live-e2e (pull_request) Successful in 6m59s
ci / coverage (pull_request) Successful in 8m14s
62459e09ae
A pull request that changes only docs/**, CHANGELOG.md, CONTRIBUTING.md, SECURITY.md or CLAUDE.md
skips the Rust steps of check (the required ci / check still reports) and the coverage and
live-e2e jobs. The root README.md is not content: tests in src/cli/mod.rs read it. Everything
else, every push and tag, and a failed or missing classification runs as before.
scripts/ci-scope.sh and scripts/ci-content-unread.sh are the canonical copies from fleet
ci/change-scope; the guard fails when code or a script names a content file, and
.forgejo/ci-scope.mentions records the reviewed harmless mentions.
gerri approved these changes 2026-12-02 11:55:18 +00:00
gerri left a comment

Automated Codex review (read-only) of head 62459e09ae.

No actionable findings.

BLOCKING: 0

Reviewed head 62459e09ae at 2026-12-02T11:55:17Z by codex exec (read-only sandbox).

Automated Codex review (read-only) of head 62459e09ae8e52af4b1eddde2993ece639c57766. No actionable findings. BLOCKING: 0 --- Reviewed head 62459e09ae8e52af4b1eddde2993ece639c57766 at 2026-12-02T11:55:17Z by codex exec (read-only sandbox).
Sign in to join this conversation.
No description provided.