Skip to content

Faster tests via fixtures or deterministic keygen #19

Description

@cedoor

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

testRelated to test coverage, test infrastructure, or missing test cases

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions