Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

docs([issue-2775]): log MidiVisualization de-flake to changelog

[._.]/ Adam Eivy6dfc6278d4ae
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 0b9215eab2..bf8a81d0db 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -46,6 +46,8 @@
## Internal
+- **[issue-2775] De-flaked the MidiVisualization "Space toggles playback" test.** The MIDI-visualization component tests asserted on the transport button's *optimistic* `playing` state and raced the synth player's async lifecycle (`play()`'s `await ctx.resume()` microtask hop and the immediate `totalSec <= 0 → onEnded` reset), so `findByLabelText('Pause playback')` failed intermittently in CI and passed on re-run. `useMidiPlayer` is now mocked in the component test with a synchronous state-flip stub, so the three chrome-wiring assertions (playing → label, click/Space → toggle, collapse → teardown) are deterministic and no longer depend on audio timing. The hook's real async behavior stays covered directly in `useMidiPlayer.test.jsx` and the player lib in `midiPlayback.test.js`, so no coverage is lost. (`client/src/components/songs/MidiVisualization.test.jsx`)
+
- **[issue-2706] Stage-seeding migrations now guard their own `data.reference` assets.** Migrations 189 (model-personality), 094 (object-attachment checks), and 182 (CWQE quality) each seed stage prompts on upgrade but shipped without a colocated test, so a rename or removal of a reference template would have surfaced only at runtime as "Stage not found" on a fresh install. Each now has a `.test.js` asserting it seeds when absent, no-ops on re-run, never clobbers a customized template or hand-tuned config entry, and — the point — that every `data.reference/prompts/stages/*.md` template it names and its `stage-config.json` entry actually ship. The guard is anchored to the migration's own stage list (now exposed on the object the seed helper returns), so adding a stage without shipping its template fails the suite instead of leaving it green against a stale hand-copied list. The three suites collapse to one `runSeedStageMigrationTests({ migration, stages, prefix })` call apiece via a new shared helper — the seed-family analogue of `_testHelpers.js`'s `runPromptMigrationTests`. (`scripts/migrations/_seedStageTestHelpers.js`)
## Fixed