Skip to content

test(playback): fuzz the note renderer for stuck notes under seek/loop stress#6453

Merged
shipyard-local[bot] merged 1 commit into
mainfrom
feature/timeline-stuck-note-stress
Jul 22, 2026
Merged

test(playback): fuzz the note renderer for stuck notes under seek/loop stress#6453
shipyard-local[bot] merged 1 commit into
mainfrom
feature/timeline-stuck-note-stress

Conversation

@shipyard-local

@shipyard-local shipyard-local Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

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 (target pulp-test-playback-note-renderer) that drives 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.

Invariant asserted

  • Per-key toggle, every block: a physical note-on is only ever emitted for an idle key, a note-off only for a sounding key (net stays in {0,1}). A leaked/stuck note surfaces mid-run as an out-of-order toggle.
  • Terminal stop-flush: stopping releases every sounding note in one block; has_active_notes() must be false and every note-on matched by a note-off (per seed).

Reproducible, non-vacuous

  • Randomness is deterministic — std::mt19937 over hardcoded seeds, never random_device. A red on any seed is a real stuck-note defect, not a flake.
  • Aggregate non-vacuity witnesses (all asserted > 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).
  • Confirmed the assertion is non-vacuous by mutation: injecting a skipped terminal flush makes the case fail exactly at REQUIRE_FALSE(renderer.has_active_notes()).

Validation

  • Full suite green: pulp-test-playback-note-renderer — 22709 assertions in 15 test cases, all passed (Release).
  • Stress case alone: 22475 assertions.
  • gates.sh origin/main clean; skill-sync + docs-noise + version-bump (no bump needed) all pass. Documents the fuzz coverage in the playback skill's Validation section.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS


🔎 Provenance

Agent claude
Machine m3
Tab Timeline v3
Directory /Volumes/Workshop/Code/pulp-proof4
Session c66f4a64-25ea-42e5-b184-d48611a066a2

Resume

claude --resume c66f4a64-25ea-42e5-b184-d48611a066a2

Jump to this tab

cmux surface focus C0B3DA54-39AF-4DAA-8089-AA08DAB71968

Relaunch (any agent)

cmux surface resume get --surface C0B3DA54-39AF-4DAA-8089-AA08DAB71968

Restore URLhttps://claude.ai/code/session_01TVQHcnbg3t6TvXsdv6gXhS

stamped 2026-07-22 03:25 UTC

…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
@shipyard-local
shipyard-local Bot enabled auto-merge July 22, 2026 03:25
@shipyard-local
shipyard-local Bot added this pull request to the merge queue Jul 22, 2026
Merged via the queue into main with commit 7f530ee Jul 22, 2026
19 of 22 checks passed
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.

1 participant