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

refactor: expose approval inputs through readiness (#10141)

Adam Eivye6d3ba92ef9b
diff --git a/server/services/musicVideo/productionReview.js b/server/services/musicVideo/productionReview.js
index 5ff5480bc5..bd4228ec37 100644
--- a/server/services/musicVideo/productionReview.js
+++ b/server/services/musicVideo/productionReview.js
@@ -85,7 +85,7 @@ export function productionReviewBasis(project) {
/** Labeled per-input hashes so a stale approval can name what changed since. */
const h = v => hash(v ?? null);
-export function productionApprovalInputs(project) {
+function productionApprovalInputs(project) {
const draft = project.productionReview?.draft || {};
const art = {
concept: h(project.concept), 'visual spec': h(project.visualSpec), 'style references': h(project.styleReferences),
@@ -193,7 +193,7 @@ export function productionReadiness(project) {
proofProblems.push('Render and watch a current animated chorus proof with the master song.');
}
const proofApproved = !proofProblems.length && hasProofEvidence(review.approvals?.proof?.proofReview) && review.approvals?.proof?.basis === hash({ basis: basis.proof, excerptId: excerpt.id, filename: excerpt.filename });
- return { basis, alignment: { basis: alignmentBasis, status: draft.lyricsMode === 'instrumental' ? 'instrumental'
+ return { basis, inputs, alignment: { basis: alignmentBasis, status: draft.lyricsMode === 'instrumental' ? 'instrumental'
: draft.timingStatus !== 'verified' ? 'provisional' : review.alignmentBasis === alignmentBasis ? 'verified' : 'stale' }, documentShotImport: { documentDirectory: project.composition?.document?.directory || null, audioBasis: alignmentBasis }, art: { approved: artApproved, problems: [...new Set(artProblems)], stale: artApproved ? null : staleApproval(project, 'art', basis.art, inputs) },
storyboard: { approved: storyboardApproved, problems: [...new Set(boardProblems)], stale: storyboardApproved ? null : staleApproval(project, 'storyboard', basis.storyboard, inputs) },
proof: { approved: proofApproved, problems: proofProblems, excerptId: excerpt?.id || null, stale: proofApproved ? null : staleApproval(project, 'proof', basis.proof, inputs) },
diff --git a/server/services/musicVideo/productionReview.stale.test.js b/server/services/musicVideo/productionReview.stale.test.js
index ca435a3876..06ebb308fe 100644
--- a/server/services/musicVideo/productionReview.stale.test.js
+++ b/server/services/musicVideo/productionReview.stale.test.js
@@ -1,9 +1,9 @@
import { describe, it, expect } from 'vitest';
-import { productionReadiness, productionApprovalInputs } from './productionReview.js';
+import { productionReadiness } from './productionReview.js';
// Approval records the labeled inputs it was granted on, so a later change can be named.
const approvedArt = (project) => ({ ...project, productionReview: { ...project.productionReview,
- approvals: { art: { stage: 'art', basis: productionReadiness(project).basis.art, inputs: productionApprovalInputs(project).art, approvedAt: '2026-01-01T00:00:00.000Z' } } } });
+ approvals: { art: { stage: 'art', basis: productionReadiness(project).basis.art, inputs: productionReadiness(project).inputs.art, approvedAt: '2026-01-01T00:00:00.000Z' } } } });
describe('stale approval reporting', () => {
const base = { id: 'p1', concept: 'Example concept', scenes: [{ sceneId: 's1', startSec: 0, endSec: 4, prompt: 'a' }, { sceneId: 's2', startSec: 4, endSec: 8, prompt: 'b' }], productionReview: { draft: {} } };
@@ -20,8 +20,8 @@ describe('stale approval reporting', () => {
});
it('labels per-scene edits for the storyboard stage', () => {
- const inputs = productionApprovalInputs(base).storyboard;
- const edited = productionApprovalInputs({ ...base, scenes: [base.scenes[0], { ...base.scenes[1], prompt: 'c' }] }).storyboard;
+ const inputs = productionReadiness(base).inputs.storyboard;
+ const edited = productionReadiness({ ...base, scenes: [base.scenes[0], { ...base.scenes[1], prompt: 'c' }] }).inputs.storyboard;
expect(Object.keys(edited).filter(k => edited[k] !== inputs[k])).toEqual(['scene 2 prompt']);
});
});