Shard the WebCryptoAPI WPT suite #8853
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.63) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.63 · 300 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.341
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.063
Real PR Conversation Timeline
1 comments
"Review active on #8853"
general
weight: 0.35
npaun
The WebCryptoAPI WPT suite runs as one test of about 210 files. It takes 25 seconds in an ASan build and 35 in TSan, and most of that is generating RSA keys: the three RSA files of
generateKey/successestake 16 of the 25 seconds, andsuccesses_RSA-OAEP.https.any.jsalone takes 10. Splitting the suite by file can't bring it much below that one file.WPT splits such files into variants that each select a range of
subsetTest()calls (// META: variant=?1-10), and runs each variant as its own test. This PR makes the harness do the same, and lets awpt_test()target be sharded.Harness
subsetTest()runs only the calls in the range that the test's variant selects, as/common/subset-tests.jsdoes. A test without such a variant still runs them all.…/successes_RSA-OAEP.https.any.html?1-10) as WPT reports them. Files withexpectedFailuresstill run whole, so each expected failure is still checked against all of the file's subtests.subsetTest()calls (such assetup - define testsinhkdfandpbkdf2) run once per variant, as in WPT. Apart from those, the suite runs the same subtests with the same results: 1786 expected failures before and after.encoding's two files with range variants also split, and run the same subtests as before.Sharding
wpt_test()acceptsshard_count. The generated module readsTEST_TOTAL_SHARDSandTEST_SHARD_INDEXfromcloudflare:workers, and shard i runs every n-th unit starting at i. Its report and stats cover only the units it ran.wd_test()gains asupports_shardingattribute, which makes the test script touchTEST_SHARD_STATUS_FILEso that Bazel accepts the sharding.wpt_test()sets it.wpt_logs.pyalso reads the logs inshard_<n>_of_<count>/directories, and adds up the stats of a target's shards.WebCryptoAPI now uses 8 shards, and drops from
enormoustolarge. Timings on Linux x64, slowest shard (before: the whole test):| Config | Before | After |
| --- | --- | --- |
| debug | 33.0s | 8.2s |
| ASan | 25.7s | 7.1s (max of 5 runs) |
| TSan | 35.2s | 10.4s (max of 5 runs) |
All
//src/wpt/...targets pass.🤖 Generated with Claude Code