What script/lint costs a lane, 2026-10-18 (provisional name)
Name: provisional, minted 2026-10-18 (UTC) by lane maintainer/lint-cost.
Measured 2026-10-18 and 19 (UTC) at base 6a71434e4 by lane maintainer/lint-cost. calef asked:
"start a lane to measure script/lint: per-stage timings, which checks stop the run, and reruns per
lane. Then bring the fix with numbers." This note measures and ranks fixes. Anything that changes
what a gate refuses, or where it runs, is calef's. The scripts are in
lint-cost-2026-10-18/.
Result.
- Tonight 16 lanes ran lint 178 times (61 full, 39
--no-cargo, 78 pre-push hooks), and 74 of those runs failed. A lint that reported every failure, instead of stopping at the first, would have needed 49 of the 74 (61 if only the measured cases count). - At the base, every one of lint's 99 sections stopped the run at its first failure. No section needs an earlier one to have passed. Ten planted failures took one fail-fast run to show one, and one pass that ran every section to show nine.
- Citations caused 26 of the 74 failures. 7 of those were the "commit first" refusal, and committing, with no edit, cleared each one.
- Locally, full lint took 265 to 481 s and
--no-cargo166 to 272 s, on a machine at load 18 to 125 from other lanes. In CI the lint job runs about 7.5 minutes: 5 inscript/lintand 1.5 compiling typos and cargo-machete, which happens in 32 of 36 jobs.
1. Where the time goes
Method. stagetime.py timestamps each ==> line, so a
section's time runs from its header to the next. Three runs per mode, on patagonia (8 cores). Cold
means a fresh worktree with no target/ and no __pycache__; the OS page cache and
~/.cargo/registry stayed warm, because clearing them needs root.
| mode | runs (s) | median (s) | cargo sections (s) |
|---|---|---|---|
--no-cargo, cold |
230, 196, 166 | 196 | 0 |
--no-cargo, warm |
197, 272, 246 | 246 | 0 |
| full, cold | 481, 381, 325 | 381 | 286, 228, 189 |
| full, warm | 349, 298, 265 | 298 | 175, 162, 141 |
Load decides these more than cache state does. The load average fell from 125 to 18 over the
two hours, and the cold runs came later, which is why cold --no-cargo reads faster than warm.
Compare within a row, not across rows. That is also the condition lanes run lint in, since every
lane shares this machine.
After patagonia rebooted on 2026-10-19, with the page cache empty, --no-cargo took 126 s at load
15 (data/reboot-nocargo-1.tsv). Three runs are
missing. The full lint after that reboot was cut off when the machine hung, and the cold runs on an
idle machine wait for the workstation. From 2026-10-19 patagonia's cargo configuration caps every
build at 4 jobs, so a full run taken later is not comparable with the twelve above, which ran
uncapped. Their raw files were lost in the reboot; the tables hold what was read from them.
The slowest sections are these, as medians of the three warm full runs in seconds. The clippy lint ratchet took 31, the trunk watcher's selftests 23, observed-failing selftests 18, counted claims 11, Kani clippy 9, spelling 9, names 8 and the prose ratchet 8.
CI, from the logs of 5 successful lint jobs on 2026-10-18
(cistages.py): script/ci-build lint took a median of 288 s,
186 of it in cargo sections and 97 in the rest. The job's steps, medians over 36 successful jobs:
| step | median (s) | range (s) |
|---|---|---|
| install the lint tools (cargo-machete, typos) | 102 | 0 to 116 |
script/ci-build lint |
304 | 199 to 330 |
| everything else | about 50 |
Local and CI are not comparable section by section. CI runs on an idle 4-core Linux runner with a
restored cache; patagonia is shared. One gap is specific to macOS: executing a file that was just
written costs about 150 ms the first time. 100 fresh two-line scripts took 15.1 s, the same 100 a
second time 0.6 s, and sh file on a fresh file cost nothing. The selftests write stub git, gh
and sleep executables into temp directories, so they pay it per stub. The trunk watcher's
selftests take 21 to 39 s here and 3 s in CI.
Lint sits on the critical path of a prose-only pull request. For those, the suites are skipped and lint is the slowest job (392 to 489 s in tonight's runs). When code changes, the CPU matrix (about 850 s) finishes last.
2. Which sections stop the run, and whether they must
At the base, script/lint was one set -e shell script. Each section exits non-zero on failure,
so the first failing section ended the run. That holds in --no-cargo too.
Ten failures were planted on a scratch branch that was never pushed. They were a broken intra-doc link, a clippy warning, a bool function named as a statement, a bare citation, an em-dash, a typo, British spelling, an unowned TODO, a dead markdown link and an uncommitted edit adding a citation. Results:
- Full lint stopped at section 4 (clippy, host crates) after 23 s and reported one.
--no-cargostopped at the citations ratchet's "commit first" after 54 s and reported one.- Running every section on its own (sections.py) reported
nine, plus one nobody planted: the new functions lacked
Name:blocks. The clippy failure showed in 11 sections, one per configuration that compiles the crate. The TODO plant was wrong: the check matchesTODO(andTODO:, and the plant had neither. - The bare citation stayed hidden behind the uncommitted one, because
script/citationsstops inside the check.
Does any stop protect a later section? Each section was run alone, with only lint's preamble, on a
clean tree. 98 of 99 passed. The one that failed, the commit-msg hook check, reads lint_root, a
variable the section before it sets. One file dependency exists: the four uefi_loader clippy
sections read the kernels that the section before them builds, and say so. Neither justifies
stopping the whole run. A later section that depends on a failed earlier one fails too, and the
verdict is still "fail".
The citations refusal stops for a reason that holds inside its own check: it judges the committed tip, and an uncommitted citation edit would make its report describe old lines. Nothing in that reason applies to the other 98 sections.
3. Reruns per lane
A subagent read the 17 transcripts of tonight's lanes (2026-10-18, about 16:00 UTC onward, plus one lane's morning). It counted every lint command, every push with the hook and each failure's section. A hook run that passed prints nothing, so it is inferred from the push. Counts are measured unless marked.
| pull request | full | --no-cargo |
hook | failed | fix cycles | every-failure lint would need |
|---|---|---|---|---|---|---|
| #2373 | 1 | 11 | 5 | 11 | 12 | 7 |
| #2378 | 5 | 0 | 3 | 4 | 4 | 2 |
| #2379 | 6 | 0 | 6 | 4 | 3 | 2 |
| #2380 | 8 | 0 | 2 | 5 | 5 | 3 |
| #2356 | 0 | 2 | 17 | 8 | 7 | 6 |
| #2354 | 12 | 0 | 7 | 5 | 5 | 2 |
| #2353 | 0 | 5 | 8 | 5 | 4 | 5 |
| #2332 | 19 | 0 | 9 | 13 | 12 | 8 |
| #2372 | 6 | 0 | 2 | 6 | 6 | 3 |
| #2370 | 1 | 0 | 2 | 0 | 0 | 0 |
| #2369 | 2 | 2 | 2 | 3 | 3 | 2 |
| #2352 | 0 | 15 | 6 | 5 | 5 | 5 |
| #2364 | 0 | 0 | 3 | 2 | 2 | 1 |
| #2360 | 0 | 0 | 1 | 0 | 0 | 0 |
| #2351 | 1 | 0 | 3 | 0 | 0 | 0 |
| #2382 | 0 | 4 | 2 | 3 | 3 | 3 |
| total | 61 | 39 | 78 | 74 | 71 | 49 |
The last column is failed runs minus those whose problem was already in the tree at the previous failed run (25: 13 measured, 12 estimated). 13 failures were a lane's first, 12 were introduced by the fix before them, 10 are unknown, 8 were the same problem again, and 7 were "commit first". Eight of #2332's 19 full runs were in its morning session.
Which sections failed, in failed runs: citations without a grounded gloss 19, the prose ratchet 12, citations "commit first" 7, the module-block ratchet 7. Names, house style, roadmap status and fmt had 3 each, and eleven other sections 2 or fewer. Two hook failures passed on an unchanged retry seconds later, and their output was cut off, so their cause is unknown.
This lane met the refusal too. Its full run after the reboot stopped at the citations ratchet after 210 s, because the untracked timing files it was writing name ยง212 (a prose budget).
In CI, 4 of tonight's lint jobs failed: a broken intra-doc link (rustdoc, which the hook skips), a stale naming-baseline row in a merge group, and the prose ratchet twice in one merge group.
4. The pre-push hook
.githooks/pre-push runs script/fmt --check (3 to 7 s here), then script/lint --no-cargo (the
rows above), then, with nife.fleet set, script/lint-fleet (19 to 23 s). This lane's own push of
#2387 took 201 s. The commit-msg hook only checks the trailer, so nothing is duplicated there. CI
reruns everything, which is intended: CI is the authority.
Two costs come from what the hook reads. It reruns --no-cargo even when the lane has just passed
full lint on the same tree. And it lints the working tree, not the commits being pushed: one
"commit first" refusal tonight fired inside the hook. So an uncommitted edit can fail a clean push,
and an uncommitted fix can pass a push whose commits CI will refuse.
5. Fixes, ranked by time saved per lane
Each saving is an estimate built on the counts above, at a typical failed run of about 2 minutes from the transcripts.
- Run every section and report every failure, then exit non-zero if any failed. It would have
removed 25 of 74 failed runs, about 50 lane-minutes tonight, or 4 per lane. A summary at the end,
listing each failing section, also covers the 8 reruns that only reread output cut off by
tail. The verdict cannot change: a run passes exactly when every section passes, in both orders of reporting. What changes is that a failing CI lint job runs to the end, up to 5 minutes, instead of stopping early. Pure speedup, andscript/lintnow does it throughhelpers/lint-sections.sh. Its selftest checks the verdict against fail-fast's over 16 combinations of planted failures, in both modes. - Cache the CI lint tools by version. This saves about 100 s of the lint job on 32 of 36 runs,
which is the time to green on a prose-only pull request. Keyed on the version
cargo installwould fetch, so the tool and its verdict are the ones the job uses now. Pure speedup; it touches the cache layout, which the CI toolchain lane is measuring. - The hook skips
--no-cargowhen the same tree, merge base and lint already passed on this machine. That saves one 2-to-4-minute run per push that follows a passing lint. How many of the 78 hook runs that was is not measured. The verdict stays the same as long as the key covers every input a check reads; the merge base matters because the citations ratchet compares against it. - Fewer fresh executables in the selftests, for example by writing each stub once per content into a cache directory. That saves part of a 40 to 60 s gap between local and CI in the stub-heavy sections; this is an estimate. Pure speedup.
- Run independent text sections in parallel. It would save most of CI's 97 s of text checks. It would save little here, where other lanes already saturate the cores. Pure speedup; the sections already share nothing but the preamble.
These change what a gate refuses, so they are calef's, one at a time:
- Citations judges uncommitted edits as if committed (a temporary tree object), instead of refusing. It would remove the 7 refusals; in 2 of them nothing else failed. CI judges commits either way.
- The hook lints what it pushes (a checkout of the pushed commit) rather than the working tree. This makes the hook's verdict CI's, at the price of a checkout per push.
- Pin typos and cargo-machete to versions. Today each CI job installs the latest, so a new typos dictionary can change the spelling verdict between two runs of the same tree.
A fast mode scoped to the files a branch touched is not proposed. It would change what lint refuses, and fix 1 recovers most of what it would.