You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PYTHON-6178 Persist coverage-increasing inputs from the nightly BSON fuzz runs - #3215
The nightly fuzz task now harvests its coverage-increasing inputs into the committed fuzz/corpus/ and opens an automated [Fuzz Corpus] PR against main, so later nights build on prior discoveries instead of restarting from the spec seed corpus.
Harvest dedupes by content digest against a baseline manifest recorded at setup, caps growth at 50 units per run and 64 KiB per unit (overridable from Evergreen), and treats a run that finds nothing new as a clean no-op.
Crashing inputs are excluded automatically: a crashing target fails the task before the harvest command runs, so reproducers keep the existing fuzz/regression/ triage flow.
Test Plan
just test test/test_fuzz_harvest.py: 8 unit tests for the harvest module (digest diffing, caps, summary, no-op), written first.
just setup-tests fuzz fuzz writes a 485-digest baseline manifest, and a unit committed in fuzz/corpus/ reaches both the scratch corpus and the baseline.
Evergreen patch on fuzz-regression-rhel8: task green; seeding, baseline manifest, and target replay verified on a real host (patch run).
Evergreen patch of the nightly fuzz task, using a temporary in-patch guard that runs the harvest without PR creation: all three targets ran 60s crash-free, and the harvest kept 50 units while skipping 17 oversize and dropping 58 over the per-run cap (patch run).
The GitHub-facing PR creation needs the App secrets, so the first real nightly after merge exercises it.
Checklist
Checklist for Author
Did you update the changelog (if necessary)? (The repo has no changelog file.)
Is there test coverage?
Is any followup work tracked in a JIRA ticket? If so, add link(s). (None filed.)
Checklist for Reviewer
Does the title of the PR reference a JIRA Ticket?
Do you fully understand the implementation? (Would you be comfortable explaining how this code works to someone else?)
Is all relevant documentation (README or docstring) updated?
The nightly fuzz run seeds from a committed fuzz/corpus/ directory and, after a green run, harvests its coverage-increasing inputs into an automated [Fuzz Corpus] PR, so later nights build on prior discoveries instead of restarting from the spec seeds. Harvest dedupes by content digest and caps growth at 50 units per run and 64 KiB per unit, overridable from Evergreen; nothing new means no PR. Crashing inputs fail the task before harvest runs, keeping reproducers on the fuzz/regression/ triage flow.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
The nightly harvest’s comment-bot bootstrap lacks assumed-role AWS credentials, preventing it from retrieving GitHub App secrets and creating a PR when changes are harvested.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Harvested fuzz inputs are not replayed across all targets before publication, and spec-resync commits omit the public suffix list, risking untriaged crashes and incomplete or failed updates.
Replay harvested inputs against all targets before publishing
.evergreen/scripts/harvest-fuzz-corpus.sh:26
handle_fuzz() runs the targets sequentially against one shared corpus, so inputs discovered by later targets are not checked by targets that already finished. A green run can therefore publish an input that fails another target, bypassing the intended crash-triage flow. Replay the harvested files through all three targets in fixed-input mode and abort on failure before creating the PR.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The authenticated GitHub App push/PR flow remains untested and shares plumbing with spec resync, so credential bootstrap and create/update behavior need confirmation on Evergreen.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Within-run deduplication misses identical candidates, allowing duplicates to consume the harvest cap, exclude distinct inputs, and inflate the reported count.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The GitHub App-authenticated publication flow needs maintainer validation with production secrets to confirm token acquisition and permissions, branch pushing, and PR creation/update end to end.
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
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.
PYTHON-6178
Changes in this PR
fuzztask now harvests its coverage-increasing inputs into the committedfuzz/corpus/and opens an automated[Fuzz Corpus]PR against main, so later nights build on prior discoveries instead of restarting from the spec seed corpus.fuzz/regression/triage flow.Test Plan
just test test/test_fuzz_harvest.py: 8 unit tests for the harvest module (digest diffing, caps, summary, no-op), written first.just setup-tests fuzz fuzzwrites a 485-digest baseline manifest, and a unit committed infuzz/corpus/reaches both the scratch corpus and the baseline.fuzz-regression-rhel8: task green; seeding, baseline manifest, and target replay verified on a real host (patch run).fuzztask, using a temporary in-patch guard that runs the harvest without PR creation: all three targets ran 60s crash-free, and the harvest kept 50 units while skipping 17 oversize and dropping 58 over the per-run cap (patch run).Checklist
Checklist for Author
Checklist for Reviewer