Skip to content

Fuzz clean logs#4497

Draft
joostjager wants to merge 10 commits intolightningdevkit:mainfrom
joostjager:fuzz-clean-logs
Draft

Fuzz clean logs#4497
joostjager wants to merge 10 commits intolightningdevkit:mainfrom
joostjager:fuzz-clean-logs

Conversation

@joostjager
Copy link
Contributor

No description provided.

@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!

Log the number of corpus files before each fuzz target runs, making it
easier to assess whether the 30 second time limit is sufficient to
replay the full corpus. Also remove the -v flag from honggfuzz to cut
down on per-thread status line noise in CI logs.

AI tools were used in preparing this commit.
After the regular fuzzing pass, run honggfuzz in minimize mode (-M)
on main branch builds. This prunes corpus inputs that don't
contribute unique coverage, preventing unbounded cache growth.

AI tools were used in preparing this commit.
Instead of a fixed 30s run_time, set iterations to 3x corpus size
plus a baseline of 1000. This ensures the full corpus is always
replayed with room for new mutations, while small targets finish
quickly. A 5 minute hard cap prevents any single target from
running too long.

AI tools were used in preparing this commit.
Log timestamps at each phase (target verification, write-seeds,
honggfuzz install, build, per-target fuzz start/finish, and
corpus minimization) to identify where time is spent.

AI tools were used in preparing this commit.
Add quiet flag to both fuzzing and minimization runs to reduce
log noise from per-iteration status lines.

AI tools were used in preparing this commit.
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.
@codecov
Copy link

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.18%. Comparing base (7d82e14) to head (e5aa5df).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4497      +/-   ##
==========================================
- Coverage   86.19%   86.18%   -0.02%     
==========================================
  Files         161      160       -1     
  Lines      107459   107441      -18     
  Branches   107459   107441      -18     
==========================================
- Hits        92621    92594      -27     
- Misses      12219    12227       +8     
- Partials     2619     2620       +1     
Flag Coverage Δ
tests 86.18% <ø> (-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.

Target ~30 minutes of total fuzzing time (up from ~12 minutes)
by increasing the per-target iteration count from 3x to 8x corpus
size. Raise per-target time cap from 5 to 10 minutes.

AI tools were used in preparing this commit.
Minimization now runs unconditionally (not just on main) and logs
the corpus size after each target is minimized.

AI tools were used in preparing this commit.
Show the new corpus count and how many files were added, giving
visibility into which targets are discovering new coverage.

AI tools were used in preparing this commit.
The default 1s timeout is too short for chanmon_consistency_target,
causing inputs to be killed before completion.

AI tools were used in preparing this commit.
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.

2 participants