Skip to content

ci: the lint runs in twelve shards; libs/crypto's allocation control survives -O3 - #28

Merged
pinhopro merged 2 commits into
mainfrom
ci/lint-shards
Nov 17, 2026
Merged

pinhopro merged 2 commits into
mainfrom
ci/lint-shards

Conversation

@pinhopro

Copy link
Copy Markdown
Contributor

Lint shards

On main's runs 43883027557 and 43991796754 the 60-minute limit cancelled Lint (5/8), then Lint (2/8). I measured the eight shards of six runs (48 jobs), with each job's log cut at the lint's own markers:

  • Every shard writes the same compilation database, about 2260 commands. It takes 12-15 minutes on most runners, 18 on some, and 26 on about one runner in eight (6 of 48 jobs).
  • The clang-tidy slices weigh about the same. In every run, each job's slice takes 1.2-1.7 times its own database, and no shard number is heavier from run to run: the slow shard was 5, 2, 6, 2, 3 and 4. Every cancelled shard, and every shard that took 67-72 minutes, ran on a slow runner, where the identical database also took 26 minutes. So the cause is how fast the runner is, not an unbalanced split, and weighting the slices would gain little. clang-tidy also does not log time per file, so there is nothing to weigh by.
  • Main has allowed 90 minutes since 38e0dce (ci and webrtc: lint shards may take 90 minutes; the interop's loopback check over the run #24), but slow runners still took 67-72 minutes there (runs 44011268560 and 44060501712).

The fix is twelve shards instead of eight, which cuts each slice by a third. A slow runner's shard should then take about 57 minutes and the others 30-40, so the 90-minute limit keeps about a third spare. The comment in library.yml states the numbers. Running the database on four more jobs costs about 11% more lint runner-minutes, and the lint finishes sooner. AGENTS.md and doc/releases/0.1.0.adoc are updated.

A possible follow-up is to write the database once, in a job of its own, and pass it with its generated inputs to the shards. That would remove the fixed cost from every shard. It is not attempted here.

libs/crypto

This records webcpporg/crypto#2 (ae937e5). secp256k1_allocation's control used delete new int(1), and -O3 removed that allocation on wasip2 and wasip3, so the release lanes failed. The control now calls ::operator new directly, which the compiler may not remove.

Local verification (macOS arm64)

  • tools/lint/lint.sh over the whole tree: clang-tidy is clean (1037 translation units), lint: clean.
  • tools/ci/matrix_test.py: ok. tools/ci/actions_test.py: ok. actionlint: clean.
  • crypto secp256k1_allocation and secp256k1_allocation_no_exceptions with -a: they failed on wasip2 release before the change, and after it both pass on native, wasip2, wasip3 and emscripten, at release and at debug.

🤖 Generated with Claude Code

R added 2 commits November 17, 2026 09:39
On main's runs 43883027557 and 43991796754 the 60-minute limit cancelled
Lint (5/8), then Lint (2/8). Measured over the eight shards of six runs (48
jobs), every shard spends 12 to 15 minutes writing the same compilation
database and 17 to 25 analysing its slice on most runners: the slices weigh
alike, each 1.2 to 1.7 times its own runner's database, so weighting them
would gain little. About one runner in eight runs at half that speed, the
database in 26 minutes; its shard took 67 to 72 minutes (runs 44011268560,
44060501712), past 60 and close to the 90 main now allows. Twelve shards cut
the slice by a third: such a runner's shard takes about 57 minutes, leaving
a third of the 90 spare.
Records webcpporg/crypto's fix/release-allocation-control, whose control
calls ::operator new instead of a new-expression that -O3 elided on wasip2
and wasip3, failing secp256k1_allocation and its no-exceptions twin at
variant=release.
@pinhopro
pinhopro merged commit ce2345c into main Nov 17, 2026
9 of 12 checks passed
@pinhopro
pinhopro deleted the ci/lint-shards branch November 19, 2026 02:42
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