test(playback): fuzz the note renderer for stuck notes under seek/loop stress#6453
Merged
Merged
Conversation
…p stress Drive ArrangementNoteRenderer through 8 fixed-seed x 600-op randomized seek / set_loop / set_playing sequences (with random block sizes) over a document of overlapping sustained, short, and retriggering notes, then assert the physical MIDI stream never leaks a note: a per-key on/off toggle invariant every block, plus a terminal stop-flush that must leave has_active_notes() == false with every note-on matched by a note-off. Randomness is deterministic (std::mt19937 over hardcoded seeds, never random_device) so CI is reproducible; a red on any seed is a real stuck-note defect, not a flake. Aggregate non-vacuity witnesses assert the run actually exercised the risky paths (notes held live across seeks and loop wraps), so the final all-clear cannot be a vacuous green. Documents the fuzz coverage and its invariant in the playback skill's Validation section. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
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 free
to 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.
Phase-2 DoD Proof #4: no stuck notes under randomized seek/loop stress.
What
Adds one fuzz case to the already-registered
test_playback_note_renderer.cpp(targetpulp-test-playback-note-renderer) that drivesArrangementNoteRendererthrough 8 fixed-seed x 600-op randomizedseek/set_loop/set_playingsequences (with random block sizes) over a document of overlapping sustained, short, and retriggering notes.Invariant asserted
has_active_notes()must be false and every note-on matched by a note-off (per seed).Reproducible, non-vacuous
std::mt19937over hardcoded seeds, neverrandom_device. A red on any seed is a real stuck-note defect, not a flake.> 0) prove the risky paths were exercised:saw_active_blocks=1445,seeks_over_active_notes=186(seeked out of sounding notes),loop_wrap_blocks=205,loop_wrap_over_active=61(wrapped a loop while notes were live).REQUIRE_FALSE(renderer.has_active_notes()).Validation
pulp-test-playback-note-renderer— 22709 assertions in 15 test cases, all passed (Release).gates.sh origin/mainclean; skill-sync + docs-noise + version-bump (no bump needed) all pass. Documents the fuzz coverage in theplaybackskill's Validation section.🤖 Generated with Claude Code
https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
🔎 Provenance
claudem3/Volumes/Workshop/Code/pulp-proof4c66f4a64-25ea-42e5-b184-d48611a066a2Resume
Jump to this tab
Relaunch (any agent)
Restore URL — https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS
stamped 2026-07-22 03:25 UTC