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

Avoid duplicate unsafe hold-loop warnings (#11569)

[._.]/23e82c9a7b76
diff --git a/server/lib/fableLoomProduction.js b/server/lib/fableLoomProduction.js
index 1c07f58af0..8b2774819e 100644
--- a/server/lib/fableLoomProduction.js
+++ b/server/lib/fableLoomProduction.js
@@ -819,14 +819,6 @@ export function buildEpisodeProductionPlan({
if (lockedCanon && !existingHold && node.visualCanon?.storyboardImageApproved !== true) {
holdBlockers.push('Locked canon video requires an author-approved storyboard image.');
}
- if (node.interactionWindow?.enabled) {
- for (const holdId of holdLoops) {
- const occupancy = assets?.audioOccupancy?.[holdId];
- if (occupancy && !validateAudioOccupancy(occupancy).safeForLiveVoice) {
- holdBlockers.push(`Hold loop "${holdId}" is not safe for live voice.`);
- }
- }
- }
const holdReady = videoHasPrompt && holdBlockers.length === 0;
plannedAssets.push({
diff --git a/server/lib/fableLoomProduction.test.js b/server/lib/fableLoomProduction.test.js
index 837c2f7aaf..31afa50ae0 100644
--- a/server/lib/fableLoomProduction.test.js
+++ b/server/lib/fableLoomProduction.test.js
@@ -259,6 +259,50 @@ describe('fableLoomProduction', () => {
});
});
+ it('reports an unsafe hold loop once while preserving live voice blocking', () => {
+ const interactionNode = {
+ interactionWindow: { enabled: true, protagonistCharacterId: 'char-1' },
+ };
+ const options = {
+ loom: { id: 'loom-1', protagonistCharacterId: 'char-1' },
+ universe: { id: 'universe-1', characters: [{ id: 'char-1', voiceId: 'voice-1' }] },
+ };
+ const unsafe = plan(sceneEpisode({
+ node: interactionNode,
+ assets: {
+ audioOccupancy: {
+ 'hold-1': {
+ durationMs: 5000,
+ characterDialogue: [{ startMs: 0, endMs: 2000, characterId: 'char-1' }],
+ },
+ },
+ },
+ }), options);
+ const unsafeAssets = unsafe.plannedAssets.filter((asset) => asset.nodeId === 'scene');
+ const warning = 'Hold loop "hold-1" is not safe for live voice.';
+
+ for (const asset of unsafeAssets) {
+ expect(asset.readiness.reasons.filter((reason) => reason === warning)).toHaveLength(1);
+ expect(asset.status).toBe('blocked');
+ }
+ expect(unsafeAssets.find((asset) => asset.type === 'video_hold').existingAssetId).toBe('hold-1');
+
+ const safe = plan(sceneEpisode({
+ node: interactionNode,
+ assets: {
+ audioOccupancy: {
+ 'hold-1': { durationMs: 5000, music: [{ startMs: 0, endMs: 5000 }] },
+ },
+ },
+ }), options);
+ const safeAssets = safe.plannedAssets.filter((asset) => asset.nodeId === 'scene');
+ expect(safeAssets.find((asset) => asset.type === 'video_hold')).toMatchObject({
+ status: 'already_rendered',
+ readiness: { ready: true, reasons: [] },
+ });
+ expect(safeAssets.some((asset) => asset.readiness.reasons.includes(warning))).toBe(false);
+ });
+
it('requires an approved storyboard for new locked-canon video but not for existing clips', () => {
const universe = { id: 'universe-1', characters: [] };
const lockedNode = { visualCanon: { mode: 'locked' } };