CI: wai-conformance's independent verifiers compile wai-rs once per profile #477
Loading…
Reference in a new issue
No description provided.
Delete branch "ci/compile-once"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CI: wai-conformance's independent verifiers compile wai-rs once per profile
CI only. This PR's own run is the measurement.
What it changes
wai-conformance.yml, the independent verifiers job. Each wai-rs step used to runcargo test --no-default-features --features <one feature> --lib <mod>::or--test <name>with a feature list of its own, so each step rebuilt the crate from scratch. On Train C (heade77b92f7) that was 79 compiles ofwai: 29 cargo-minutes of a 64-minute job.The job now declares three feature lists, and each step uses one of them:
WAI_FEATURESWAI_PQ_FEATURESsynthesis,pq_signaturespq_signatureschanges what a build without it refuses (pq-signatures §6.3: such a build reads a hybrid member as an unknown one, inclaim_receipt,key_logandjwp_delivery). So it stays out of the union, and every other step keeps testing a build without itWAI_RELEASE_FEATURESdred_exact,synthesis_mark,robustness--releaseshare one release buildEach step runs the same selection it ran before:
--lib <module>::or--test <name>, with its filters. Only the feature list is new.Builds that overwrite each other. Two builds of the library that differ in features, or in their dependencies' features, write the same file. Each switch between them rebuilds the library and relinks every integration test built before the switch. There are two such pairs:
cargo buildandcargo test: the dev-dependencies turn on wai-ops'oracleand serde_json'spreserve_order;The first commit left both switches in place. In its CI run, one rebuild of about a minute came back at every switch, plus a relink of about 5 s per integration test. So the first step now runs in this order:
cargo buildbuilds them, the same kind of build the steps'cargo buildandcargo runmade before. The steps run these copies:$RUNNER_TEMP/wai-bins/union, withWAI_FEATURES:wai_http_vectors,wai_stage_measure,wai_browser_sink_vectors,wai_claim_vectors,wai_jwp_vectorsandwai_signer_vectors;$RUNNER_TEMP/wai-bins/pq, withWAI_PQ_FEATURES:wai_pq_vectors,wai_claim_vectors,wai_jwp_vectorsandwai_signer_vectors.cargo testthat finds its build fresh.The release build has a directory of its own. The hybrid signatures step builds its own tests, the job's one other test build.
wai-live-web's browser tests now run once, with
int_video. Its tests are a superset of the default build's, and the feature gates nothing off: wai-live-web has nocfg(not(feature)), and wai'sbrowser_sinkhas no feature gates.New job: features-alone (
linux-arm64: it only checks, so any architecture serves, and that label has free slots). It keeps the isolation the old steps gave. Each of the 41 feature lists that a step used to build alone is checked alone withcargo check --no-default-features --features <list> --tests. That checks the library (also as its unit tests see it), its binaries and the integration tests the list enables. wai-live-web is checked withoutint_videothe same way. It costs a check, not a test build.Compiles and minutes
Compiling wailines/actions/tasks)e77b92f7)7b933d94f(first commit)781c201bcd0b23afcb(this head; the differentials run twice)d0b23afcblinux-arm64, all 41 lists and wai-live-web)On the build host, from a cold target, this head's job prints
Compiling waiin only three places:cargo buildfor the union and for the hybrid list, the union's test build and the release build;Every other wai-rs step prints
Finished … in 0.0Xs.CI shows the same 7 lines. Running the differentials against both builds adds about 8 minutes (41.1 to 49.5). The job's other ~42 minutes are test and verifier run time, which compile-once does not touch. Main spent about 35 minutes that way too: 64 minutes less 29 of cargo.
Test lists, before and after (
cd/compare.py)The whole job ran twice on the build host from the same tree, with cold target directories: main's steps, then this head's. Every test result was collected by step, crate, profile, target and name.
ok. These are 524 distinct tests plus the two wai-live-web browser tests, which ran twice, once per build.ok, 526 distinct. None lost, none failed. In every step, the after list contains the before list.http_binding::tests_receipts::bearer_claims_are_checked_against_the_group_of_an_item, in the bearer step;synthesis::mark::sync::tests::a_crop_and_a_rotation_are_found_again, in the synthesis step.int_videorun are now one run. The default run's tests are all in it.Feature interaction
pq_signaturesis the one feature whose tests behave differently beside others. It changes the verdicts of code the other steps test, so it keeps its own build, as described above.differential.py,chain_differential.py,chain_gap_differential.py,signer_verify.py verdicts) rantarget/debug/wai_claim_vectors,wai_jwp_vectorsandwai_signer_vectors.cargo test --test …rewrites those copies, because cargo builds every binary for integration tests. So the build under test was whichever wrote last: the hybrid signatures step'spq_signaturesbuild, not thekey_discoverybuild that the first step made and the step's comment names.0 differ, 0 crashfor the claims,0 differ, 0 errorfor each chain and gap run, and an emptydiffof the signer verdicts. So no build order is assumed, and neither build loses coverage. The step takes about twice as long.Falsification (committed first, then broken, run, restored)
Three breaks went into one run on the build host: the first step, the two broken steps, and features-alone.
src/age_assurance.rsa_challenge_reads_exactlyassertedis_none(). Exit 101:age_assurance::tests::a_challenge_reads_exactly ... FAILED, with 8 passed, 1 failed and 1057 filtered out. The step's filter still selects the test under the union, and the step ran from the first step's build, in 0 s.tests/robustness.rsasserted!REASONS.contains(&Reason::TableIrreproducible). Exit 101:the_extension_lists_exactly_the_references_reasons_and_the_corpus_refuses_each ... FAILED, panicking attests/robustness.rs:112.src/live_events.rsgained a function that readscrate::live_room::DESCRIPTOR_MAGIC. With it present, the first step's union build passed (exit 0). features-alone failed atlive_eventswith exit 101:cannot find live_room in crate. The union hides such a break, and features-alone catches it.All three files were restored with
git checkout, andgit diff --quietis clean.Checks
ruby -ryaml -e 'ARGV.each{|f| YAML.load_file(f)}' .github/workflows/*.yml: parses.python3 ~/kani-logs/wfsteps.py HEAD origin/main: inwai-conformance.yml, 43 findings, each an intended change. Each is "body matches no source" for a rewritten independent-verifiers step (now including the differential step), or "name in no source" for the new build step and the features-alone job's steps. Two more findings are instandards-build.ymlandwai-web-wasm.yml. Both are main's own changes since this branch's base (#476 and #478); against the merge base, only the 43 remain.stepcheck.py origin/main HEAD, applies one rule to every step of the job on main: replace the feature list, drop wai-live-web's default-feature line, and replace each tool'scargo buildorcargo runwith its copy. The result must equal the step of the same name and position at HEAD. For the differential step, the set of commands must be equal, with the loop over both copies read as one copy. It must also find no other job changed and no top-level key changed. Result: 52 steps, 0 problems. It fails with exit 1 on each of three planted defects: a cross-wire (the takedown step running--test influence), a dropped gap differential, and the pq tool read from the union's copies.check-tests-in-ci.py(every--test NAMEis still literal in the steps),check-workflow-concurrency.sh,check-spec-refs.py,check-wai-section-refs.py,check-no-vanity-metrics.sh,test-public-text-checks.sh,check-comparative-prose.shandcheck-orphan-sources.py.CI runs
7b933d94f(run 10890): the independent-verifiers job finished in 49.0 min, success. Pushing the second commit then superseded the run through the concurrency group. Four of its jobs, all queued onlinuxand none started, were cancelled: cargo-class linux, quantum wasip2, byte-equality linux and features-alone.781c201bc(run 11100): independent verifiers finished in 41.1 min, success, along with everylinux-arm64andmacosjob and repo-checks. Its fourlinuxjobs were still queued when the next commit superseded it.d0b23afcb(run 11108): the differentials run against both builds, and features-alone moved tolinux-arm64. Results: independent verifiers 49.5 min, success, with both builds' groups reportingevery differential agrees; features-alone 7.9 min, success. The test list matches the earlier heads': 526 results, the same two extra tests, the second wai-live-web run folded in, no failure.Not done
/actions/tasks, are listed with the reasons:cargo-class corpora(14–21 min on 3 legs): its feature sets are deliberate isolations (a no-feature build,ffialone,cli_httpwith and withoutcli_tls). About 4.7 of its cargo-minutes are dev and test compiles, against 2.9 for its single release build.codec wrappers(0.9 min) andC2PA emission(1.7 min): one or two compiles each.wai-ops-gpuchecks (3 min),wai-jpegai-e2e(7 min) andwai-neural-gates(1.7 min, which includes a test that exists only withoutvideo_int).wai-http's falsify mutation shards (46–49 min, the longest left): Python only, no compile.🤖 Generated with Claude Code