Summary
Reduce routine cargo test time by avoiding full OS-random keygen on every run, while still keeping coverage of the real pipeline.
Background
Integration tests that call Context::keygen dominate wall time (on the order of minutes for demo Params::unsecure()). That cost is mostly key generation and FheUint::prepare, not BDD eval_threads. Developers and CI wait on work that does not need to be recomputed for every correctness check on homomorphic ops.
Options include: committed test vectors (serialized keys/ciphertexts), deterministic RNG seeds for keygen, or a split between fast regression tests and a slower smoke path.
Work
- Decide on a strategy: fixed seeds vs serialized fixtures (and whether keys/ciphertexts need public serde or an internal test-only harness).
- Document regeneration steps when
Params, Poulpy, or backend features change.
- Keep at least one full end-to-end test (real
keygen) in CI or as #[ignore] so integration regressions are still caught.
- Align with
conventions.mdc: safe defaults and clear docs if any test-only API is introduced.
Summary
Reduce routine
cargo testtime by avoiding full OS-randomkeygenon every run, while still keeping coverage of the real pipeline.Background
Integration tests that call
Context::keygendominate wall time (on the order of minutes for demoParams::unsecure()). That cost is mostly key generation andFheUint::prepare, not BDDeval_threads. Developers and CI wait on work that does not need to be recomputed for every correctness check on homomorphic ops.Options include: committed test vectors (serialized keys/ciphertexts), deterministic RNG seeds for
keygen, or a split between fast regression tests and a slower smoke path.Work
Params, Poulpy, or backend features change.keygen) in CI or as#[ignore]so integration regressions are still caught.conventions.mdc: safe defaults and clear docs if any test-only API is introduced.