Skip to content

fuzz: minimization [TEST PR, IGNORE]#4500

Draft
joostjager wants to merge 2 commits intolightningdevkit:mainfrom
joostjager:fuzz-minimize
Draft

fuzz: minimization [TEST PR, IGNORE]#4500
joostjager wants to merge 2 commits intolightningdevkit:mainfrom
joostjager:fuzz-minimize

Conversation

@joostjager
Copy link
Contributor

Companion to #4497

@ldk-reviews-bot
Copy link

👋 Hi! I see this is a draft PR.
I'll wait to assign reviewers until you mark it as ready for review.
Just convert it out of draft status when you're ready for review!

The sanity check (cargo test on fuzz targets) doesn't use the
restored corpus and was blocking the actual fuzz run. Move it to
a separate fuzz_sanity job so both run in parallel.

AI tools were used in preparing this commit.
Replace the fixed 30s run_time with iteration counts scaled to 8x
corpus size (plus a 1000 baseline) with a 10-minute hard cap per
target. This ensures the full corpus is replayed with room for
mutations, while small targets finish quickly.

On main (and on PRs with the fuzz-minimize label), run honggfuzz
corpus minimization after each target to prune inputs that don't
contribute unique coverage, keeping the cache size manageable.

Print a summary table at the end with per-target stats: iterations,
corpus sizes before/after fuzzing and minimization, and run times.

Other changes:
- Use -q (quiet) to suppress per-iteration status output
- Set 3s per-input timeout (-t 3) for all targets
- Pass FUZZ_MINIMIZE env var from PR label in workflow

AI tools were used in preparing this commit.
@codecov
Copy link

codecov bot commented Mar 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.16%. Comparing base (d830f10) to head (ec4b60e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4500      +/-   ##
==========================================
- Coverage   86.18%   86.16%   -0.02%     
==========================================
  Files         160      160              
  Lines      107536   107536              
  Branches   107536   107536              
==========================================
- Hits        92680    92663      -17     
- Misses      12231    12245      +14     
- Partials     2625     2628       +3     
Flag Coverage Δ
tests 86.16% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants