Uh oh!
There was an error while loading. Please reload this page.
test(push): add fuzz targets for the dimension parsers - #257
Merged
Conversation
The CLI had zero fuzz targets (coverage audit). Fuzz the user-facing --target-size / --min-size parsers with two invariants that must hold for ANY input (and the fuzzer proves neither panics): - success => both dimensions strictly positive; - error => both dimensions zero (no partial/garbage pair leaks out). Seed corpus runs under plain `go test`; a 6s local `-fuzz` burst explored 25k+ execs with no failures. No production changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LukasWodka
commented
Jul 14, 2026
ContributorAuthor
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 5313126. Configure here.
saadqbal
approved these changes
Jul 14, 2026
saadqbal
left a comment
Collaborator
There was a problem hiding this comment.
LGTM 👍 Nice — first fuzz targets in the repo, and the two invariants (success⇒positive dims, error⇒(0,0)) match parseWxH's contract exactly. Good seed corpus (overflow, float, whitespace, half-empty pairs).
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CLI had zero fuzz targets (coverage audit). This fuzzes the user-facing
--target-size/--min-sizeparsers with two invariants that must hold for ANY input (and the fuzzer proves neither panics):Seed corpus runs under plain
go test; a local-fuzzburst explored 25k+ execs with no failures. No production changes.🤖 Generated with Claude Code
Note
Low Risk
Test-only addition with no changes to parser or CLI behavior.
Overview
Adds
internal/push/parse_fuzz_test.gowith fuzz coverage for the CLI--target-sizeand--min-sizeparsers (ParseTargetSize,ParseMinSize).A shared
fuzzWxHhelper registers a seed corpus (validWxH/W,Hforms plus malformed and edge-case strings) and checks two invariants on arbitrary input: successful parses must yield strictly positive width and height; failed parses must return (0, 0) with no leaked partial values. The same checks also guard against panics. Seeds run under normalgo test;go test -fuzz=...can explore further.No production code changes—test-only.
Reviewed by Cursor Bugbot for commit 5313126. Bugbot is set up for automated code reviews on this repo. Configure here.