Skip to content

Add four-phrase authoritative world - #17

Merged
datashaman merged 2 commits into
mainfrom
agent/issue-12-four-phrases
Aug 10, 2026
Merged

datashaman merged 2 commits into
mainfrom
agent/issue-12-four-phrases

Conversation

@datashaman

@datashaman datashaman commented Aug 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #12.

What changed

  • replace the bass-only fixture with authored drums, bass, chords, and melody loops on MIDI channels 10, 1, 2, and 3
  • schedule every role from the same monotonic transport and expose stable phrase identity, role, variant, channel, position, and playback state
  • publish monotonically sequenced, validated world.snapshot events
  • render the four phrases from authoritative native snapshots and discard stale snapshots
  • restore the complete phrase world after bridge reconnects
  • expand native, UI, and ten-minute stress coverage for multi-phrase scheduling
  • restrict the workflow's push trigger to main, preventing PR branch commits from running the same macOS build once for push and again for pull_request

Why

Milestone 3 needs one source of truth for both the musical composition and the visible phrase world before native motion and direct manipulation are introduced. The UI previously displayed a hard-coded four-object preview while the engine scheduled only bass.

CI also subscribed unconditionally to both push and pull_request. Every commit on an open PR branch therefore launched two identical workflows for the same SHA. PR updates now use the pull_request run, while merges and direct updates to main retain the push run.

Impact

The packaged app now visibly and audibly demonstrates the initial four-role composition. React no longer invents phrase state, and the next spatial-world slice can add native motion without changing the snapshot ownership boundary.

Each PR update now consumes one macOS Actions runner instead of two, without dropping post-merge CI on main.

Validation

  • ./scripts/verify.sh
  • UI tests: 6 passed
  • Debug CTest: 2/2 passed
  • Release CTest: 2/2 passed
  • 600-second stress simulation: 15,614 messages, zero phase drift, zero timestamp drift, zero late MIDI events
  • Debug packaged UI visually inspected receiving native phrase snapshots
  • Release packaged-app smoke test
  • live manual playback routed drums, bass, chords, and melody through four distinct instruments on channels 10, 1, 2, and 3; the complete composition performed well
  • actionlint .github/workflows/ci.yml
  • regression commit c4b72866 produced exactly one successful Actions run, triggered by pull_request
  • git diff --check

@datashaman
datashaman marked this pull request as ready for review August 10, 2026 08:16
@datashaman
datashaman merged commit c5f0cd9 into main Aug 10, 2026
1 check passed
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.

Play and render four authoritative phrases

1 participant