Repository navigation
Watch mode plan: rebuild on change, swap at the loop wrap - #32
Conversation
play --loop --watch keeps the loop playing while the project changes: check gates every rebuild (a red project never stops the music), 'did anything audible change' is an output-hash question the cache answers, and the daemon takes the new mix at the next wrap — the bar-synced in-place swap is recorded as the successor for when wrap latency chafes. build --watch is the underlying headless verb; trigger policy holds for free, so bloom choose against a running watch is live variant A/B-ing.
ninjudd
left a comment
There was a problem hiding this comment.
Reviewed at head 2d8dde4 (via git show — the checkout stays on #31). Docs-only, CI green. One P3, inline: the §1.1 citation credits playback.md with recording the native-loop wrap, and it doesn't — nothing does, which is the sharper version of the problem. Everything else checks out against the records and the code as built.
Verified against the code and records:
- Decision 3's correct-by-construction claim is true of the engine as built: outputs land atomically (tmp → CAS → action entry last, build.ts), mix inputs are stem content hashes so a fader move re-runs exactly one sum, and
fmt/comment edits are cache hits by the canonical-spec design — "hash moved ⇒ swap, hash same ⇒ silence" needs no watcher intelligence the graph doesn't already have. - Decision 5 is real, not aspirational: the graph registers no rule node for a generative sound (
buildGraphadds committed-content nodes only), so no watch-triggeredbuildcan ever generate one — and achosen:repoint flows the new variant's content hash through stem and mix keys, so the live A/B-ing claim is exactly how the invalidation already works. - The
--fromnote matches #23's architecture: region loops take the CLI requeue path (native loop requires no--from), so "the region re-applies to the new file" after a swap is the requeue path doing what it always does. CLI owns musical time, daemon never learns bars — consistent with the recorded seam. - The cross-PR vocabulary dependency is handled honestly: the status line names it, §1.2 (cited for trigger policy) exists on main today, §4 lands with #31, and the PR body flags the trivial next.md rebase whichever merges second.
- List hygiene: next.md entry sits behind MCP surface as stated, links resolve, status line carries the date, sections are appended-only by construction (new file).
- The daemon-version-bump-no-shims stance follows #23's version-guard precedent; excluding
.bloom/from the watch is load-bearing (materialized outputs would self-trigger) and the plan says why.
One footnote, no thread: --watch requires --loop, and §2 covers the --from requeue case — but multi-item play --loop (also a requeue path) is neither supported nor excluded by the text. Probably the answer is "one label per watch session" falling out of decision 4's build --watch <label> singular; a clause saying so would close the door §5's multi-target question half-opens.
Plan doc for
bloom play --loop --watch(and the underlyingbloom build --watch), sketched with Justin and decided: v1 swaps at the loop wrap (daemon gains areloadthat queues takeover; you always hear whole passes), with the bar-synced in-place swap recorded as the successor rather than built now.The load-bearing decisions: a red project never stops the music (
checkgates every rebuild; half-saved files are the common case); "did anything audible change" is an output-hash question the cache answers, sofmtand comment edits swap nothing while a fader move re-runs one sum; trigger policy holds under watch for free (build never generates generative sounds), which makesbloom chooseagainst a running watch live variant A/B-ing; and slow renders can't glitch — the old mix loops until the new artifact lands atomically.Queued in next.md behind the MCP surface line. Written in the §4 vocabulary that lands with #31; nothing here depends on the migration beyond spellings. Note next.md is also touched by #31 — whichever merges second gets a trivial rebase.