Repository navigation
Add tests for the gaps found by mutation testing - #1020
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused regression tests are sound; only a minor inaccurate explanatory comment remains.
1 open finding
What changed in this PR
Adds mutation-testing regressions for previously unpinned PLONK constraints and serialization behavior.
Changes:
- Tests scalar, point, selection, decomposition, fixed-base, and permutation constraints.
- Tests truncated prover-key deserialization.
- Pins the Hades compression dictionary.
| File | Description |
|---|---|
tests/assert_scalar.rs |
Tests constant witness binding. |
tests/assert_point.rs |
Tests both public point coordinates. |
src/composer/tests/soundness/select.rs |
Tests every selection-gadget gate. |
src/composer/tests/soundness/point.rs |
Tests point negation and constant coordinates. |
src/composer/tests/soundness/fixed_base.rs |
Tests fixed-base scalar width enforcement. |
src/composer/tests/soundness/decomposition.rs |
Tests bit booleanity and gate layouts. |
src/composer/tests/soundness.rs |
Registers selection soundness tests. |
src/composer/tests.rs |
Tests shared-witness permutation linkage. |
src/composer/compress.rs |
Pins Hades dictionary values. |
src/compiler/prover.rs |
Tests truncated-segment rejection. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1020 +/- ##
==========================================
- Coverage 92.25% 92.20% -0.06%
==========================================
Files 81 82 +1
Lines 8887 9098 +211
==========================================
+ Hits 8199 8389 +190
- Misses 688 709 +21
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
a5a9b51 to
34b8911
Compare
|
Force-pushed: squashed into one commit. The tree is unchanged. |
34b8911 to
68a7472
Compare
|
Force-pushed: amended Copilot's note into the commit. |
moCello
left a comment
There was a problem hiding this comment.
APPROVE — Each new test reaches the constraint or check it names, and every item of the linked issue has a test.
The only prior point, the torsion comment, is fixed at this head. The Copilot review was written against a5a9b51, an earlier head of this branch that a later force-push replaced.
One note below, on the Hades dictionary pin. It asks for nothing to merge.
Mutation testing of dusk-plonk 0.24.0 found code that no test pins. Each test below fails on the mutant it targets: - Test that append_constant pins its witness to the constant - Test that append_public_point exposes both coordinates - Test that point negation and constant points bind their coordinates - Test that the selection gadgets bind every gate - Test decomposition bit booleanity and pin its layout - Test that a shared witness links its gates in the copy permutation - Test that Prover::try_from_bytes rejects truncated segments - Pin the Hades dictionary of compressed circuits - Test that the fixed-base scalar fits its bit width
68a7472 to
d733199
Compare

Summary
Resolves #1019.
Tests only, so there is no changelog entry. Each test fails on the mutant it targets and passes on the released dusk-plonk 0.24.0.
Legacy V1 verification is out of scope: this release can't produce a V1 proof, so covering it needs a V1 fixture from an older revision.