Repository navigation
test: add fuzz testing using hypothesis - #57
sumanjeet0012 wants to merge 2 commits into
Conversation
acul71
left a comment
There was a problem hiding this comment.
Review (maintainer) — Request changes
Thanks for adding Hypothesis fuzz coverage for decode() — this aligns well with #43 and CI is green.
Blocker
Missing newsfragment for issue #43. Please add something like:
newsfragments/43.misc.rst
Added Hypothesis-based fuzz tests for ``decode()`` robustness.(File must end with a newline.) Type misc or internal is appropriate for a test-only change.
Also recommended
- Rebase onto current
origin/master(branch is ~6 commits behind; dry-run merge had no conflicts, butpyproject.tomloverlaps with open #49 and #56). - In
test_roundtrip_never_crashes, when both encode and decode succeed, assertdecoded == dataso silent corruption cannot pass. - Consider seeding Hypothesis with multibase spec vectors (closer to go-multibase
FuzzDecode/ the #43 proposal).
Validation (local)
make lint— passmake typecheck— passmake test— 269 passedmake docs-ci— pass
Full write-up: maintained locally as AI-PR-REVIEW-57-0.md.
|
Hi @sumanjeet0012 — friendly follow-up. I requested changes on this PR on 2026-09-07 (mainly the missing towncrier newsfragment, plus the other notes in that review). I don’t see any new commits addressing those items yet. Are you still willing / able to carry this PR forward? If yes, please push the requested updates when you can and I’ll re-review promptly. If your bandwidth has changed, no worries — just say so and we can close it or leave it for someone else to pick up. |
Fixes #43
Description
This pull request introduces fuzz testing for the
py-multibasedecoder. It implements the fuzz target usinghypothesisto exercise the decode pipeline with random binary, string, and encoded permutations to ensure the package handles malformed input safely without crashing.Changes
hypothesisas a development dependency inpyproject.toml.tests/test_fuzz.pycontaining:test_decode_never_crashestest_decode_string_never_crashestest_roundtrip_never_crashes