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([vo-mux-preserve-clip-audio-under-ducked-vo]): remove from PLAN.md and log to changelog

[._.]/ Adam Eivy38a34e3449fc
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index cc21822c48..608394d21c 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -3,6 +3,7 @@
## Added
- **[pipeline-audio-phase-4c-2-4c-3-4d-2-local-oss] The pipeline audio stage can now generate background music locally, and voice-over lines are mixed into the final episode.** Background Music gains a "Generate (MusicGen)" option that renders a text-prompted track on-device via MusicGen on Apple Silicon — pick a model tier (Small / Medium / Large) and a clip length, and the result lands in your music library attached to the issue, no upload or API key needed (one-time setup: `INSTALL_MUSICGEN=1 bash scripts/setup-image-video.sh`; until then the panel shows an install hint). Each voice-over line also gets a "Start (s)" field that places it on the episode timeline, and when the final cut is stitched those rendered lines are now mixed in at their offsets — with any background music automatically ducked beneath the dialogue so speech stays clear. (Commercial music engines like Suno are intentionally not wired up yet.)
+- **[vo-mux-preserve-clip-audio-under-ducked-vo] Episode clips that carry their own audio now keep that soundtrack under voice-over.** When a stitched episode's video has its own sound (e.g. from audio-capable AI video models) and you've placed voice-over lines, that clip audio is now preserved and automatically ducked beneath the dialogue — alongside any background music — instead of being silently replaced by the voice-over mix. Silent clips are unaffected.
- **[conflict-journal-media-collections] Media collection name/description/cover edits are now protected when two machines change the same collection.** If a peer's edit to a collection's name, description, or cover image would overwrite a change you made independently, your version is archived to Sharing → Conflicts so you can review and restore it — the same safety net universes and series already had. Images filed into the collection were never at risk (both sides' images are always kept); only the collection's text/cover fields could silently lose an edit, and now they don't.
- **[story-builder-issue-llm-seeding] Story Builder can now generate issues straight from the arc.** The issues step gains a "Generate issues from arc" button that breaks every season of your plot arc into episodes and creates one issue per episode — seeded with each episode's logline and synopsis — without leaving the builder for the Pipeline. Locked or empty seasons are skipped and reported rather than blocking the rest, and you can still plan issues in the Pipeline as before.
diff --git a/PLAN.md b/PLAN.md
index 2f57492738..a81979f593 100644
--- a/PLAN.md
+++ b/PLAN.md
@@ -36,7 +36,8 @@ Claimable, well-specified, no decision needed — `/claim`-able. Unordered.
- [ ] [manuscript-review-sync] **Wire the manuscript-review comment set into cross-install sync.** `data/pipeline-series/{id}/manuscript-review.json` is written as a sibling of the series record but is NOT carried by `exportSeries`/`importSeries` or the peer-sync path. `manuscriptReview.mergeReviewFromSync(seriesId, remoteReview)` (LWW-per-comment) already exists; what's missing is (a) including the review document in the series export bundle, (b) a wire-schema-version gate in `server/lib/schemaVersions.js`, and (c) calling `mergeReviewFromSync` on the receiving side. Accepted *fixes* already sync (they write to issue stage outputs); only the comment list/status/dismissals don't propagate yet.
- [ ] [season-continuity-extract-honors-series-llm] **Season-episodes continuity extract doesn't honor the series LLM (or a model override).** The continuity `extractCanonFromProse` call in `generateSeasonEpisodes` (`server/routes/pipeline.js`, the `if (body.commit)` block) passes only `providerOverride: body.providerOverride` — no `series.llm` fallback and no `modelOverride` — so it falls back to the global active provider instead of the series-pinned LLM. Not a correctness bug, just an inconsistency. Add the same `providerMatchesSeries`-guarded provider/model resolution used by the extract-canon and extract-scenes routes.
- [ ] [prune-orphan-subscriptions-for-deleted-records] **Sweep orphaned peer subscriptions left by tombstone prune.** `pruneTombstonedUniverses` / `pruneTombstonedSeries` rm the record dir but leave its rows in `data/peer_subscriptions.json`. On `peer:online`, `retryPendingPushesForPeer` walks them, `loadOne` returns null, and the push no-ops (harmless but inflates the "retrying N pending pushes" count). Add an orphan-subscription sweep (drop subs whose `recordKind/recordId` no longer resolves) to the tombstone GC path.
-- [ ] [vo-mux-preserve-clip-audio-under-ducked-vo] **Preserve + duck stitched-clip audio under VO.** `muxVoLines` (`server/services/pipeline/audioMux.js`) currently *replaces* the episode's audio track with the VO mix (+ optional ducked music bed), matching the prior `muxMusicBed` behavior. AI-gen clips are silent today, but LTX-2 audio-to-video can carry a clip soundtrack that this drops. Mix the stitched video's `0:a` into the final graph as a third `amix` input, ducked under VO via the same sidechain key. Deferred from the 4d.2 PR to keep the initial filter graph bounded. Surfaced during implementation (2026-06-01).
+- [ ] [extract-use-universe-load-hook] **Extract a `useUniverse(universeId)` load hook.** `client/src/components/pipeline/stages/StoryboardsStage.jsx` (~line 57) and `NounsStage.jsx` (~line 149) now run a byte-identical `useMounted` + `let cancelled` + `getUniverse(series.universeId).then(...).catch(...)` effect to load the linked universe record. Extract a `client/src/hooks/useUniverse.js` returning `[universe, loading, error]` (handling the mount/cancel guards internally), register it in the hooks `index.js` barrel + README, and migrate both call sites. Deferred from the wardrobe-picking PR: migrating `NounsStage` is outside that diff's scope and the new module trips the barrel maintenance rule. Surfaced by /simplify (reuse, 2026-06-01).
+- [ ] [create-issue-preload-series-for-batch] **`createIssue`'s renumber pass re-reads the series on every call — preload it for batch episode seeding.** `createIssue` (`server/services/pipeline/issues.js`) calls `getSeries()` inside its `renumberInline` pass on every invocation. `commitEpisodesToIssues` (`server/services/pipeline/arcPlanner.js`) creates one issue per episode in a loop, so a 12-episode season does 12 redundant `getSeries()` reads of an unchanging record (and `generateIssuesFromArc` already fetched it once). Add a `createIssueWithPreloadedSeries(series, input)` variant (or a `{ preloadedSeries }` option) that threads the already-fetched series into `renumberInline`, and route the batch loop through it. Pre-existing in `createIssue` (the Pipeline season-episodes route pays the same cost); LLM-bound batch so the realized win is small — surfaced by /simplify (efficiency) during the story-builder-issue-llm-seeding PR (2026-06-01). Deferred because it touches the `issues.js` renumber internals beyond this diff's scope.
- [ ] [extract-single-flight-map-helper] **Extract a shared single-flight / in-flight-coalescing helper.** Three sites now hand-roll the `Map<key, Promise>` "share the in-flight result, delete on settle" idiom: `server/lib/sseDownload.js` (`inFlight` keyed by repo, line ~12), `server/lib/promptRunner.js` (`_fallbackMarkAndPickInFlight` keyed by failed provider id), and the read-coalescing half of `server/lib/aiToolkit/providers.js#loadProviders` (`providersLoadInFlight`). A small `server/lib/singleFlight.js` (`createSingleFlight()` returning `run(key, fn)` that returns the shared promise and auto-clears on settle) would dedupe the boilerplate and standardize the cleanup. Note the three sites differ in shape — providers.js layers a TTL snapshot cache on top, promptRunner does keyed side-effectful work — so the helper must stay minimal (just the keyed coalesce) and not try to absorb the TTL/cache concern. Deferred from the coalesce-fallback PR: it's a new public lib module (barrel + README maintenance) that also touches an unrelated file, so it warrants its own PR. Surfaced by /simplify (reuse, 2026-06-01).
## Blocked / Deferred (skip for `/claim`)