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

fix: report dialogue protagonist and voice-binding blockers once (#11745)

[._.]/ Adam Eivy28f404b9a162
diff --git a/server/lib/fableLoomProduction.js b/server/lib/fableLoomProduction.js
index 8b2774819e..c1980ff91b 100644
--- a/server/lib/fableLoomProduction.js
+++ b/server/lib/fableLoomProduction.js
@@ -887,20 +887,8 @@ export function buildEpisodeProductionPlan({
if (node.interactionWindow?.enabled && node.interactionWindow?.protagonistCharacterId) {
const charId = node.interactionWindow.protagonistCharacterId;
const dialogueAssetId = `asset-${node.id}-dialogue-${charId}`;
- const character = characterById.get(charId);
- const charInUniverse = Boolean(character);
- const profile = localVoiceProfiles?.find((p) => (
- p.binding?.characterId === charId
- && (!universe?.id || p.binding?.universeId === universe.id)
- && p.approval?.status === 'approved'
- && p.routes?.interactive?.enabled === true
- ));
-
- const dialogueBlockers = [];
- if (!charInUniverse && universe) dialogueBlockers.push(`Protagonist "${charId}" not found in Universe.`);
- if (!profile && !character?.voiceId && !loom?.defaultVoiceId) dialogueBlockers.push(`No approved voice binding for "${charId}".`);
- dialogueBlockers.push(...nodeBlockers);
- const dialogueBlocked = dialogueBlockers.length > 0;
+ // Protagonist and voice-binding blockers are already in nodeBlockers.
+ const dialogueBlocked = nodeBlockers.length > 0;
plannedAssets.push({
id: dialogueAssetId,
@@ -917,7 +905,7 @@ export function buildEpisodeProductionPlan({
readiness: {
ready: !dialogueBlocked,
reasons: dialogueBlocked
- ? dialogueBlockers
+ ? [...nodeBlockers]
: ['Live dialogue is generated per hosted interaction; no standalone batch audio is created.'],
},
});
diff --git a/server/lib/fableLoomProduction.test.js b/server/lib/fableLoomProduction.test.js
index 31afa50ae0..9b599ddf76 100644
--- a/server/lib/fableLoomProduction.test.js
+++ b/server/lib/fableLoomProduction.test.js
@@ -354,6 +354,18 @@ describe('fableLoomProduction', () => {
expect(reasons().some(reason => /no approved voice binding/i.test(reason))).toBe(false);
});
+ it('reports each missing protagonist and voice-binding blocker once on the dialogue asset', () => {
+ const episode = { ...sampleEpisode, nodes: [{ ...sampleEpisode.nodes[0], transitions: [],
+ interactionWindow: { enabled: true, protagonistCharacterId: 'char-1' } }] };
+ const plan = buildEpisodeProductionPlan({ episode, universe: { id: 'u1', characters: [] },
+ loom: { id: 'loom-1' }, localVoiceProfiles: [] });
+ const reasons = plan.plannedAssets.find(asset => asset.type === 'dialogue').readiness.reasons;
+ expect(reasons.filter(reason => /not present in the linked Universe/i.test(reason))).toHaveLength(1);
+ expect(reasons.filter(reason => /no approved voice binding/i.test(reason))).toHaveLength(1);
+ expect(reasons.some(reason => /not found in Universe|No approved voice binding for/.test(reason))).toBe(false);
+ expect(new Set(reasons).size).toBe(reasons.length);
+ });
+
it('refuses exact-input planning when a node has no recorded provenance', () => {
const plan = buildEpisodeProductionPlan({
episode: sampleEpisode,