Skip to content

Add tests for the gaps found by mutation testing - #1020

Merged
HDauven merged 1 commit into
masterfrom
test/mutation-gaps
Oct 11, 2026
Merged

HDauven merged 1 commit into
masterfrom
test/mutation-gaps

Conversation

@HDauven

@HDauven HDauven commented Oct 10, 2026

Copy link
Copy Markdown
Member

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.

  • 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

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

Comment thread src/composer/tests/soundness/point.rs Outdated
@codecov

codecov Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.18692% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.20%. Comparing base (7381206) to head (d733199).

Files with missing lines Patch % Lines
tests/assert_point.rs 75.00% 7 Missing ⚠️
src/compiler/prover.rs 70.58% 5 Missing ⚠️
src/composer/tests/soundness/select.rs 88.63% 5 Missing ⚠️
src/composer/compress.rs 80.00% 2 Missing ⚠️
src/composer/tests/soundness/decomposition.rs 93.54% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
src/composer/tests.rs 100.00% <100.00%> (ø)
src/composer/tests/soundness/fixed_base.rs 85.71% <100.00%> (+0.55%) ⬆️
src/composer/tests/soundness/point.rs 94.79% <100.00%> (+0.45%) ⬆️
tests/assert_scalar.rs 93.10% <100.00%> (+1.92%) ⬆️
src/composer/compress.rs 95.77% <80.00%> (-0.46%) ⬇️
src/composer/tests/soundness/decomposition.rs 96.29% <93.54%> (-3.71%) ⬇️
src/compiler/prover.rs 95.26% <70.58%> (-0.79%) ⬇️
src/composer/tests/soundness/select.rs 88.63% <88.63%> (ø)
tests/assert_point.rs 86.07% <75.00%> (-6.09%) ⬇️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7381206...d733199. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@HDauven
HDauven force-pushed the test/mutation-gaps branch from a5a9b51 to 34b8911 Compare October 10, 2026 12:02
@HDauven

HDauven commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

Force-pushed: squashed into one commit. The tree is unchanged.

@HDauven
HDauven force-pushed the test/mutation-gaps branch from 34b8911 to 68a7472 Compare October 10, 2026 12:14
@HDauven

HDauven commented Oct 10, 2026

Copy link
Copy Markdown
Member Author

Force-pushed: amended Copilot's note into the commit.

@HDauven
HDauven marked this pull request as ready for review October 10, 2026 12:15

@moCello moCello left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/composer/compress.rs
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
@HDauven
HDauven force-pushed the test/mutation-gaps branch from 68a7472 to d733199 Compare October 11, 2026 14:51
@HDauven
HDauven merged commit f717b68 into master Oct 11, 2026
13 checks passed
@HDauven
HDauven deleted the test/mutation-gaps branch October 11, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cover the test gaps found by mutation testing

3 participants