Skip to content

perf(tests): run-all --changed picks suites by the diff, parallel by default on macOS - #664

Merged
tieubao merged 3 commits into
masterfrom
perf/run-all-changed
Sep 16, 2026
Merged

tieubao merged 3 commits into
masterfrom
perf/run-all-changed

Conversation

@tieubao

@tieubao tieubao commented Sep 16, 2026

Copy link
Copy Markdown
Member

What

  • tests/run-all.sh --changed [<base>] runs only the suites the diff against <base> touches (default base: the merge-base with origin/master). Picks: suites whose code lines name a changed file's basename, changed suites themselves, tests/test-<mod>*.sh for lib/<mod>/, plus every suite with an # always: header.
  • Six tree-wide lints carry # always: and run on every diff: kit-contract, config-registry, no-personal-paths, no-scattered-ids, boundary-lint, meta. They fail on a file you add while naming no file you touched, so a diff-derived pick can never reach them.
  • RUN_ALL_JOBS defaults to auto on macOS, where every parallel run has been green. Linux stays at 1 until the ubuntu flake from fix(ci): default the runner back to sequential, parallel is opt-in #647 is understood.

Why

The full glob is 13-15 minutes sequential on a Mac and every in-session worker paid it as the pre-push check. On this branch --changed picked 11 suites and finished in 124s, all green. CI keeps the full glob.

Proof

docs/verification/run-all-changed.md: green run of the real flow, the negative control (master runner, 6 of 7 cases red, restored), the first dogfood run that drove the code-lines-only match, and what is not proven.

The full glob is 13-15 minutes sequential on a Mac and every in-session worker was paying for it as its pre-push check. --changed selects suites by basename match, changed suites themselves, tests/test-<mod>*.sh for lib/<mod>/, plus test-meta for anything outside lib/. CI keeps the full glob.

RUN_ALL_JOBS defaults to auto on macOS: every parallel run there, CI and local, has been green; the flake that reverted the default in #647 is ubuntu-only, so Linux stays at 1.
A header comment naming a file is documentation, not a dependency: the wavefront suite's comment mentions run-all.sh and cost a 300s timeout on the first dogfood run. Selection now reads code lines only.

Six suites carry an '# always:' header and run on every --changed diff: kit-contract, config-registry, no-personal-paths, no-scattered-ids, boundary-lint, meta. They fail on a file you add while naming no file you touched, so no diff-derived pick can reach them. Measured floor on the Air: 72s serial for the five small ones, test-meta about 140s.
@tieubao
tieubao force-pushed the perf/run-all-changed branch from 150550f to 5b504fa Compare September 16, 2026 15:21
@tieubao
tieubao merged commit ed07180 into master Sep 16, 2026
1 check passed
@tieubao
tieubao deleted the perf/run-all-changed branch September 16, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant