The Cargo Feature That Quietly Turns Off Hedged ML-DSA Signing
Your ML-DSA signer can lose its hedging and nothing in the diff will show it. A test crate enables a deterministic mode on the shared signing library, the release job builds the whole workspace in one invocation, and Cargo merges that feature into the production binary. Signatures still verify, latency stays the same, and every dashboard stays green. The only thing that changed is the per-signature randomness, and the RNG failure path in your code may be removing it too.
Why review misses it
NIST's post-quantum signature standards, FIPS 204 in this case, define two signing modes for ML-DSA. Hedged signing mixes a fresh 32-byte random value into the per-signature nonce derivation. Deterministic signing replaces that value with zeros. Both modes produce valid signatures, so no verifier, interop test or known-answer vector can tell them apart, and the known-answer vectors actually need the deterministic mode to reproduce. That is why test harnesses switch it on. The pull request that does it touches only the Cargo.toml of a test member, the reviewer approves a test change, and the server crate never appears in the diff.
How the feature reaches production
Cargo resolves features once for each build invocation. When several workspace members are built together, they share one feature set on each common dependency, and the newer resolver does not prevent that, because it only separates dev-dependency features from normal builds. If CI runs one release build across the whole workspace and ships the server artifact from it, the test harness's deterministic feature becomes part of the server. You can see it today: from the workspace root, run cargo tree -e features -i followed by your signing crate's name, then run it again with -p and your server package. If the feature shows up in the first output and not in the second, your release depends on how CI invokes the build, and a pipeline refactor is enough to change your signing semantics without anyone noticing.
When the RNG fails, the signer should not degrade quietly
The same weakness hides in error handling: a wrapper that catches a getrandom failure (a seccomp profile blocking the syscall, an early-boot entropy stall in a minimal container) and falls back to the zero-randomness path keeps the service up while removing the property hedging exists to provide. Deterministic signing is not broken by design. It is more exposed: an attacker who can request signatures on the same message repeatedly and induce faults or collect power traces gets the same internal state every time, and differential fault analysis needs exactly that. From a resilience point of view, what keeps the system working when the entropy source fails has to be a decision someone made explicitly. Fail closed on signing, return an error the caller can retry against another replica, and raise an alert. Do not let a library default decide on your behalf that availability matters more than fault resistance.
A gate you can add this afternoon
Add a post-build smoke test that loads the exact artifact you are about to ship, generates an ephemeral key, signs one fixed message twice, and compares the two signatures byte for byte. Under hedged signing they will always differ. The decision rule is binary: identical signatures from a production artifact block the release, whatever cargo tree reported. The check is cheap because it tests the behaviour, not the configuration, so it catches feature unification, a fallback in the RNG wrapper, and a vendored fork that hardcodes the deterministic path, all with a single assertion. It will not tell you which of the three caused the failure, so you still need the cargo tree comparison and a read of the RNG wrapper to find the cause.
Technical FAQ: Can we just build the server crate on its own and skip the runtime check?
Building the server package on its own does fix the feature unification, but it leaves the RNG fallback and any patched dependency unchecked, and the next person to touch the pipeline can bring back the workspace build. Keep the build isolation and also run the two-signature comparison against the artifact you ship. The comparison costs milliseconds, and it is the only check that sees what the binary actually does.