chore(ci): the merge gate tests in --release; release workflow gains --test-threads=1 - #750
Merged
Merged
Conversation
…--test-threads=1 The merge gate ran the suite in debug while the release workflow ran release. The debug gate was the anomaly, and the codebase said so: the crypto property tests scale their case counts UP outside debug (3 -> 10), so the gate ran the reduced variant of exactly the properties it exists to check, and state_machine/mod.rs documents an adjacency check that "silently did not execute in a debug run, which is the profile the suite is usually exercised in". The gate now exercises the shipped profile. ci.yml: both test commands gain --release. The all-features Build step stays debug deliberately — the gate now compile-checks both profiles. release.yml: the workspace test line gains --test-threads=1. The dsm_sdk suites share process-global singletons and #[serial] only serializes #[serial] tests against each other, so this workflow ran a parallelism the merge gate never exercised. The storage-node line is untouched in both workflows — that crate has always run parallel, green. Semantics of the switch: debug_assert!s no longer execute in the gate (they supplement Result-returning checks; the debug Build step still compiles them), and overflow wraps where debug panics — value paths use checked_* arithmetic by doctrine, and the release board is green with an identical test inventory. overflow-checks=true in [profile.release] would change production behavior and is left as a separate decision. New gate run locally, exact commands, pinned 1.98.0: workspace 3919/0 across 72 suites; node 270/0; make lint exit 0; production safety exit 0. Wall clock: 9m17s including the cold release compile, vs ~32 min of test execution alone under debug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The merge gate ran the test suite in the debug profile while the release
workflow ran it in release. The debug gate was the anomaly, and the codebase
already says so in two places:
(
if cfg!(debug_assertions) { 3 } else { 10 }insphincs_pbt_tests.rs,determinism_pbt_tests.rs,kyber_pbt_tests.rs,signatures.rs), so thegate has been running the reduced variant of exactly the properties it
exists to check.
state_machine/mod.rsdocuments a hash-adjacency tamper check that"silently did not execute in a debug run, which is the profile the suite is
usually exercised in."
The gate should exercise the profile that ships. It now does.
Changes
ci.yml — both test commands gain
--release. The separatecargo build --locked --workspace --all-featuresstep deliberately staysdebug: with the test step on release, the gate now compile-checks both
profiles instead of one.
release.yml — the workspace test line gains
--test-threads=1. Thedsm_sdk suites share process-global singletons and
#[serial]onlyserializes
#[serial]tests against each other, so this workflow was runninga parallelism the merge gate never exercised — a latent flake source, now
closed. The storage-node line is untouched in both workflows: that crate has
no shared-singleton problem and has always run parallel.
The local board definition (CLAUDE.md, gitignored) is updated to match.
What the profile switch changes semantically
debug_assert!s (sphincs length checks, the SMT collision check) no longerexecute in the Test step — but they still execute in CI on every run: the
Coverage job (
cargo llvm-cov, ci.yml:273) runs the full workspace suite indebug, serial, and is untouched here. Across the two jobs the gate now
exercises BOTH profiles at run time, where before it ran debug twice.
overflow-checksoverride exists anywhere in the workspace. The value pathsuse
checked_*arithmetic by doctrine, and the release board passing withan identical test inventory is the run-level evidence the suite does not depend on
debug-only panics. If wrap-on-overflow in the shipped artifact is itself
unwanted,
overflow-checks = trueunder[profile.release]is a separatedecision — it changes production behavior, so it is flagged here rather
than bundled.
Verification (new gate, exact commands, pinned 1.98.0)
Timing on this machine: the debug board spent ~32 min executing tests
(20 min of it in the dsm_sdk lib suite alone, dominated by unoptimized
SPHINCS+). Release: 9m17s
total wall including the cold compile, 4.5 min of it test execution — ~7×
faster on the test half even while the property suites run 3× the cases.
Test-inventory parity was checked, not assumed: the release run's one-test
delta against the last debug board is #749's rounding vector, which merged
between the two runs; ignored counts are identical (17), and no
cfg(not(debug_assertions))test exists anywhere in the workspace.