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

make the music video animated proof optional and stop requiring typed notes for approvals

[._.]/ Adam Eivy83c2e1930a4d
diff --git a/client/src/components/musicVideo/AutonomousRunPanel.test.jsx b/client/src/components/musicVideo/AutonomousRunPanel.test.jsx
index 7a0218016e..6c45570e2b 100644
--- a/client/src/components/musicVideo/AutonomousRunPanel.test.jsx
+++ b/client/src/components/musicVideo/AutonomousRunPanel.test.jsx
@@ -396,11 +396,12 @@ describe('Current autonomous review guidance', () => {
const error = 'Review and approve the current art direction first.';
const project = { id: 'history-fixture', autonomousRun: baseRun({ status: 'needs-human', stage: 'produce', error, errorCode: 'MUSIC_VIDEO_APPROVAL_REQUIRED' }) };
const auto = { busy: false, resume: vi.fn(), cancel: vi.fn() };
- const readiness = { art: { approved: true, problems: [] }, storyboard: { approved: true, problems: [] }, proof: { approved: false, problems: ['Render and watch a current animated chorus proof with the master song.'] } };
+ const readiness = { art: { approved: true, problems: [] }, storyboard: { approved: false, problems: ['Approve the current lyric-timed storyboard.'] }, proof: { approved: false, problems: ['Render and watch a current animated chorus proof with the master song.'] } };
const view = render(<MemoryRouter><AutonomousRunPanel project={project} auto={auto} readiness={readiness} /></MemoryRouter>);
- expect(screen.getByRole('status')).toHaveTextContent('Render and watch a current animated chorus proof');
+ expect(screen.getByRole('status')).toHaveTextContent('Approve the current lyric-timed storyboard.');
expect(screen.getByText(`Historical stop reason: ${error}`)).toBeTruthy();
- view.rerender(<MemoryRouter><AutonomousRunPanel project={project} auto={auto} readiness={{ ...readiness, proof: { approved: true, problems: [] } }} /></MemoryRouter>);
+ // The optional proof never holds the run: storyboard approval is enough to resume.
+ view.rerender(<MemoryRouter><AutonomousRunPanel project={project} auto={auto} readiness={{ ...readiness, storyboard: { approved: true, problems: [] } }} /></MemoryRouter>);
expect(screen.getByRole('status')).toHaveTextContent('ready to resume explicitly');
expect(auto.resume).not.toHaveBeenCalled();
});
diff --git a/client/src/components/musicVideo/LyricTimingCheck.jsx b/client/src/components/musicVideo/LyricTimingCheck.jsx
index 2d2256f0e6..82e1d56c1a 100644
--- a/client/src/components/musicVideo/LyricTimingCheck.jsx
+++ b/client/src/components/musicVideo/LyricTimingCheck.jsx
@@ -11,8 +11,8 @@ const buttonClass = 'min-h-[44px] rounded border border-port-border bg-port-bg p
* draft fields the storyboard approval reads (`lyricsMode`, `timingStatus`,
* `timingNotes`), so the Song step is finished here rather than in a review
* panel on another step. A stale verification (the master or the word times
- * changed) is re-verified through the server's alignment route, which needs a
- * note. `planning` is the page's unsaved planning draft pair; its copy of these
+ * changed) is re-verified through the server's alignment route. Notes are
+ * optional. `planning` is the page's unsaved planning draft pair; its copy of these
* fields is kept in step so a later planning save cannot undo this one.
*/
export default function LyricTimingCheck({ project, review, planning = null, disabled = false }) {
@@ -56,7 +56,7 @@ export default function LyricTimingCheck({ project, review, planning = null, dis
) : (
<>
<label htmlFor={notesId} className="block text-xs text-port-text-muted">
- {mode === 'vocal' ? 'What you checked (needed to re-verify after a change)' : 'Why this song has no lyrics'}
+ Notes (optional)
</label>
<textarea id={notesId} rows={2} maxLength={4000} value={notes} onChange={(e) => setNotes(e.target.value)}
className="w-full rounded border border-port-border bg-port-bg px-2 py-1.5 text-sm" />
@@ -65,12 +65,12 @@ export default function LyricTimingCheck({ project, review, planning = null, dis
)}
{mode === 'vocal' ? (
<button type="button" className={buttonClass}
- disabled={busy || lyrics.lines === 0 || (stale && !notes.trim())}
+ disabled={busy || lyrics.lines === 0}
onClick={() => (stale ? reverify() : write({ lyricsMode: 'vocal', timingStatus: 'verified', timingNotes: notes.trim() }))}>
{stale ? 'Re-verify timing' : 'Mark timing verified'}
</button>
) : (
- <button type="button" className={buttonClass} disabled={busy || !notes.trim()}
+ <button type="button" className={buttonClass} disabled={busy}
onClick={() => write({ lyricsMode: 'instrumental', timingNotes: notes.trim() })}>
Confirm instrumental
</button>
diff --git a/client/src/components/musicVideo/ProductionReviewPanel.jsx b/client/src/components/musicVideo/ProductionReviewPanel.jsx
index 5feef1e024..792c1395ef 100644
--- a/client/src/components/musicVideo/ProductionReviewPanel.jsx
+++ b/client/src/components/musicVideo/ProductionReviewPanel.jsx
@@ -9,19 +9,22 @@ const buttonClass = 'min-h-[44px] rounded border border-port-border px-3 py-2 te
const timeFieldClass = 'mt-1 block w-24 rounded border border-port-border bg-port-bg p-2 text-sm';
const approveClass = 'min-h-[44px] rounded bg-port-accent px-4 py-2 text-sm font-medium text-white disabled:opacity-50';
const labels = { art: 'Art direction', storyboard: 'Lyric-timed storyboard', proof: 'Animated proof' };
+// The proof is an optional check (the final render doesn't wait on it), so its heading says so.
+const OPTIONAL = { proof: true };
// Each approval closes the step that owns its work (#10151); the page passes that step's `stage`.
const STAGE_TABS = { art: 'cast-sets', storyboard: 'board', proof: 'produce' };
-const EMPTY_PLAYBACK = { method: 'playback', energyComparison: '', timecodedNotes: '', visualReview: '', audioReview: '', limitations: '' };
+const EMPTY_PLAYBACK = { method: 'playback', timecodedNotes: '', visualReview: '', audioReview: '', limitations: '' };
const FOLD_STYLE = { scrollMarginTop: 'calc(var(--mv-header-h, 9rem) + 1rem)' };
/**
* The open box that closes a step: heading, then the approval's content and
* Approve / Request changes, highlighted until approved.
*/
-function ApprovalBox({ id, label, approved, children }) {
+function ApprovalBox({ id, label, approved, optional = false, children }) {
return <section id={id} tabIndex={-1} aria-label={`Approve: ${label}`} style={FOLD_STYLE}
- className={`rounded-lg border p-3 focus:outline focus:outline-2 focus:outline-port-accent ${approved ? 'border-port-border' : 'border-port-accent bg-port-accent/5'}`}>
- <h4 className="text-sm font-semibold">{approved ? `${label} approved` : `Approve the ${label.toLowerCase()}`}</h4>
+ className={`rounded-lg border p-3 focus:outline focus:outline-2 focus:outline-port-accent ${approved || optional ? 'border-port-border' : 'border-port-accent bg-port-accent/5'}`}>
+ {/* An optional check isn't highlighted: it never competes with the step's real next action. */}
+ <h4 className="text-sm font-semibold">{approved ? `${label} approved` : optional ? label : `Approve the ${label.toLowerCase()}`}{optional && !approved && <span className="ml-2 font-normal text-port-text-muted">Optional</span>}</h4>
{children}
</section>;
}
@@ -63,7 +66,6 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
const shotKey = shot => shot.id || shot.sceneId;
const setShot = (shot, key, value) => set('storyboard', shots.map(s => shotKey(s) === shotKey(shot) ? { ...s, [key]: value } : s));
const blocked = dirty || review.busy || !ready;
- const prototype = project.excerpts?.find(e => e.id === project.productionReview?.prototype?.excerptId);
const excerpt = project.excerpts?.find(e => e.id === project.productionReview?.proof?.excerptId);
const proofIdentity = JSON.stringify([project.id, ready?.basis.proof ?? project.productionReview?.proof?.basis ?? null, excerpt?.id, excerpt?.filename]);
const recordedProofReview = project.productionReview?.approvals?.proof?.proofReview;
@@ -78,14 +80,12 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
const evidenceComplete = machineReview
? playback.visualReview.trim().length >= 40 && playback.audioReview.trim().length >= 40 && !!playback.limitations.trim()
: true;
- const hasTimecodedNotes = /(?:\b\d{1,2}:\d{2}(?:\.\d+)?\b|\b\d+(?:\.\d+)?s\b)/.test(playback.timecodedNotes);
- const playbackComplete = evidenceComplete && !!playback.energyComparison.trim() && hasTimecodedNotes;
const approve = stage => {
return review.approve(stage, stage === 'proof' ? { watchedWithAudio: !machineReview,
...(machineReview ? { method: 'machine', machineEvidence: {
visualReview: playback.visualReview.trim(), audioReview: playback.audioReview.trim(), limitations: playback.limitations.trim(),
} } : {}),
- energyComparison: playback.energyComparison.trim(), timecodedNotes: playback.timecodedNotes.trim(),
+ ...(playback.timecodedNotes.trim() ? { timecodedNotes: playback.timecodedNotes.trim() } : {}),
excerptId: excerpt.id, filename: excerpt.filename } : undefined);
};
@@ -96,13 +96,13 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
if (dirty) return 'Save your planning edits first.';
if (review.busy) return 'Working…';
const problems = ready[stage].problems;
+ // With no current proof, the Render button already says what to do; repeating it as a warning reads as required.
+ if (stage === 'proof' && proofNeedsRender) return null;
if (problems.length) return problems.length > 1 ? `${problems[0]} (+${problems.length - 1} more below)` : problems[0];
if (stage === 'art' && visibleArt !== artIdentity) return 'Open the visual guide below first.';
if (stage !== 'proof') return null;
if (review.proof.active) return 'Wait for the proof to finish rendering.';
if (playbackBlocked) return proofNeedsRender ? 'Render a 10–45 second chorus proof, then watch it with sound.' : 'Play the proof below with sound first.';
- if (!playback.energyComparison.trim()) return 'Add how the energy compares with the plan.';
- if (!hasTimecodedNotes) return 'Add a note with a time, like 0:04.';
if (!evidenceComplete) return 'Complete the machine review notes (40+ characters each, plus limitations).';
return null;
};
@@ -148,14 +148,12 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
const renderControls = <div id="mv-review-render" tabIndex={-1} style={{ scrollMarginTop: 'calc(var(--mv-header-h, 9rem) + 1rem)' }} className="flex flex-wrap items-end gap-2">
<label htmlFor={fieldId('proof-start')} className="text-sm">Chorus start (s)<input id={fieldId('proof-start')} type="number" min="0" step="0.01" value={startSec} onChange={e => setStartSec(Number(e.target.value))} className={timeFieldClass} /></label>
<label htmlFor={fieldId('proof-end')} className="text-sm">End (s)<input id={fieldId('proof-end')} type="number" min="0" step="0.01" value={endSec} onChange={e => setEndSec(Number(e.target.value))} className={timeFieldClass} /></label>
- <button type="button" className={proofNeedsRender ? approveClass : buttonClass} disabled={blocked || !ready?.storyboard.approved || review.proof.occupied || review.proof.active} onClick={() => review.renderProof({ startSec, endSec })}>{proofNeedsRender ? 'Render animated proof' : 'Render a new proof'}</button>
- <button type="button" className={buttonClass} disabled={blocked || review.proof.occupied || review.proof.active} onClick={() => review.renderProof({ startSec, endSec, kind: 'prototype' })}>Render preview only</button>
+ <button type="button" className={buttonClass} disabled={blocked || !ready?.storyboard.approved || review.proof.occupied || review.proof.active} onClick={() => review.renderProof({ startSec, endSec })}>{proofNeedsRender ? 'Render animated proof' : 'Render a new proof'}</button>
</div>;
const proofContent = <>
{!excerpt && <div className="space-y-1 text-sm" aria-label="Proof approval prerequisites">
{!ready?.art.approved && <p><a href="#mv-review-art" onClick={jump('cast-sets', 'mv-review-art')} className="text-port-accent underline">Approve the art direction</a> first.</p>}
{ready?.art.approved && !ready?.storyboard.approved && <p><a href="#mv-review-storyboard" onClick={jump('board', 'mv-review-storyboard')} className="text-port-accent underline">Approve the storyboard</a> first.</p>}
- {prototype && <p className="text-xs text-port-text-muted">The prototype below is a preview only; it can't be approved.</p>}
</div>}
{excerpt && <p className="text-xs text-port-text-muted break-words">{excerpt.filename || excerpt.status} · {project.productionReview?.proof?.basis === ready?.basis.proof ? 'Current source revision' : 'Source changed — render a new proof'}</p>}
{excerpt?.status === 'error' && excerpt.error && <p role="alert" className="text-sm text-port-error break-words">{excerpt.error}</p>}
@@ -168,7 +166,6 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
{!proofNeedsRender && renderControls}
{review.proof.occupied && !review.proof.active && <p role="status">Review evidence is rendering in another project. Wait for it to finish before starting another.</p>}
{review.proof.active && <p role="status">{review.proof.connected === false ? 'Connecting to review render…' : `Rendering review evidence — ${review.proof.percent ?? 0}%.`} Production approvals are separate.</p>}
- {prototype?.status === 'complete' && prototype.filename && <figure><video controls className="mt-2 w-full rounded" aria-label="Unapproved feasibility prototype" src={`/data/videos/${encodeURIComponent(prototype.filename)}`} /><figcaption className="text-sm">Unapproved feasibility prototype — separate from production proof</figcaption></figure>}
{excerpt?.status === 'complete' && excerpt.filename && <video key={proofIdentity} controls className="mt-2 w-full rounded" aria-label="Animated proof with master audio" src={`/data/videos/${encodeURIComponent(excerpt.filename)}`}
onLoadedData={() => setProofMedia({ identity: proofIdentity, ready: true })}
onError={() => setProofMedia({ identity: proofIdentity, ready: false, error: true })} />}
@@ -183,8 +180,8 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
<dt>Audio review</dt><dd>{matchingRecordedReview.machineEvidence.audioReview}</dd>
<dt>Review limitations</dt><dd>{matchingRecordedReview.machineEvidence.limitations}</dd>
</dl>}
- <p className="mt-1 whitespace-pre-wrap text-sm">{matchingRecordedReview.energyComparison}</p>
- <p className="mt-2 whitespace-pre-wrap text-sm">{matchingRecordedReview.timecodedNotes}</p>
+ {matchingRecordedReview.energyComparison && <p className="mt-1 whitespace-pre-wrap text-sm">{matchingRecordedReview.energyComparison}</p>}
+ {matchingRecordedReview.timecodedNotes && <p className="mt-2 whitespace-pre-wrap text-sm">{matchingRecordedReview.timecodedNotes}</p>}
</section>}
{/* The review notes belong to a proof; with none to watch they would only be disabled clutter. */}
{!proofNeedsRender && <>
@@ -206,13 +203,9 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
onChange={e => setPlayback({ [key]: e.target.value })} className={fieldClass} />
</label>)}
</fieldset>}
- <label htmlFor={fieldId('energy-comparison')} className="block text-sm">Playback energy compared with the saved plan
- <textarea id={fieldId('energy-comparison')} rows={3} maxLength={4000} disabled={playbackBlocked} value={playback.energyComparison} onChange={e => setPlayback({ energyComparison: e.target.value })} className={fieldClass}
- placeholder="Chosen energy target; observed subject, prop and camera activity; where playback matches or misses the intended arc." />
- </label>
- <label htmlFor={fieldId('playback-notes')} className="block text-sm">Timecoded playback notes
- <textarea id={fieldId('playback-notes')} rows={3} maxLength={4000} disabled={playbackBlocked} value={playback.timecodedNotes} onChange={e => setPlayback({ timecodedNotes: e.target.value })} className={fieldClass}
- placeholder="0:04 — subject turns on the downbeat; prop opens through 0:06; camera and type clear the lyric. Name any mismatch to revise." />
+ <label htmlFor={fieldId('playback-notes')} className="block text-sm">Notes (optional)
+ <textarea id={fieldId('playback-notes')} rows={2} maxLength={4000} disabled={playbackBlocked} value={playback.timecodedNotes} onChange={e => setPlayback({ timecodedNotes: e.target.value })} className={fieldClass}
+ placeholder="0:04 — turn lands on the downbeat" />
</label>
</>}
</>;
@@ -220,14 +213,14 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
const label = labels[stage];
return <section id="mv-production-review" aria-label="Production review" className="space-y-3">
{review.error && <p role="alert" className="text-port-error">{review.error}</p>}
- <ApprovalBox id={`mv-review-${key}`} label={label} approved={!!ready?.[key].approved}>
+ <ApprovalBox id={`mv-review-${key}`} label={label} optional={!!OPTIONAL[key]} approved={!!ready?.[key].approved}>
{/* The decision comes first, at the top of the box, with one line on what it still needs. */}
{key === 'proof' && proofNeedsRender && !ready?.[key].approved && <div className="mt-2">{renderControls}</div>}
<div className="mt-2 flex flex-wrap items-center gap-2">
{!ready?.[key].approved && !(key === 'proof' && proofNeedsRender) && <button type="button" className={approveClass} onClick={() => approve(key)}
aria-describedby={approvalHelp(key) ? fieldId(`${key}-approval-help`) : undefined}
disabled={blocked || (key === 'art' && visibleArt !== artIdentity) || ready?.[key].approved || !!ready?.[key].problems.length
- || (key === 'proof' && (playbackBlocked || !playbackComplete))}>
+ || (key === 'proof' && (playbackBlocked || !evidenceComplete))}>
{key === 'proof' ? machineReview ? 'Approve proof with machine evidence' : 'Approve proof — watched with sound' : `Approve ${label.toLowerCase()}`}
</button>}
<button type="button" className={buttonClass} onClick={() => {
@@ -238,7 +231,7 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
}}>Request changes</button>
</div>
{approvalHelp(key) && <p id={fieldId(`${key}-approval-help`)} role="status" className="mt-1 text-sm text-port-warning">{approvalHelp(key)}</p>}
- {(ready?.[key].problems || []).length > 1 && <ul className="mt-1 list-disc pl-5 text-xs text-port-text-muted">{ready[key].problems.slice(1).map(problem => <li key={problem}>{problem}</li>)}</ul>}
+ {approvalHelp(key) && (ready?.[key].problems || []).length > 1 && <ul className="mt-1 list-disc pl-5 text-xs text-port-text-muted">{ready[key].problems.slice(1).map(problem => <li key={problem}>{problem}</li>)}</ul>}
{key === 'proof' ? proofContent : <ProductionReviewContext stage={key} project={project} onOpenArtifact={onOpenArtifact} onArtReady={available => setVisibleArt(available ? artIdentity : null)} onSeek={onSeek} />}
{openRequests(key).length > 0 && <div role="group" aria-label={`${label} change requests`} className="mt-2 space-y-2 rounded border border-port-warning p-2">
<p className="text-sm">Resolve these change requests to approve.</p>
@@ -272,11 +265,11 @@ export default function ProductionReviewPanel({ project, review, onOpenArtifact,
<p className="text-sm whitespace-pre-wrap">{item.text}</p>
<p className="text-xs text-port-text-muted">Reviewed revision {item.basis.slice(0, 12)}{ready?.basis[item.stage] !== item.basis ? ' · content has changed since review' : ' · current revision'}</p>
<details><summary className="cursor-pointer py-2 text-sm">Original reviewed content</summary><pre className="max-h-60 overflow-auto whitespace-pre-wrap break-all text-xs">{JSON.stringify(project.productionReview.reviewedRevisions?.[item.basis]?.draft, null, 2)}</pre></details>
- {item.resolvedAt ? <p className="text-sm">Resolution: {item.resolution}</p> : <>
- <label htmlFor={fieldId(`resolution-${item.id}`)} className="block text-sm">Resolution for {item.target}<textarea id={fieldId(`resolution-${item.id}`)} className={fieldClass} value={resolutions[item.id] || ''} onChange={e => setResolutions({ ...resolutions, [item.id]: e.target.value })} /></label>
- <button type="button" className={buttonClass} disabled={blocked || !resolutions[item.id]?.trim()} onClick={async () => {
- await review.resolveFeedback(item.id, resolutions[item.id]);
- }}>Resolve feedback after review</button>
+ {item.resolvedAt ? (item.resolution ? <p className="text-sm">Resolution: {item.resolution}</p> : null) : <>
+ <label htmlFor={fieldId(`resolution-${item.id}`)} className="block text-sm">How it was resolved (optional)<textarea id={fieldId(`resolution-${item.id}`)} className={fieldClass} value={resolutions[item.id] || ''} onChange={e => setResolutions({ ...resolutions, [item.id]: e.target.value })} /></label>
+ <button type="button" className={buttonClass} disabled={blocked} onClick={async () => {
+ await review.resolveFeedback(item.id, resolutions[item.id]?.trim() || '');
+ }}>Mark resolved</button>
</>}
</li>)}</ul>
</details>
diff --git a/client/src/components/musicVideo/ProductionReviewPanel.test.jsx b/client/src/components/musicVideo/ProductionReviewPanel.test.jsx
index 1bb7aaced2..2d8d57f564 100644
--- a/client/src/components/musicVideo/ProductionReviewPanel.test.jsx
+++ b/client/src/components/musicVideo/ProductionReviewPanel.test.jsx
@@ -20,41 +20,39 @@ const reviewFixture = () => ({ readiness: {
basis: { art: 'art', storyboard: 'board', proof: 'same-creative-basis' },
art: { approved: true, problems: [] }, storyboard: { approved: true, problems: [] }, proof: { approved: false, problems: [] },
}, busy: false, proof: { active: false }, approve: vi.fn(), save: vi.fn(async () => null) });
+const NOTE = '0:04 — figure turns on the downbeat; prop follows at 4.5s.';
function recordPlayback() {
fireEvent.loadedData(screen.getByLabelText('Animated proof with master audio'));
- fireEvent.change(screen.getByLabelText('Playback energy compared with the saved plan'), { target: { value: 'The driving turn matches the chosen energy.' } });
- fireEvent.change(screen.getByLabelText('Timecoded playback notes'), { target: { value: '0:04 — figure turns on the downbeat; prop follows at 4.5s.' } });
+ fireEvent.change(screen.getByLabelText('Notes (optional)'), { target: { value: NOTE } });
}
describe('Production proof playback evidence', () => {
- it('records playback attestation only when the reviewer explicitly approves, without a separate checkbox', () => {
+ it('approves a played proof straight away; notes are optional and no checkbox attests', () => {
const review = reviewFixture();
render(<ProductionReviewPanel project={project} review={review} onOpenArtifact={vi.fn()} stage="proof" />);
const approve = screen.getByRole('button', { name: approvalAction });
expect(approve.disabled).toBe(true);
fireEvent.loadedData(screen.getByLabelText('Animated proof with master audio'));
- expect(screen.getByText('Add how the energy compares with the plan.')).toBeTruthy();
- fireEvent.change(screen.getByLabelText('Playback energy compared with the saved plan'), { target: { value: 'Driving movement matches the plan.' } });
- expect(approve.disabled).toBe(true);
- expect(screen.getByText('Add a note with a time, like 0:04.')).toBeTruthy();
- recordPlayback();
expect(screen.queryByRole('checkbox')).toBeNull();
expect(approve.disabled).toBe(false);
+ // Optional: labelled so, and not highlighted like a required approval.
+ expect(screen.getByRole('heading', { name: /^Animated proof\s*Optional$/ })).toBeTruthy();
+ expect(screen.getByRole('region', { name: 'Approve: Animated proof' }).className).not.toContain('border-port-accent');
expect(review.approve).not.toHaveBeenCalled();
// The button itself says what approving attests; no attestation paragraph, and no line once nothing is missing.
expect(approve.textContent).toBe('Approve proof — watched with sound');
expect(screen.queryByText(/By approving, I confirm/)).toBeNull();
expect(approve.getAttribute('aria-describedby')).toBeNull();
fireEvent.click(approve);
- expect(review.approve).toHaveBeenCalledWith('proof', {
- watchedWithAudio: true, excerptId: 'proof-a', filename: 'proof-a.mp4',
- energyComparison: 'The driving turn matches the chosen energy.',
- timecodedNotes: '0:04 — figure turns on the downbeat; prop follows at 4.5s.',
- });
+ expect(review.approve).toHaveBeenCalledWith('proof', { watchedWithAudio: true, excerptId: 'proof-a', filename: 'proof-a.mp4' });
+ // A note, when given, goes with the approval.
+ fireEvent.change(screen.getByLabelText('Notes (optional)'), { target: { value: NOTE } });
+ fireEvent.click(approve);
+ expect(review.approve).toHaveBeenLastCalledWith('proof', { watchedWithAudio: true, excerptId: 'proof-a', filename: 'proof-a.mp4', timecodedNotes: NOTE });
});
- it('explains why a completed prototype cannot be approved and opens the missing prerequisites', () => {
+ it('opens the missing prerequisites and offers no prototype render', () => {
const review = reviewFixture();
review.readiness.art.approved = false;
review.readiness.storyboard = { approved: false, problems: ['Verify alignment against the current master.', 'Import a matching document shot manifest.'] };
@@ -66,13 +64,12 @@ describe('Production proof playback evidence', () => {
const prerequisites = screen.getByLabelText('Proof approval prerequisites');
// The proof step names the one earlier approval to give, not that step's problems.
expect(prerequisites.textContent).toContain('Approve the art direction first.');
- expect(prerequisites.textContent).toContain('preview only');
expect(prerequisites.textContent).not.toContain('Verify alignment against the current master.');
// With no proof yet, the box leads with rendering one; there is nothing to approve.
expect(screen.queryByRole('button', { name: approvalAction })).toBeNull();
expect(screen.getByRole('button', { name: 'Render animated proof' }).disabled).toBe(true);
- fireEvent.loadedData(screen.getByLabelText('Unapproved feasibility prototype'));
- expect(screen.queryByRole('button', { name: approvalAction })).toBeNull();
+ expect(screen.queryByRole('button', { name: 'Render preview only' })).toBeNull();
+ expect(screen.queryByLabelText('Unapproved feasibility prototype')).toBeNull();
// The link crosses to the step that owns that approval.
fireEvent.click(within(prerequisites).getByRole('link', { name: 'Approve the art direction' }));
expect(onNavigate).toHaveBeenLastCalledWith('cast-sets', 'mv-review-art');
@@ -89,9 +86,9 @@ describe('Production proof playback evidence', () => {
} };
view.rerender(<ProductionReviewPanel project={project} review={changedReview} onOpenArtifact={vi.fn()} stage="proof" />);
// The notes belonged to the old proof: they go, with the fields, until a new proof is rendered.
- expect(screen.queryByLabelText('Timecoded playback notes')).toBeNull();
+ expect(screen.queryByLabelText('Notes (optional)')).toBeNull();
view.rerender(<ProductionReviewPanel project={project} review={review} onOpenArtifact={vi.fn()} stage="proof" />);
- expect(screen.getByLabelText('Timecoded playback notes').value).toBe('');
+ expect(screen.getByLabelText('Notes (optional)').value).toBe('');
view.rerender(<ProductionReviewPanel project={project} review={changedReview} onOpenArtifact={vi.fn()} stage="proof" />);
// A proof of an older revision can't be approved; rendering a new one leads instead.
expect(screen.queryByRole('button', { name: approvalAction })).toBeNull();
@@ -131,9 +128,7 @@ describe('Production proof playback evidence', () => {
fireEvent.click(approve);
expect(review.approve).toHaveBeenCalledWith('proof', {
method: 'machine', watchedWithAudio: false, machineEvidence: evidence,
- excerptId: 'proof-a', filename: 'proof-a.mp4',
- energyComparison: 'The driving turn matches the chosen energy.',
- timecodedNotes: '0:04 — figure turns on the downbeat; prop follows at 4.5s.',
+ excerptId: 'proof-a', filename: 'proof-a.mp4', timecodedNotes: NOTE,
});
fireEvent.change(screen.getByLabelText('Review method'), { target: { value: 'playback' } });
expect(screen.getByRole('button', { name: approvalAction }).disabled).toBe(false);
@@ -148,7 +143,7 @@ describe('Production proof playback evidence', () => {
expect(approve.disabled).toBe(true);
});
- it('reports server errors and blocks machine approval for missing media or timestamps', () => {
+ it('reports server errors and blocks machine approval for missing media', () => {
const review = reviewFixture();
render(<ProductionReviewPanel project={project} review={{ ...review, error: 'The proof revision changed; review the current proof.' }} onOpenArtifact={vi.fn()} stage="proof" />);
expect(screen.getByRole('alert').textContent).toContain('proof revision changed');
@@ -158,11 +153,8 @@ describe('Production proof playback evidence', () => {
for (const label of ['Visual and motion observations', 'Audio and alignment observations', 'Review limitations']) {
fireEvent.change(screen.getByLabelText(label), { target: { value: 'Specific evidence from the exact proof and the current master audio.' } });
}
- fireEvent.change(screen.getByLabelText('Playback energy compared with the saved plan'), { target: { value: 'Driving movement matches the saved plan.' } });
- fireEvent.change(screen.getByLabelText('Timecoded playback notes'), { target: { value: 'Missing timestamp' } });
const approve = screen.getByRole('button', { name: proofAction });
- expect(approve.disabled).toBe(true);
- fireEvent.change(screen.getByLabelText('Timecoded playback notes'), { target: { value: '0:04 — turn matches the downbeat.' } });
+ expect(approve.disabled).toBe(false);
fireEvent.error(screen.getByLabelText('Animated proof with master audio'));
expect(approve.disabled).toBe(true);
expect(screen.getByLabelText('Visual and motion observations').disabled).toBe(true);
@@ -263,7 +255,7 @@ describe('Production proof playback evidence', () => {
const view = render(<ProductionReviewPanel project={approved} review={review} onOpenArtifact={vi.fn()} stage="proof" />);
expect(screen.getByLabelText('Recorded proof review').textContent).toContain('0:04 — the figure turns on the downbeat.');
expect(screen.queryByRole('checkbox')).toBeNull();
- expect(screen.getByLabelText('Timecoded playback notes').value).toBe('');
+ expect(screen.getByLabelText('Notes (optional)').value).toBe('');
view.rerender(<ProductionReviewPanel project={{ ...approved, excerpts: [{ id: 'proof-a', filename: 'replacement.mp4', status: 'complete' }] }} review={review} onOpenArtifact={vi.fn()} stage="proof" />);
expect(screen.queryByLabelText('Recorded proof review')).toBeNull();
});
@@ -271,7 +263,7 @@ describe('Production proof playback evidence', () => {
it.each([
{ id: 'proof-b', filename: 'proof-b.mp4' },
{ id: 'proof-a', filename: 'replacement.mp4' },
- ])('requires new playback notes when the proof artifact changes to $filename without a creative-basis change', ({ id, filename }) => {
+ ])('requires playing the new proof again when it changes to $filename without a creative-basis change', ({ id, filename }) => {
const review = reviewFixture();
const view = render(<ProductionReviewPanel project={project} review={review} onOpenArtifact={vi.fn()} stage="proof" />);
recordPlayback();
@@ -280,14 +272,12 @@ describe('Production proof playback evidence', () => {
excerpts: [{ id, filename, status: 'complete' }] };
view.rerender(<ProductionReviewPanel project={replacement} review={review} onOpenArtifact={vi.fn()} stage="proof" />);
expect(screen.queryByRole('checkbox')).toBeNull();
- expect(screen.getByLabelText('Playback energy compared with the saved plan').value).toBe('');
- expect(screen.getByLabelText('Timecoded playback notes').value).toBe('');
+ expect(screen.getByLabelText('Notes (optional)').value).toBe('');
expect(screen.getByRole('button', { name: proofAction }).disabled).toBe(true);
recordPlayback();
fireEvent.click(screen.getByRole('button', { name: proofAction }));
expect(review.approve).toHaveBeenCalledWith('proof', expect.objectContaining({
- excerptId: id, filename, watchedWithAudio: true, energyComparison: 'The driving turn matches the chosen energy.',
- timecodedNotes: '0:04 — figure turns on the downbeat; prop follows at 4.5s.',
+ excerptId: id, filename, watchedWithAudio: true, timecodedNotes: NOTE,
}));
});
@@ -318,7 +308,7 @@ describe('Production proof playback evidence', () => {
view.rerender(<Steps stage="proof" />);
fireEvent.loadedData(screen.getByLabelText('Animated proof with master audio'));
expect(screen.getByText('Save your planning edits first.', { selector: '#mv-review-example-project-proof-proof-approval-help' })).toBeTruthy();
- expect(screen.getByLabelText('Timecoded playback notes').disabled).toBe(true);
+ expect(screen.getByLabelText('Notes (optional)').disabled).toBe(true);
expect(screen.getByRole('button', { name: proofAction }).disabled).toBe(true);
expect(review.approve).not.toHaveBeenCalled();
});
diff --git a/client/src/components/musicVideo/ProjectActionGroups.jsx b/client/src/components/musicVideo/ProjectActionGroups.jsx
index f41bf0c443..3a84ea7756 100644
--- a/client/src/components/musicVideo/ProjectActionGroups.jsx
+++ b/client/src/components/musicVideo/ProjectActionGroups.jsx
@@ -273,7 +273,7 @@ export function RenderFinalButton({ project, renderJob, readiness }) {
// Determine the blocker reason for display
let blockerReason = '';
if (!readiness?.readyForProduction) {
- blockerReason = 'Approve the current visual guide, timed storyboard and animated proof first';
+ blockerReason = 'Approve the current visual guide and timed storyboard first';
} else if (eidoverseMode && eidoverseBlocked) {
blockerReason = eidoverseBlocked;
} else if (documentMode && documentBlocked) {
diff --git a/client/src/components/musicVideo/StageChecklist.jsx b/client/src/components/musicVideo/StageChecklist.jsx
index a14795d244..364140763f 100644
--- a/client/src/components/musicVideo/StageChecklist.jsx
+++ b/client/src/components/musicVideo/StageChecklist.jsx
@@ -6,27 +6,30 @@ import { ArrowRight, CheckCircle2, Circle } from 'lucide-react';
* where one exists, a button that scrolls to the control that settles it —
* unless the header's next action already goes there (`headerAnchor`). A stale
* approval lists a Revert button per changed input whose approved value was kept.
+ * An `optional` item is listed but never counted toward the step being done.
*/
export default function StageChecklist({ items, onAction, onRevert, headerAnchor = null }) {
if (!items?.length) return null;
- const done = items.filter((item) => item.done).length;
+ const required = items.filter((item) => !item.optional);
+ const done = required.filter((item) => item.done).length;
+ const allDone = done === required.length;
return (
<section aria-label="What this step needs" className="min-w-0 rounded-lg border border-port-border bg-port-card p-3">
<div className="flex items-center gap-2">
<h4 className="text-sm font-medium">What this step needs</h4>
- <span className={`text-xs ${done === items.length ? 'text-port-success' : 'text-port-text-muted'}`}>
- {done === items.length ? 'All done' : `${done} of ${items.length} done`}
+ <span className={`text-xs ${allDone ? 'text-port-success' : 'text-port-text-muted'}`}>
+ {allDone ? 'All done' : `${done} of ${required.length} done`}
</span>
</div>
{/* A finished step needs no rows: one line names what was done, so the step's own work comes up sooner. */}
- {done === items.length ? <p className="mt-1 text-xs text-port-text-muted">{items.map((item) => item.label).join(' · ')}</p> : (
+ {allDone ? <p className="mt-1 text-xs text-port-text-muted">{items.map((item) => item.label).join(' · ')}</p> : (
<ul className="mt-2 space-y-1.5">
{items.map((item) => (
// The action wraps under the text on a phone instead of squeezing it into a narrow column.
<li key={item.id} className="flex min-w-0 flex-wrap items-start gap-2 text-sm">
{item.done
? <CheckCircle2 size={16} className="mt-0.5 shrink-0 text-port-success" aria-label="done" />
- : <Circle size={16} className="mt-0.5 shrink-0 text-port-warning" aria-label={item.stale ? 'approved earlier, stale' : 'to do'} />}
+ : <Circle size={16} className={`mt-0.5 shrink-0 ${item.optional ? 'text-port-text-muted' : 'text-port-warning'}`} aria-label={item.optional ? 'optional' : item.stale ? 'approved earlier, stale' : 'to do'} />}
<div className="min-w-0 flex-1 basis-48">
<span className={item.done ? 'text-port-text-muted' : ''}>{item.label}</span>
{item.stale && <span className="ml-2 rounded bg-port-warning/10 px-1.5 py-0.5 text-xs text-port-warning">done · stale</span>}
diff --git a/client/src/components/musicVideo/stages/ProduceStage.jsx b/client/src/components/musicVideo/stages/ProduceStage.jsx
index 7360e5fe8d..e36f08980f 100644
--- a/client/src/components/musicVideo/stages/ProduceStage.jsx
+++ b/client/src/components/musicVideo/stages/ProduceStage.jsx
@@ -9,7 +9,7 @@ import { FOOTAGE_OPTIONAL_MODES } from '../../../lib/musicVideoStages.js';
/**
* Make: the picture for every shot, then the composition over it. A render
* style that draws its own picture (code, document, Eidoverse) keeps the
- * footage tools folded, since footage is optional there. The animated proof that closes the step sits at the bottom of
+ * footage tools folded, since footage is optional there. The optional animated proof sits at the bottom of
* the page with the other approvals; the autopilot and production runs live in
* Project settings › Autopilot.
*/
diff --git a/client/src/components/musicVideo/stages/SetupStage.test.jsx b/client/src/components/musicVideo/stages/SetupStage.test.jsx
index ffc3ca3a0c..e4bb5cf8c2 100644
--- a/client/src/components/musicVideo/stages/SetupStage.test.jsx
+++ b/client/src/components/musicVideo/stages/SetupStage.test.jsx
@@ -43,19 +43,19 @@ describe('Song step', () => {
const project = { id: 'p', trackId: 't', audioAnalysis: {}, lyricCues: [{ id: 'c', text: 'hi', words: [{ w: 'hi' }] }],
productionReview: { draft: { cast: 'kept', lyricsMode: 'vocal', timingStatus: 'provisional', timingNotes: '' } } };
render(<SetupStage board={board(project, { productionReview: review({ save }), planningDraft: [{ cast: 'edited', lyricsMode: 'vocal' }, setPlanning] })} />);
- fireEvent.change(screen.getByLabelText(/What you checked/), { target: { value: 'Listened through twice' } });
+ fireEvent.change(screen.getByLabelText('Notes (optional)'), { target: { value: 'Listened through twice' } });
await fireEvent.click(screen.getByRole('button', { name: 'Mark timing verified' }));
expect(save).toHaveBeenCalledWith(expect.objectContaining({ cast: 'kept', lyricsMode: 'vocal', timingStatus: 'verified', timingNotes: 'Listened through twice' }));
await vi.waitFor(() => expect(setPlanning).toHaveBeenCalledWith({ cast: 'edited', lyricsMode: 'vocal', timingStatus: 'verified', timingNotes: 'Listened through twice' }));
});
- it('re-verifies a stale timing through the alignment route and needs a note to do it', () => {
+ it('re-verifies a stale timing through the alignment route without requiring a note', () => {
const reverifyAlignment = vi.fn(async () => ({}));
const project = { id: 'p', trackId: 't', audioAnalysis: {}, lyricCues: [{ id: 'c', text: 'hi' }], productionReview: { draft: { lyricsMode: 'vocal', timingStatus: 'verified' } } };
render(<SetupStage board={board(project, { productionReview: review({ reverifyAlignment, readiness: { alignment: { status: 'stale' } } }) })} />);
const button = screen.getByRole('button', { name: 'Re-verify timing' });
- expect(button).toBeDisabled();
- fireEvent.change(screen.getByLabelText(/What you checked/), { target: { value: 'New master checked' } });
+ expect(button).toBeEnabled();
+ fireEvent.change(screen.getByLabelText('Notes (optional)'), { target: { value: 'New master checked' } });
fireEvent.click(button);
expect(reverifyAlignment).toHaveBeenCalledWith('New master checked');
});
@@ -67,20 +67,17 @@ describe('Song step', () => {
productionReview: review({ readiness: { alignment: { status: 'stale' } } }),
planningDraft: [{ cast: 'edited', timingStatus: 'verified', timingNotes: 'old' }, setPlanning],
})} />);
- fireEvent.change(screen.getByLabelText(/What you checked/), { target: { value: 'New master checked' } });
+ fireEvent.change(screen.getByLabelText('Notes (optional)'), { target: { value: 'New master checked' } });
fireEvent.click(screen.getByRole('button', { name: 'Re-verify timing' }));
await vi.waitFor(() => expect(setPlanning).toHaveBeenCalledWith({ cast: 'edited', timingStatus: 'verified', timingNotes: 'New master checked' }));
});
- it('confirms an instrumental with a reason', () => {
+ it('confirms an instrumental straight away; a note is optional', () => {
const save = vi.fn(async () => ({}));
const project = { id: 'p', trackId: 't', audioAnalysis: {}, productionReview: { draft: {} } };
render(<SetupStage board={board(project, { productionReview: review({ save }) })} />);
fireEvent.click(screen.getByRole('radio', { name: 'Instrumental' }));
- const confirm = screen.getByRole('button', { name: 'Confirm instrumental' });
- expect(confirm).toBeDisabled();
- fireEvent.change(screen.getByLabelText('Why this song has no lyrics'), { target: { value: 'No vocals at all' } });
- fireEvent.click(confirm);
- expect(save).toHaveBeenCalledWith(expect.objectContaining({ lyricsMode: 'instrumental', timingNotes: 'No vocals at all' }));
+ fireEvent.click(screen.getByRole('button', { name: 'Confirm instrumental' }));
+ expect(save).toHaveBeenCalledWith(expect.objectContaining({ lyricsMode: 'instrumental', timingNotes: '' }));
});
});
diff --git a/client/src/lib/README.md b/client/src/lib/README.md
index 77f9464a06..d8883112fe 100644
--- a/client/src/lib/README.md
+++ b/client/src/lib/README.md
@@ -67,7 +67,7 @@ grep -i "what you want to do" client/src/lib/README.md
| `musicVideoSceneAttention.js` | Music Video per-scene attention model (#10152): `sceneAttention(scene, ctx)` returns the codes (`missing-frame`, `missing-clip`, `under-covered`, `contract-problem`, `perf-blocked`, `candidates-pending`, `plate-unverified`, `no-span`, `last-failure`) behind the collapsed scene-row chips, the Board `?scenes=attention\|missing\|all` filter (`parseSceneFilter`, `sceneMatchesFilter`) and the Produce per-shot strip; `SCENE_ATTENTION_LABELS`. Used by `components/musicVideo/SceneCard.jsx`, `stages/BoardStage.jsx` and `stages/ProduceStage.jsx`. |
| `musicVideoCoverOverlay.js` | Cover-art lettering preview (#10345): re-export of `server/lib/musicVideoCoverOverlay.js` (the design vocabulary, `normalizeCoverDesign`, `coverOverlaySvg`) plus `canvasCoverWidths(design, texts, fonts)`, which measures text with a canvas so the live preview wraps and sizes the title the way the server's measured render does. |
| `musicVideoShotTiming.js` | Re-export of `server/lib/musicVideoShotTiming.js` (#8977) — shot modes, the verified source-audio lip-sync capability table, `performanceBlockedReason`, `planPerformanceRepair` (measured accepted-prefix boundary, suffix interval and next spend), `planPerformanceWindow`, `grokCoverage`, `approximateMotionCues`, `shotSplitLimit` (when a scene offers a lyric-boundary split), `falSceneTake` (a fal take's model, length, resolution and estimated cost). Used by `hooks/useMusicVideoSceneMedia.js` and `components/musicVideo/SceneCard.jsx`. |
-| `musicVideoStages.js` | Music Video page stage model: `MUSIC_VIDEO_STAGES` (six steps: Song `setup` → Look `cast-sets` → Storyboard `board` → Make `produce` → Final render `review` → Publish; a retired `compose` link resolves to Make), `resolveStageParam(value)` for the `:stage` route param, `deriveStages(project)` (per-stage `done`/`active`/`blocked`/`todo` + `current`, the first incomplete step; a live production run pins Make), `deriveNextAction(project, ctx)` (the one primary action the sticky header offers — approve Cast & Sets, verify lyric timing, stop/resume production, render final, …), `describeProjectStatus` (the header line and the step that needs the director), `autopilotStatus` (the header Autopilot button), `projectSpend(project)` (paid generation used vs. cap), `projectShotSummary(project)` (document shots or scene counts), `stageChecklist(stageId, project, readiness)` (what one step still needs, with the open approval's reason and a scroll anchor), `stepNotes(project, readiness, publish)` (one fact per step for the step list), `listPreviewSources` (final, live composition, drafts, then the storyboard animatic), `projectServicesSummary(project)` (the saved image/video render services), `compareMusicVideoProjectsNewestFirst(a, b)` (sort projects newest created / updated first for project cards and pickers), and `currentProductionRun`; `productionReviewStopGuidance` separates current approval blockers from historical run stops. Used by `components/musicVideo/MusicVideoLayout.jsx` and `pages/MusicVideo.jsx`. |
+| `musicVideoStages.js` | Music Video page stage model: `MUSIC_VIDEO_STAGES` (six steps: Song `setup` → Look `cast-sets` → Storyboard `board` → Make `produce` → Final render `review` → Publish; a retired `compose` link resolves to Make), `resolveStageParam(value)` for the `:stage` route param, `deriveStages(project)` (per-stage `done`/`active`/`blocked`/`todo` + `current`, the first incomplete step; a live production run pins Make), `deriveNextAction(project, ctx)` (the one primary action the sticky header offers — approve Cast & Sets, verify lyric timing, stop/resume production, render final, …), `describeProjectStatus` (the header line and the step that needs the director), `autopilotStatus` (the header Autopilot button), `projectSpend(project)` (paid generation used vs. cap), `projectShotSummary(project)` (document shots or scene counts), `stageChecklist(stageId, project, readiness)` (what one step still needs, with the open approval's reason and a scroll anchor; an `optional` item, such as Make's animated proof, is listed but not counted), `stepNotes(project, readiness, publish)` (one fact per step for the step list), `listPreviewSources` (final, live composition, drafts, then the storyboard animatic), `projectServicesSummary(project)` (the saved image/video render services), `compareMusicVideoProjectsNewestFirst(a, b)` (sort projects newest created / updated first for project cards and pickers), and `currentProductionRun`; `productionReviewStopGuidance` separates current approval blockers from historical run stops. Used by `components/musicVideo/MusicVideoLayout.jsx` and `pages/MusicVideo.jsx`. |
| `musicVideoAttention.js` | Music Video "Needs attention" model (#9940): `deriveAttentionItems(project, live)` returns the banner rows for server-held states a client-orchestrated workflow can strand — an open/rendering revision, an interrupted Cast & Sets stage, a running auto-review waiting on its revised sections, a final render nobody is watching — derived from the persisted record so they survive a reload (healthy work this tab can see progressing is not flagged); `openRevisionOf(project)`; `ATTENTION_ANCHOR_ID` + `revealAttention()` scroll a refusal toast to the banner. Used by `components/musicVideo/NeedsAttentionBanner.jsx` and `pages/MusicVideo.jsx`. |
| `musicVideoProjectList.js` | Music Video project index model (#10167): `projectRunPill(project)` (Running / Needs you / Interrupted / Done, from the same next-action and attention logic as the header), `groupMusicVideoProjects(projects, query)` (collapse forks under their root, newest version first, name filter, groups ordered by last touch), and `compareMusicVideoProjectsRecentlyTouched`. Used by `pages/MusicVideo.jsx` and `components/musicVideo/MusicVideoProjectCard.jsx`. |
| `musicVideoPreview.js` | Pick the representative produced asset for a Music Video project card (`selectMusicVideoPreview`: final video → latest excerpt → latest rendered scene clip → latest scene reference frame → visual spec reference) for the main project grid. Pure, computed off the project record, with image path and fallback helpers (`musicVideoImageSrc`, `musicVideoImageFallback`). |
diff --git a/client/src/lib/musicVideoAttention.js b/client/src/lib/musicVideoAttention.js
index b51644ea5f..f44145e85c 100644
--- a/client/src/lib/musicVideoAttention.js
+++ b/client/src/lib/musicVideoAttention.js
@@ -131,11 +131,11 @@ export function deriveAttentionItems(project, { generatingSceneIds = null, draft
}
// Approvals in the order they are given, with the tab (and editor) each is re-given on.
+// The animated proof is optional, so a proof approved on older inputs needs no attention.
const STALE_APPROVALS = [
['castAndSets', 'Cast & Sets check-in', 'cast-sets'],
['art', 'Art direction', 'cast-sets#mv-review-art'],
['storyboard', 'Timed storyboard', 'board#mv-review-storyboard'],
- ['proof', 'Animated proof', 'produce#mv-review-proof'],
];
// One row for every approval given on inputs that have changed since (#10141),
diff --git a/client/src/lib/musicVideoStages.js b/client/src/lib/musicVideoStages.js
index c2480314ee..a50000ef58 100644
--- a/client/src/lib/musicVideoStages.js
+++ b/client/src/lib/musicVideoStages.js
@@ -19,15 +19,15 @@ import { FINISHED_OUTSIDE_RERENDER_NOTE, finishedOutside, finishedOutsideCovers
* The six steps of a music video, in the order the director decides them. The
* ids are the route's `:stage` values and stay stable across the relabel
* (#10297 follow-up): Song is `setup`, Look is `cast-sets`, Storyboard is
- * `board`, Make is `produce` (footage, composition and the proof that closes
- * them) and Final render is `review`. `doneWhen` is the one line a step
+ * `board`, Make is `produce` (footage and the composition over it; an
+ * animated proof is an optional check) and Final render is `review`. `doneWhen` is the one line a step
* shows under its title.
*/
export const MUSIC_VIDEO_STAGES = [
{ id: 'setup', label: 'Song', title: 'Song', doneWhen: 'Done when the track is analyzed and every lyric word is timed to the vocal.' },
{ id: 'cast-sets', label: 'Look', title: 'Look', doneWhen: 'Done when the art direction is written, a visual guide is chosen, and you approve it.' },
{ id: 'board', label: 'Storyboard', title: 'Storyboard', doneWhen: 'Done when shots cover the whole song and you approve the timed storyboard.' },
- { id: 'produce', label: 'Make', title: 'Make', doneWhen: 'Done when every shot has its picture and you approve a proof watched with sound.' },
+ { id: 'produce', label: 'Make', title: 'Make', doneWhen: 'Done when every shot has its picture and the composition is ready.' },
{ id: 'review', label: 'Final render', title: 'Final render', doneWhen: 'Done when the full video is rendered from the approved plan and is up to date.' },
{ id: 'publish', label: 'Publish', title: 'Publish', doneWhen: 'Done when every platform you turned on has a post.' },
];
@@ -50,8 +50,11 @@ export const currentProductionRun = (project) => {
return runs.find((r) => RESUMABLE_RUN_STATUSES.has(r.status)) || runs[runs.length - 1] || null;
};
-/** Current review guidance for a stopped approval-gated run; retain other failures. */
-export function productionReviewStopGuidance(run, readiness, through = 'proof') {
+/**
+ * Current review guidance for a stopped approval-gated run; retain other failures.
+ * Runs wait on art and storyboard only: the animated proof is optional.
+ */
+export function productionReviewStopGuidance(run, readiness, through = 'storyboard') {
const reason = run?.stopReason || run?.error;
if (!readiness || !reason || !['blocked', 'needs-human', 'stopped', 'failed'].includes(run.status)) return null;
const approvalStop = run.errorCode === 'MUSIC_VIDEO_APPROVAL_REQUIRED'
@@ -306,10 +309,9 @@ export function lyricSetupState(project, readiness = project?.productionReadines
* changed since — plus `current`, the first stage that is not done. A live production
* run owns the project, so it pins `current` to Produce.
*
- * Make (`produce`) holds the footage, the composition over it and the animated
- * proof that closes both (#10140): the proof's basis covers the whole
- * composition (typography, grade), so it is judged last. A later typography or
- * grade edit marks Make stale until the proof is approved again.
+ * Make (`produce`) holds the footage and the composition over it. Its animated
+ * proof is an optional check: the composition preview already shows the
+ * picture, so neither Make nor the final render waits on a proof approval.
*/
export function deriveStages(project, readiness = project?.productionReadiness, publish = {}) {
const scenes = project?.scenes || [];
@@ -329,7 +331,7 @@ export function deriveStages(project, readiness = project?.productionReadiness,
setup: projectHasAudio(project) && !!project?.audioAnalysis && lyricSetupState(project, readiness).ok,
'cast-sets': castDone,
board: planned,
- produce: produceDone && composeDone(project || {}, mode) && !!readiness?.proof.approved,
+ produce: produceDone && composeDone(project || {}, mode),
// A render made before later scene edits no longer counts as the final video.
review: !!project?.renderHistoryId && !isFinalRenderStale(project),
// #9281/#9282: published once every enabled platform has a recorded post.
@@ -347,7 +349,6 @@ export function deriveStages(project, readiness = project?.productionReadiness,
const stale = external ? {} : {
'cast-sets': !!readiness?.art?.stale || !!readiness?.castAndSets?.stale,
board: !!readiness?.storyboard?.stale,
- produce: !!readiness?.proof?.stale,
};
const current = liveRun
? 'produce'
@@ -393,18 +394,15 @@ export function deriveNextAction(project, {
const draftReview = project.productionReview?.draft || {};
const documentShots = draftReview.storyboardSource === 'document' && (draftReview.storyboard || []).length > 0;
const boardNeedsOwnAction = !art && board && scenes.length === 0 && !documentShots;
- // The proof closes Make, so it waits for Make's footage — unless a production
- // run is parked on its pilot proof, which only the approval frees.
- const footageOptional = FOOTAGE_OPTIONAL_MODES.has(project.composition?.mode || 'concat');
- const layered = isLayeredComposition(project);
- const footageDone = footageOptional || scenes.every((scene) => sceneRenderReady(scene, { layered }));
- const proofDue = current !== 'produce' || footageDone || (!!run && RESUMABLE_RUN_STATUSES.has(run.status));
- if (!finishedOutside(project) && projectHasAudio(project) && project.audioAnalysis && !CAST_WORKING.has(cast?.status) && !readiness?.readyForProduction && (art || board || proofDue)
+ // The animated proof is optional, so the header sends the director to it only
+ // when a production run is parked on its pilot proof before paid bulk generation.
+ const pilotParked = !!run && RESUMABLE_RUN_STATUSES.has(run.status) && !!run.pilot?.scenes?.length && !readiness?.proof?.approved;
+ if (!finishedOutside(project) && projectHasAudio(project) && project.audioAnalysis && !CAST_WORKING.has(cast?.status) && (art || board || pilotParked)
&& run?.status !== 'running' && !renderActive && !kickoffRunning
&& !castNeedsOwnAction && !boardNeedsOwnAction) {
return { id: 'review-production', kind: 'goto', stage: art ? 'cast-sets' : board ? 'board' : 'produce',
anchor: art ? 'mv-review-art' : board ? 'mv-review-storyboard' : 'mv-review-proof',
- label: art ? 'Review art direction' : board ? 'Review timed storyboard' : 'Review animated proof',
+ label: art ? 'Review art direction' : board ? 'Review timed storyboard' : 'Review pilot proof',
shortLabel: art ? 'Review art' : board ? 'Review storyboard' : 'Review proof' };
}
if (run && RESUMABLE_RUN_STATUSES.has(run.status)) {
@@ -467,6 +465,8 @@ export function deriveNextAction(project, {
case 'board':
return { id: 'plan', kind: 'run', label: 'Plan the shots', shortLabel: 'Plan', disabled: !project.audioAnalysis, reason: project.audioAnalysis ? undefined : 'Analyze the track first' };
case 'produce': {
+ const footageDone = FOOTAGE_OPTIONAL_MODES.has(project.composition?.mode || 'concat')
+ || scenes.every((scene) => sceneRenderReady(scene, { layered: isLayeredComposition(project) }));
if (run?.status === 'needs-human') return { id: 'goto-review', kind: 'goto', stage: 'review', label: 'Review the draft', shortLabel: 'Review' };
if (!footageDone) return { id: 'goto-produce', kind: 'goto', stage: 'produce', anchor: 'mv-generation', label: 'Make the footage', shortLabel: 'Make' };
const label = { document: 'Attach a composition', eidoverse: 'Save the Eidoverse scene', code: 'Generate the code video' }[project.composition?.mode] || 'Add typography';
@@ -587,7 +587,7 @@ export function stageChecklist(stageId, project, readiness = project?.production
action: autoSong ? null : { label: 'Import lyrics', anchor: 'mv-lyrics-import' } },
{ id: 'timing', label: lyrics.instrumental ? 'Instrumental confirmed' : 'Lyric timing verified', done: lyrics.verified || lyrics.ok,
detail: lyrics.alignment === 'stale' ? 'Word timings or the master changed since you verified them; verify again.'
- : lyrics.instrumental ? 'Say why the song has no lyrics under Time and verify.'
+ : lyrics.instrumental ? 'Confirm the song is instrumental under Time and verify.'
: 'Align the words, listen back, then mark the timing verified under Time and verify.',
action: autoSong ? null : { label: 'Verify timing', anchor: 'mv-lyric-timing' } },
];
@@ -619,7 +619,7 @@ export function stageChecklist(stageId, project, readiness = project?.production
}
case 'produce': {
// Make: footage (unless the render style draws its own picture), the
- // composition over it, then the proof that closes both (see deriveStages).
+ // composition over it, then the optional proof (see deriveStages).
const items = [];
if (!FOOTAGE_OPTIONAL_MODES.has(mode)) {
const layered = isLayeredComposition(project);
@@ -628,7 +628,9 @@ export function stageChecklist(stageId, project, readiness = project?.production
items.push({ id: 'footage', label: `Footage for every shot (${formatCount(ready)} of ${formatCount(scenes.length)})`, done: footageDone,
action: footageDone ? null : { label: 'Make the footage', anchor: 'mv-generation' } });
}
- const proof = approval('proof', 'Animated proof', 'Render the proof over this composition, watch it with sound, then approve it below.');
+ const proofApproval = approval('proof', 'Animated proof', null);
+ // Optional: shown so it can be found, never counted toward the step being done.
+ const proof = { ...proofApproval, label: proofApproval.done ? proofApproval.label : 'Animated proof (optional)', optional: true, detail: null };
const composition = project.composition || {};
let work = null;
if (mode === 'composed') work = { id: 'composition', label: 'Timed typography added', done: (composition.textCues || []).length > 0, action: { label: 'Add typography', anchor: 'mv-typo-font' } };
diff --git a/client/src/lib/musicVideoStages.test.js b/client/src/lib/musicVideoStages.test.js
index 97fb466c58..e7b7760728 100644
--- a/client/src/lib/musicVideoStages.test.js
+++ b/client/src/lib/musicVideoStages.test.js
@@ -191,22 +191,23 @@ it('never promotes placeholder scenes or imported schematic documents to final p
const project = { id: 'example', trackId: 'song', audioAnalysis: ANALYSIS, ...LYRICS, scenes: [scene()], composition: { mode: 'document', document: { directory: 'draft' } } };
expect(stateOf(project)).toMatchObject({ 'cast-sets': 'active', board: 'todo', produce: 'todo' });
expect(deriveNextAction(project)).toMatchObject({ id: 'review-production', stage: 'cast-sets' });
- const planned = { ...project, productionReadiness: { ...APPROVED, proof: { approved: false }, readyForProduction: false } };
- expect(deriveNextAction(planned)).toMatchObject({ id: 'review-production', stage: 'produce' });
+ // The proof is optional: with art and storyboard approved the header moves on to rendering.
+ const planned = { ...project, productionReadiness: { ...APPROVED, proof: { approved: false }, readyForProduction: true } };
+ expect(deriveNextAction(planned)).toMatchObject({ id: 'render-final' });
});
-// #10140: the proof is the last part of Make. Following the steps in order
-// must never send an earlier step back to not done.
+// Following the steps in order must never send an earlier step back to not
+// done. The animated proof is optional: it never holds Make or the render.
describe('following the tab order', () => {
// The server's proof basis covers the whole composition (productionReview.js),
// so an approval holds only while the composition it was given over is unchanged.
const readinessFor = (project, { art = false, storyboard = false, approvedComposition = null } = {}) => {
const proof = approvedComposition !== null && approvedComposition === JSON.stringify(project.composition || null);
- return { art: { approved: art, problems: [] }, storyboard: { approved: storyboard, problems: [] }, proof: { approved: proof, problems: [] }, readyForProduction: proof };
+ return { art: { approved: art, problems: [] }, storyboard: { approved: storyboard, problems: [] }, proof: { approved: proof, problems: [] }, readyForProduction: storyboard };
};
const doneSet = (project, readiness) => new Set(deriveStages(project, readiness).stages.filter((s) => s.state === 'done').map((s) => s.id));
- it('walks song → look → storyboard → footage → composition → proof → render without a step going backwards', () => {
+ it('walks song → look → storyboard → footage → composition → render without a step going backwards', () => {
let project = { id: 'p', scenes: [], composition: { mode: 'composed', textCues: [] } };
let approvals = {};
const steps = [
@@ -215,7 +216,6 @@ describe('following the tab order', () => {
['board', () => { project = { ...project, scenes: [scene({ referenceImageId: null, videoHistoryId: null })] }; approvals = { ...approvals, storyboard: true }; }],
['produce', () => { project = { ...project, scenes: [scene()] }; }],
['compose', () => { project = { ...project, composition: { ...project.composition, textCues: [{ id: 'c1', text: 'Hello', startSec: 0, endSec: 2 }], grade: { contrast: 1.1 } } }; }],
- ['proof', () => { approvals = { ...approvals, approvedComposition: JSON.stringify(project.composition) }; }],
['review', () => { project = { ...project, renderHistoryId: 'rh-1' }; }],
];
let before = doneSet(project, readinessFor(project, approvals));
@@ -224,16 +224,15 @@ describe('following the tab order', () => {
const readiness = readinessFor(project, approvals);
const after = doneSet(project, readiness);
for (const id of before) expect(after.has(id), `${id} regressed after ${step}`).toBe(true);
- // Each action finishes its own step, except that footage and typography
- // leave Make open: the proof over the composition closes it.
- if (step === 'produce' || step === 'compose') expect(after.has('produce'), `Make done after ${step}, before its proof`).toBe(false);
- else expect(after.has(step === 'proof' ? 'produce' : step), `${step} not done`).toBe(true);
+ // Each action finishes its own step; footage alone leaves Make open until the typography is added.
+ if (step === 'produce') expect(after.has('produce'), 'Make done before its composition').toBe(false);
+ else expect(after.has(step === 'compose' ? 'produce' : step), `${step} not done`).toBe(true);
before = after;
}
expect(deriveStages(project, readinessFor(project, approvals)).current).toBe('publish');
});
- it('a typography edit after proof approval reopens Make only and sends the header to its proof', () => {
+ it('a typography edit after proof approval keeps Make done and lists the proof as optional', () => {
const composition = { mode: 'composed', textCues: [{ id: 'c1', text: 'Hello', startSec: 0, endSec: 2 }] };
const project = { id: 'p', trackId: 't1', audioAnalysis: ANALYSIS, scenes: [scene()], composition };
const approvals = { art: true, storyboard: true, approvedComposition: JSON.stringify(composition) };
@@ -242,17 +241,21 @@ describe('following the tab order', () => {
const edited = { ...project, composition: { ...composition, textCues: [...composition.textCues, { id: 'c2', text: 'World', startSec: 2, endSec: 4 }] } };
const readiness = readinessFor(edited, approvals);
expect(Object.fromEntries(deriveStages(edited, readiness).stages.map((s) => [s.id, s.state])))
- .toMatchObject({ board: 'done', produce: 'active', review: 'todo' });
- expect(deriveNextAction(edited, { readiness })).toMatchObject({ id: 'review-production', stage: 'produce', anchor: 'mv-review-proof' });
- expect(stageChecklist('produce', edited, readiness).map((i) => [i.id, i.done])).toEqual([['footage', true], ['composition', true], ['approve-proof', false]]);
+ .toMatchObject({ board: 'done', produce: 'done', review: 'active' });
+ expect(deriveNextAction(edited, { readiness })).toMatchObject({ id: 'render-final' });
+ expect(stageChecklist('produce', edited, readiness).map((i) => [i.id, i.done, !!i.optional, i.label]))
+ .toEqual([['footage', true, false, 'Footage for every shot (1 of 1)'], ['composition', true, false, 'Timed typography added'], ['approve-proof', false, true, 'Animated proof (optional)']]);
});
it('keeps the header on the footage until it is in, unless a run is parked on its pilot proof', () => {
const project = { id: 'p', trackId: 't1', audioAnalysis: ANALYSIS, scenes: [scene({ videoHistoryId: null })] };
const readiness = readinessFor(project, { art: true, storyboard: true });
expect(deriveNextAction(project, { readiness })).toMatchObject({ id: 'goto-produce', stage: 'produce' });
- const parked = { ...project, productionRuns: [run({ status: 'blocked' })] };
- expect(deriveNextAction(parked, { readiness })).toMatchObject({ id: 'review-production', stage: 'produce' });
+ // A run parked on its pilot proof before paid bulk generation still sends the director to that proof.
+ const parked = { ...project, productionRuns: [run({ status: 'blocked', pilot: { scenes: [{ sceneId: 's1' }] } })] };
+ expect(deriveNextAction(parked, { readiness })).toMatchObject({ id: 'review-production', stage: 'produce', anchor: 'mv-review-proof' });
+ const parkedNoPilot = { ...project, productionRuns: [run({ status: 'blocked' })] };
+ expect(deriveNextAction(parkedNoPilot, { readiness })).toMatchObject({ id: 'resume-production' });
});
});
diff --git a/client/src/pages/MusicVideo.test.jsx b/client/src/pages/MusicVideo.test.jsx
index 9be4a02812..6cb73ba670 100644
--- a/client/src/pages/MusicVideo.test.jsx
+++ b/client/src/pages/MusicVideo.test.jsx
@@ -3046,8 +3046,8 @@ describe('Autopilot collapsed review summary', () => {
const error = 'Review and approve the current art direction first.';
const project = { ...PROJECT_ANALYZED, autonomousRun: { id: 'history-run', status: 'needs-human', stage: 'produce',
error, errorCode: 'MUSIC_VIDEO_APPROVAL_REQUIRED', brief: { autoApprove: [] }, stages: {}, output: {} },
- productionReadiness: { basis: {}, art: { approved: true, problems: [] }, storyboard: { approved: true, problems: [] },
- proof: { approved: false, problems: ['Render and watch a current animated chorus proof with the master song.'] } } };
+ productionReadiness: { basis: {}, art: { approved: true, problems: [] }, storyboard: { approved: false, problems: ['Approve the current lyric-timed storyboard.'] },
+ proof: { approved: false, problems: [] } } };
listMusicVideoProjects.mockResolvedValue([project]);
render(<MemoryRouter initialEntries={['/music-video/mv-3/review']}>{MV_ROUTES}</MemoryRouter>);
// Collapsed, the run is the header's Autopilot button: it never repeats the stale error.
@@ -3057,7 +3057,7 @@ describe('Autopilot collapsed review summary', () => {
const drawer = await screen.findByRole('dialog', { name: 'Project settings' });
const run = within(drawer).getByRole('region', { name: 'Autonomous run' });
expect(within(run).getByText(`Historical stop reason: ${error}`)).toBeInTheDocument();
- const current = within(run).getByText(/Render and watch a current animated chorus proof/);
+ const current = within(run).getByText(/Approve the current lyric-timed storyboard/);
expect(current.textContent).not.toContain(error);
});
});
diff --git a/docs/features/music-video-autonomous.md b/docs/features/music-video-autonomous.md
index 04181c0343..13ce6ad6be 100644
--- a/docs/features/music-video-autonomous.md
+++ b/docs/features/music-video-autonomous.md
@@ -1,6 +1,6 @@
# Autonomous Music Video
-One prompt in, a finished music video out. The Music Video page's **Autonomous** entry point (and the `music-video-autopilot` scheduled task) starts a server-owned run that does everything the hand-driven flow asks you to set up first: it writes the creative brief, the lyrics and a mood board, makes the song (in Suno, or on this machine), and produces the video with the tools you allowed. Song-writing checkpoints are optional. Production requires revision-bound approval of the visual guide, lyric-timed storyboard and animated proof. Authenticated sessions may grant automatic planning approvals; proof always needs substantive playback or machine review evidence.
+One prompt in, a finished music video out. The Music Video page's **Autonomous** entry point (and the `music-video-autopilot` scheduled task) starts a server-owned run that does everything the hand-driven flow asks you to set up first: it writes the creative brief, the lyrics and a mood board, makes the song (in Suno, or on this machine), and produces the video with the tools you allowed. Song-writing checkpoints are optional. Production requires revision-bound approval of the visual guide and lyric-timed storyboard. An animated proof is an optional check; it never holds the final render. Authenticated sessions may grant automatic planning approvals.
## Pipeline
@@ -16,7 +16,7 @@ brief → lyrics → style → song → analyze → produce
| `song` | The PortOS Browser drives the Suno web UI (custom mode: lyrics, style, title), only M4A is selected in Suno's Download UI and the completed audio is validated and imported directly into the music library, a Track is created, the take is recorded with `source: 'suno'`, and the project is linked to it. | Suno credits |
| `song` (local) | `songSource: 'local'` renders the song with the on-device Music Designer engines instead (see [Local song source](#local-song-source)). | free (GPU time) |
| `analyze` | The usual offline beat / tempo / section analysis. | free |
-| `produce` | **Footage** (any image/video tool picked): the existing server-owned production run (`/production-runs`) with a pool built from the picks, then the final render once it completes. **Code** (only `code:render`): a code-rendered video is authored after storyboard approval, renders a review proof, then waits for an authenticated reviewer’s proof approval before the final render. | per tool |
+| `produce` | **Footage** (any image/video tool picked): the existing server-owned production run (`/production-runs`) with a pool built from the picks, then the final render once it completes. **Code** (only `code:render`): a code-rendered video is authored after storyboard approval and goes straight to the final render. | per tool |
State lives on the project as `autonomousRun` — install-local like `productionRuns` (stripped from the peer wire, not carried into a clone). Each stage settles in one serialized project write, so a crash resumes at the stage that did not settle. After a server restart a run is shown **interrupted** and nothing advances until you resume it (no cold-bootstrap provider calls).
@@ -78,15 +78,15 @@ Imported storyboard shots may remain unbound. Bind each to an existing Board sce
Art, storyboard and proof decisions bind to exact content. Changes invalidate affected downstream approvals. Targeted comments and requests for changes retain the original reviewed draft and scene snapshot; unresolved requests block the affected stage. Accepting structure records organizational agreement only. Regeneration receives unresolved feedback; an authenticated reviewer must resolve it and approve the revised content.
-Use **Render feasibility prototype — unapproved** to test a current authored composition before committing to its art direction. This makes a local 1–45 second excerpt and never grants production approval. After art and storyboard approval, render a 10–45 second representative chorus proof, watch with audio and approve that revision. Autopilot pauses at the same boundaries; queued provider work and final renders recheck approval before dispatch.
+After art and storyboard approval you may render a 10–45 second chorus proof, watch it with audio and approve that revision; the composition preview usually makes this unnecessary. A footage production run still pauses on its pilot proof before paid bulk generation. Queued provider work and final renders recheck the storyboard approval before dispatch.
Approval and feedback resolution use an existing authenticated PortOS session: browser cookies and agent bearer sessions have the same creative-review authority, without password re-entry. Missing, invalid, expired or revoked sessions cannot approve; auth-off and peer/Basic access do not confer creative-review authority. The server records the verified session ID and label, never the credential, along with revision-bound decision history. A shared agent session identifies the credential, not an individual agent or a human. Older clients may send a password, but it is discarded rather than used as approval authority.
The review panel shows the selected visual guide and its version, the saved storyboard shots and timing (including document manifests independently of Board scenes), or the exact registered proof before the decision. Reference contact sheets are labeled separately because they may predate the current document. Missing files and failed proof playback show a recovery action and block the corresponding UI approval. **Request changes** opens feedback for that review stage.
-Proof requires an energy comparison and timecoded notes bound to its exact excerpt ID and filename. Human playback uses `watchedWithAudio: true`. An authenticated agent can submit `method: 'machine'`, `watchedWithAudio: false`, and `machineEvidence` containing substantive `visualReview`, `audioReview`, and `limitations`, alongside the same energy comparison, timecoded notes, excerpt ID and filename. The observations must come from actual motion and audio review against the saved plan; technical validation, isolated still frames or a completed render do not establish choreography quality. If the available tools cannot assess motion and audio, leave approval pending. The UI distinguishes machine review from playback. Persisted automatic waivers no longer count as approved proof; valid art and playback decisions remain valid.
+A proof approval is bound to its exact excerpt ID and filename; `energyComparison` and `timecodedNotes` are optional notes. Human playback uses `watchedWithAudio: true`. An authenticated agent can submit `method: 'machine'`, `watchedWithAudio: false`, and `machineEvidence` containing substantive `visualReview`, `audioReview`, and `limitations`, alongside the same excerpt ID and filename. The observations must come from actual motion and audio review against the saved plan; technical validation, isolated still frames or a completed render do not establish choreography quality. If the available tools cannot assess motion and audio, leave approval pending. The UI distinguishes machine review from playback. Persisted automatic waivers no longer count as approved proof; valid art and playback decisions remain valid.
-**Automatic planning approvals.** An authenticated start or `POST /api/music-video/:id/autonomous/resume` can grant `autoApprove: ['art', 'storyboard']` (any subset). The run records `brief.autoApprove`, `brief.autoApproveAuthorizedAt`, and `brief.autoApproveAuthorizedBy`; automatic decisions also record the run ID. A resume list replaces the grant; explicit `[]` revokes it and also requires authentication. Omitting the list preserves the existing policy. In **Produce**, automatic planning approval requires a clean readiness report; provisional timings or other open problems still park the run. Proof always requires a substantive review. Legacy briefs listing `proof` may wait for its render to finish (up to 90 minutes) but then park for review rather than manufacturing evidence or automatically starting the final render. Start drawer and run panel expose the planning choices without a password field, and the run panel shows existing grants so they can be revoked.
+**Automatic planning approvals.** An authenticated start or `POST /api/music-video/:id/autonomous/resume` can grant `autoApprove: ['art', 'storyboard']` (any subset). The run records `brief.autoApprove`, `brief.autoApproveAuthorizedAt`, and `brief.autoApproveAuthorizedBy`; automatic decisions also record the run ID. A resume list replaces the grant; explicit `[]` revokes it and also requires authentication. Omitting the list preserves the existing policy. In **Produce**, automatic planning approval requires a clean readiness report; provisional timings or other open problems still park the run. Proof is never auto-approved; a legacy brief listing `proof` is ignored for it, since the final render no longer waits on a proof. Start drawer and run panel expose the planning choices without a password field, and the run panel shows existing grants so they can be revoked.
External draft preparation uses the existing authenticated session without password re-entry; agents may prepare drafts. PortOS never submits a final post: review and publish on the destination platform, then record the resulting link. Existing projects and assets remain intact, but an older project's final render now requires the same production review.
diff --git a/docs/features/product-surfaces.md b/docs/features/product-surfaces.md
index 3caa4c1f7b..f3c85cfb3e 100644
--- a/docs/features/product-surfaces.md
+++ b/docs/features/product-surfaces.md
@@ -110,7 +110,7 @@ An end-to-end creative production suite for authors, worldbuilders, filmmakers,
| **SongBook** | `/songbook` | Interactive chord charts, guitar tablature, lyric repertoire, and auto-scrolling practice sheet music. | — |
| **Creative Director** | `/creative-director` | Multi-scene episodic video production orchestrator: turn briefs into treatments, storyboards, render plans, and completed episodes. | — |
| **Creative Commissions** | `/creative-commission` | Standing briefs and scheduled/nightly autonomous media generation aligning with personal taste profiles and feedback. A universe and/or mood board can be picked as the style source: each run loads its style tags and reference images as the Creative Director's art-direction base, attaches those images to vision scene evaluation, and conditions local image renders on them. | — |
-| **Music Video Studio** | `/music-video` | A project is six deep-linked steps (`/music-video/:projectId/:stage` — Song `setup`, Look `cast-sets`, Storyboard `board`, Make `produce`, Final render `review`, Publish `publish`; an old `compose` link opens Make), listed down the left with a state word and one fact each (a bottom icon bar on a phone). Each step opens with what "done" means and an always-visible checklist, and ends with its own approval (art on Look, the timed storyboard on Storyboard, the animated proof on Make). A sticky header gives one status line ("Step 3 of 6: Storyboard needs you"), the one next action, an Autopilot button, paid-generation spend against the cap and **Project settings** — a drawer holding the render style and services, advanced audio tools, the autopilot brief and runs, and every development file, the external handoff and the making-of export; a **Needs attention** banner under that status line lists any state a half-finished workflow left on the server — an open revision, an interrupted Cast & Sets stage, an auto-review waiting for its revised sections, a final render nobody is watching — with its Resume / Continue / Cancel / Reattach inline, derived from the saved record so it survives a reload; a preview player is docked beside every step — the final render, the live composition document, each finished draft excerpt and, before anything is rendered, a storyboard animatic (the song under each shot's frame or card), picked from the dock (`?play=`) — and scene cards seek it. Audio-reactive video creation, beat-detection synchronization, scene choreography, tempo alignment, and audience-driven pre-production treatments that direct each shot. Scenes are cutaways or lip-synced performance shots; a performance shot renders only on a verified source-audio provider (fal.ai MiniMax H3 lip-sync, 5–14.8s song slices placed at an exact edit in-point, cut from an optional full-length vocal stem when one is attached — uploaded, or separated from the song with a locally installed demucs) — Grok video is cutaway-only. The autopilot kickoff analyzes the song, imports the linked track's lyric sheet (its `[Verse]`/`[Chorus]` headers and stage directions kept as lyric markers that name the analysis sections and steer shot framing), separates the vocal, aligns every word with local whisper.cpp (large-v3-turbo, downloaded on first use), builds a Cast & Sets check-in (one creative-direction call that interprets the song, then a canonical character sheet, expression and looks sheets, one empty plate per set and in-set tests on the image queue, each later image conditioned on the character sheet; assembled into a self-contained sheet saved as a development artifact), stops for the director's review unless the brief auto-approves it, then plans against the approved references. Development artifacts (check-in sheets, animatics, treatments, storyboards; HTML/Markdown/MP4/PNG/JPG) are versioned per project, reviewed with notes and approve/request-changes, and viewed in a sandboxed viewer at `/music-video/:projectId/:stage/dev/:artifactId` (the stage-less `/music-video/:projectId/dev/:artifactId` still opens it). Draft excerpts are reviewed and selectively revised by hand, or by an opt-in auto-review run bounded by director-set review and paid-generation limits (a frame-only look never passes motion or audio sync). A run started from the board generates its revised sections on the server too (#10014), routed from the project's saved image and video pins, so it completes with no tab open; a section that cannot be generated unattended (a synchronous image backend, a clip lane only the board can submit) parks the run as needing the director, with the reason named. A server-owned production run (`/api/music-video/:id/production-runs`, #9066) plans an empty board, generates missing frames and clips only on a director-allowed image/video provider+model pool, hands the continuous draft to auto-review and dispatches its revisions — within explicit generation, review and (priced routes only) dollar limits, without the browser open, and never resuming on its own after a restart; the song is the sole audio unless a sound-design bed is explicitly chosen to mix under it. A footage or composed render can intercut (#9290): shots are re-cut on the song's section energy (every 2 beats in the loudest quarter, up to every 8 in the quietest) and on sung word onsets, alternating the host shot — a lip-synced take stays in sync — with unshown footage from a cutaway in the same section, so the edit gets faster without generating more clips; an autopilot production run defaults to it unless the director chose one cut per shot. Lyric lines sung two or more times are hooks: the treatment's text cues give them a word-by-word build (#9291) — each word lands on its sung onset in heavy caps, the newest in the accent color. Draft excerpts can be re-framed as vertical or square social cuts with faded audio edges, from suggested hook windows (#9280). The **Autonomous** entry point (`docs/features/music-video-autonomous.md`) starts from one prompt instead of a chosen track: it writes the brief, lyrics and a mood board, makes the song in Suno through the PortOS Browser, and runs the production — with optional approval checkpoints, and a `music-video-autopilot` scheduled task that turns unused Brain ideas into videos. The Publish stage (#9281) builds a release kit from the final render: an X-sized 1080p, a 720p preview, a hook teaser, thumbnail candidates, lyric captions (SRT) and YouTube chapters. It also drafts every platform's copy in one director-triggered provider call from their own making-of notes, and every field stays editable. Posting (#9282) fills each platform's post (YouTube, Suno, an X thread, Shorts, TikTok, Instagram Reels, Reddit, Stacker News) in a new PortOS Browser tab with the director's signed-in sessions, shows a screenshot and summary of the filled draft, and posts only when the director presses Post for that draft; the posted links are kept on the project. Reddit defaults to a native video post in r/aivideo — title and flair, no body — through the new composer's own Video button (#9307). Platforms are opt-in (#9287): a "Where you post" list turns each one on (all start off) and optionally names the account posted as — X and Reddit drafts filled while signed in as someone else are refused. Copy is drafted and posts are offered only for enabled platforms. Each post (including one recorded by hand) can be rated good, mixed or poor with notes; ratings roll up per platform across projects and are passed to later copy drafts. | — |
+| **Music Video Studio** | `/music-video` | A project is six deep-linked steps (`/music-video/:projectId/:stage` — Song `setup`, Look `cast-sets`, Storyboard `board`, Make `produce`, Final render `review`, Publish `publish`; an old `compose` link opens Make), listed down the left with a state word and one fact each (a bottom icon bar on a phone). Each step opens with what "done" means and an always-visible checklist, and ends with its own approval (art on Look, the timed storyboard on Storyboard; an animated proof on Make is optional and never holds the final render). Approvals never require typed notes. A sticky header gives one status line ("Step 3 of 6: Storyboard needs you"), the one next action, an Autopilot button, paid-generation spend against the cap and **Project settings** — a drawer holding the render style and services, advanced audio tools, the autopilot brief and runs, and every development file, the external handoff and the making-of export; a **Needs attention** banner under that status line lists any state a half-finished workflow left on the server — an open revision, an interrupted Cast & Sets stage, an auto-review waiting for its revised sections, a final render nobody is watching — with its Resume / Continue / Cancel / Reattach inline, derived from the saved record so it survives a reload; a preview player is docked beside every step — the final render, the live composition document, each finished draft excerpt and, before anything is rendered, a storyboard animatic (the song under each shot's frame or card), picked from the dock (`?play=`) — and scene cards seek it. Audio-reactive video creation, beat-detection synchronization, scene choreography, tempo alignment, and audience-driven pre-production treatments that direct each shot. Scenes are cutaways or lip-synced performance shots; a performance shot renders only on a verified source-audio provider (fal.ai MiniMax H3 lip-sync, 5–14.8s song slices placed at an exact edit in-point, cut from an optional full-length vocal stem when one is attached — uploaded, or separated from the song with a locally installed demucs) — Grok video is cutaway-only. The autopilot kickoff analyzes the song, imports the linked track's lyric sheet (its `[Verse]`/`[Chorus]` headers and stage directions kept as lyric markers that name the analysis sections and steer shot framing), separates the vocal, aligns every word with local whisper.cpp (large-v3-turbo, downloaded on first use), builds a Cast & Sets check-in (one creative-direction call that interprets the song, then a canonical character sheet, expression and looks sheets, one empty plate per set and in-set tests on the image queue, each later image conditioned on the character sheet; assembled into a self-contained sheet saved as a development artifact), stops for the director's review unless the brief auto-approves it, then plans against the approved references. Development artifacts (check-in sheets, animatics, treatments, storyboards; HTML/Markdown/MP4/PNG/JPG) are versioned per project, reviewed with notes and approve/request-changes, and viewed in a sandboxed viewer at `/music-video/:projectId/:stage/dev/:artifactId` (the stage-less `/music-video/:projectId/dev/:artifactId` still opens it). Draft excerpts are reviewed and selectively revised by hand, or by an opt-in auto-review run bounded by director-set review and paid-generation limits (a frame-only look never passes motion or audio sync). A run started from the board generates its revised sections on the server too (#10014), routed from the project's saved image and video pins, so it completes with no tab open; a section that cannot be generated unattended (a synchronous image backend, a clip lane only the board can submit) parks the run as needing the director, with the reason named. A server-owned production run (`/api/music-video/:id/production-runs`, #9066) plans an empty board, generates missing frames and clips only on a director-allowed image/video provider+model pool, hands the continuous draft to auto-review and dispatches its revisions — within explicit generation, review and (priced routes only) dollar limits, without the browser open, and never resuming on its own after a restart; the song is the sole audio unless a sound-design bed is explicitly chosen to mix under it. A footage or composed render can intercut (#9290): shots are re-cut on the song's section energy (every 2 beats in the loudest quarter, up to every 8 in the quietest) and on sung word onsets, alternating the host shot — a lip-synced take stays in sync — with unshown footage from a cutaway in the same section, so the edit gets faster without generating more clips; an autopilot production run defaults to it unless the director chose one cut per shot. Lyric lines sung two or more times are hooks: the treatment's text cues give them a word-by-word build (#9291) — each word lands on its sung onset in heavy caps, the newest in the accent color. Draft excerpts can be re-framed as vertical or square social cuts with faded audio edges, from suggested hook windows (#9280). The **Autonomous** entry point (`docs/features/music-video-autonomous.md`) starts from one prompt instead of a chosen track: it writes the brief, lyrics and a mood board, makes the song in Suno through the PortOS Browser, and runs the production — with optional approval checkpoints, and a `music-video-autopilot` scheduled task that turns unused Brain ideas into videos. The Publish stage (#9281) builds a release kit from the final render: an X-sized 1080p, a 720p preview, a hook teaser, thumbnail candidates, lyric captions (SRT) and YouTube chapters. It also drafts every platform's copy in one director-triggered provider call from their own making-of notes, and every field stays editable. Posting (#9282) fills each platform's post (YouTube, Suno, an X thread, Shorts, TikTok, Instagram Reels, Reddit, Stacker News) in a new PortOS Browser tab with the director's signed-in sessions, shows a screenshot and summary of the filled draft, and posts only when the director presses Post for that draft; the posted links are kept on the project. Reddit defaults to a native video post in r/aivideo — title and flair, no body — through the new composer's own Video button (#9307). Platforms are opt-in (#9287): a "Where you post" list turns each one on (all start off) and optionally names the account posted as — X and Reddit drafts filled while signed in as someone else are refused. Copy is drafted and posts are offered only for enabled platforms. Each post (including one recorded by hand) can be rated good, mixed or poor with notes; ratings roll up per platform across projects and are passed to later copy drafts. | — |
| **Sharing & Conflict Resolution** | `/sharing`, `/sharing/duplicates`, `/sharing/conflicts` | Collaborative asset exchange via cloud storage buckets (Google Drive, Dropbox, iCloud, Syncthing) with duplicate reconciliation and conflict recovery journals. | — |
---
diff --git a/server/lib/musicVideoSummary.js b/server/lib/musicVideoSummary.js
index 5989b109c8..5c676676ad 100644
--- a/server/lib/musicVideoSummary.js
+++ b/server/lib/musicVideoSummary.js
@@ -69,14 +69,13 @@ function currentStage(project, readiness, run) {
const mode = project.composition?.mode || 'concat';
const layered = isLayeredComposition(project);
const planned = Boolean(readiness?.storyboard?.approved);
- const proofApproved = Boolean(readiness?.proof?.approved);
const footageReady = FOOTAGE_OPTIONAL_MODES.has(mode) || scenes.every((scene) => sceneRenderReady(scene, { layered }));
const done = {
setup: Boolean(project.trackId || project.uploadedAudioFilename) && Boolean(project.audioAnalysis) && lyricsReady(project, readiness),
'cast-sets': Boolean(readiness?.art?.approved),
board: planned,
- // Make needs footage, the composition over it and the proof that closes both (#10140) — mirrors the client's deriveStages.
- produce: planned && footageReady && composeDone(project, mode) && proofApproved,
+ // Make needs footage and the composition over it; the animated proof is optional (mirrors the client's deriveStages).
+ produce: planned && footageReady && composeDone(project, mode),
// A render made before later scene edits no longer counts as the final video — mirrors the client's isFinalRenderStale.
review: Boolean(project.renderHistoryId) && project.renderDependencyState?.status !== 'stale',
publish: Object.keys(project.publishKit?.posts || {}).length > 0,
diff --git a/server/lib/musicVideoValidation.js b/server/lib/musicVideoValidation.js
index 5c3873f827..d308576f3b 100644
--- a/server/lib/musicVideoValidation.js
+++ b/server/lib/musicVideoValidation.js
@@ -1170,7 +1170,7 @@ export const musicVideoProductionDraftSchema = z.object({
}).strict()).max(2000),
}).strict();
export const musicVideoAlignmentReviewSchema = z.object({
- basis: z.string().min(1).max(128), notes: z.string().trim().min(1).max(4000),
+ basis: z.string().min(1).max(128), notes: z.string().trim().max(4000).default(''),
}).strict();
export const musicVideoDocumentShotsSchema = z.object({
documentDirectory: z.string().min(1).max(500), audioBasis: z.string().min(1).max(128),
@@ -1199,9 +1199,8 @@ export const musicVideoProductionApprovalSchema = z.object({
limitations: z.string().trim().min(1).max(4000),
}).strict().optional(),
excerptId: z.string().min(1).max(200), filename: z.string().min(1).max(200),
- energyComparison: z.string().trim().min(1).max(4000),
- timecodedNotes: z.string().trim().min(1).max(4000)
- .regex(/(?:\b\d{1,2}:\d{2}(?:\.\d+)?\b|\b\d+(?:\.\d+)?s\b)/, 'Include a playback time such as 0:04 or 4.5s.'),
+ energyComparison: z.string().trim().max(4000).optional(),
+ timecodedNotes: z.string().trim().max(4000).optional(),
}).strict().optional(),
}).strict();
export const musicVideoProductionProofSchema = z.object({
@@ -1425,7 +1424,7 @@ export const musicVideoProductionRevertSchema = z.object({
stage: z.enum(['art', 'storyboard', 'proof', 'castAndSets']), field: z.string().trim().min(1).max(100),
}).strict();
export const musicVideoProductionFeedbackResolutionSchema = z.object({
- feedbackId: z.string().min(1).max(128), resolution: z.string().trim().min(1).max(8000), password: z.string().max(1024).optional(),
+ feedbackId: z.string().min(1).max(128), resolution: z.string().trim().max(8000).default(''), password: z.string().max(1024).optional(),
}).strict();
// GET /api/music-video query (#10169). Passthrough strings, like the other list
diff --git a/server/routes/musicVideoProductionReview.browser.test.js b/server/routes/musicVideoProductionReview.browser.test.js
index 930f124233..75aeb8f658 100644
--- a/server/routes/musicVideoProductionReview.browser.test.js
+++ b/server/routes/musicVideoProductionReview.browser.test.js
@@ -118,8 +118,8 @@ describe.skipIf(!canRun)('production review in a real browser (Chrome, ffmpeg an
await page.getByRole('button', { name: 'Save revision feedback' }).click();
await page.getByText('Move the operator behind the threshold at the exit.', { exact: true }).waitFor();
expect(await page.getByRole('button', { name: 'Approve lyric-timed storyboard' }).isDisabled()).toBe(true);
- await page.getByLabel('Resolution for shot: chorus / operator').fill('Reviewed the updated staging in the storyboard.');
- await page.getByRole('button', { name: 'Resolve feedback after review' }).click();
+ await page.getByLabel('How it was resolved (optional)').fill('Reviewed the updated staging in the storyboard.');
+ await page.getByRole('button', { name: 'Mark resolved' }).click();
await page.getByText('Resolution: Reviewed the updated staging in the storyboard.', { exact: true }).waitFor();
const beforeBoard = await page.evaluate(async id => (await fetch('/api/music-video/' + id + '/production-review')).json(), p.id);
expect(beforeBoard.readiness.storyboard.problems).toEqual([]);
@@ -130,15 +130,15 @@ describe.skipIf(!canRun)('production review in a real browser (Chrome, ffmpeg an
await page.locator('video').waitFor({ timeout: 120000 });
await page.locator('video').evaluate(async video => { await video.play(); await new Promise(r => setTimeout(r, 400)); video.pause(); });
expect(await page.locator('video').evaluate(v => v.videoWidth)).toBeGreaterThan(0);
- await page.getByLabel('Playback energy compared with the saved plan').fill('The synthetic fixture demonstrates a driving chorus: the modeled subject changes pose and travels while the camera moves through the scene.');
- await page.getByLabel('Timecoded playback notes').fill('0:02 — subject enters the frame; 0:07 — pose and camera position differ and readable type remains clear. This is a synthetic workflow test, not artistic approval of a production video.');
expect(await page.getByRole('checkbox', { name: /I watched this revision/ }).count()).toBe(0);
await page.getByRole('button', { name: 'Approve proof — watched with sound' }).click();
await page.getByRole('heading', { name: 'Animated proof approved', exact: true }).waitFor();
const result = await store.getProject(p.id);
expect(Object.keys(result.productionReview.approvals).sort()).toEqual(['art', 'proof', 'storyboard']);
expect(result.productionReview.feedback[0].resolvedAt).toBeTruthy();
- expect(result.productionReview.approvals.proof.proofReview).toMatchObject({ watchedWithAudio: true, excerptId: result.productionReview.proof.excerptId, timecodedNotes: expect.stringContaining('0:02') });
+ expect(result.productionReview.approvals.proof.proofReview).toMatchObject({ watchedWithAudio: true, excerptId: result.productionReview.proof.excerptId });
+ // Approved straight after playback: no notes were typed or required.
+ expect(result.productionReview.approvals.proof.proofReview.timecodedNotes).toBeUndefined();
expect(errors).toEqual([]);
const proofFile = join(PATHS.videos, result.excerpts.find(e => e.id === result.productionReview.proof.excerptId).filename);
const frame = at => execFileSync(ffmpeg, ['-v', 'error', '-ss', String(at), '-i', proofFile, '-frames:v', '1', '-vf', 'scale=64:36', '-f', 'rawvideo', '-pix_fmt', 'rgb24', '-']);
diff --git a/server/routes/musicVideoProductionReview.test.js b/server/routes/musicVideoProductionReview.test.js
index 0e4e04c296..016e47f228 100644
--- a/server/routes/musicVideoProductionReview.test.js
+++ b/server/routes/musicVideoProductionReview.test.js
@@ -151,7 +151,8 @@ describe('human-reviewed Music Video workflow', () => {
const evidence = { watchedWithAudio: true, excerptId: 'older-proof', filename: 'synthetic-proof.mp4',
energyComparison: 'Matches the chosen playful target.', timecodedNotes: '0:04 the subject reaches the doorway.' };
expect((await approve('proof', { proofReview: evidence })).body.code).toBe('MUSIC_VIDEO_REVIEW_STALE');
- expect((await approve('proof', { proofReview: { ...evidence, timecodedNotes: 'Looks good' } })).status).toBe(400);
+ // Notes are optional: a review without them clears validation and fails only on the stale excerpt.
+ expect((await approve('proof', { proofReview: { ...evidence, energyComparison: undefined, timecodedNotes: undefined } })).body.code).toBe('MUSIC_VIDEO_REVIEW_STALE');
expect((await approve('proof')).status).toBe(200);
const accepted = await store.getProject(project.id);
expect(accepted.productionReview.approvals.proof.proofReview).toMatchObject({
@@ -214,7 +215,6 @@ describe('human-reviewed Music Video workflow', () => {
expect((await request(app).post(`${base}/production-review/alignment`).set('authorization', 'Bearer expired')
.send({ basis: saved.body.readiness.alignment.basis, notes: draft.timingNotes })).status).toBe(401);
expect((await reverify(prior.body.readiness.alignment.basis)).body.code).toBe('MUSIC_VIDEO_REVIEW_STALE');
- expect((await reverify(undefined, ' ')).status).toBe(400);
expect((await read()).body.readiness.alignment.status).toBe('stale');
const reviewed = await reverify();
expect(reviewed.status).toBe(200);
@@ -261,7 +261,8 @@ describe('human-reviewed Music Video workflow', () => {
const evidence = { watchedWithAudio: true, excerptId: 'older-proof', filename: 'synthetic-proof.mp4',
energyComparison: 'Matches the chosen playful target.', timecodedNotes: '0:04 the subject reaches the doorway.' };
expect((await approve('proof', { proofReview: evidence })).body.code).toBe('MUSIC_VIDEO_REVIEW_STALE');
- expect((await approve('proof', { proofReview: { ...evidence, timecodedNotes: 'Looks good' } })).status).toBe(400);
+ // Notes are optional: a review without them clears validation and fails only on the stale excerpt.
+ expect((await approve('proof', { proofReview: { ...evidence, energyComparison: undefined, timecodedNotes: undefined } })).body.code).toBe('MUSIC_VIDEO_REVIEW_STALE');
expect((await approve('proof')).status).toBe(200);
const accepted = await store.getProject(project.id);
const acceptedStatus = (await read()).body.readiness;
diff --git a/server/routes/musicVideoRichAuthoring.browser.test.js b/server/routes/musicVideoRichAuthoring.browser.test.js
index 6c5975cfc9..5405de19b2 100644
--- a/server/routes/musicVideoRichAuthoring.browser.test.js
+++ b/server/routes/musicVideoRichAuthoring.browser.test.js
@@ -161,8 +161,8 @@ describe.skipIf(!canRun)('rich document authoring in a real browser (Chrome, ffm
await page.getByRole('button', { name: 'Save revision feedback' }).click();
await page.getByText('Move the operator behind the threshold at the exit.', { exact: true }).waitFor();
expect(await page.getByRole('button', { name: 'Approve lyric-timed storyboard' }).isDisabled()).toBe(true);
- await page.getByLabel('Resolution for shot: chorus / operator').fill('Reviewed the updated staging in the storyboard.');
- await page.getByRole('button', { name: 'Resolve feedback after review' }).click();
+ await page.getByLabel('How it was resolved (optional)').fill('Reviewed the updated staging in the storyboard.');
+ await page.getByRole('button', { name: 'Mark resolved' }).click();
await page.getByText('Resolution: Reviewed the updated staging in the storyboard.', { exact: true }).waitFor();
const beforeBoard = await page.evaluate(async id => (await fetch('/api/music-video/' + id + '/production-review')).json(), p.id);
expect(beforeBoard.readiness.storyboard.problems).toEqual([]);
@@ -205,9 +205,9 @@ describe.skipIf(!canRun)('rich document authoring in a real browser (Chrome, ffm
await page.locator('video').evaluate(async video => { await video.play(); await new Promise(r => setTimeout(r, 400)); video.pause(); });
expect(await page.locator('video').evaluate(v => v.videoWidth)).toBeGreaterThan(0);
expect(await page.locator('[aria-label="Saved choreography for proof comparison"]').textContent()).toContain(choreography);
- expect(await page.getByRole('button', { name: 'Approve proof — watched with sound' }).isDisabled()).toBe(true);
- await page.getByLabel('Playback energy compared with the saved plan').fill('The synthetic fixture demonstrates a driving chorus: the modeled subject changes pose and travels while the camera moves through the scene.');
- await page.getByLabel('Timecoded playback notes').fill('0:02 — subject enters the frame; 0:07 — pose and camera position differ and readable type remains clear. This is a synthetic workflow test, not artistic approval of a production video.');
+ // Played with sound, the proof can be approved at once; the note below is optional.
+ expect(await page.getByRole('button', { name: 'Approve proof — watched with sound' }).isDisabled()).toBe(false);
+ await page.getByLabel('Notes (optional)').fill('0:02 — subject enters the frame; 0:07 — pose and camera position differ and readable type remains clear. This is a synthetic workflow test, not artistic approval of a production video.');
expect(await page.getByRole('checkbox', { name: /I watched this revision/ }).count()).toBe(0);
await page.getByRole('button', { name: 'Approve proof — watched with sound' }).click();
await page.getByRole('heading', { name: 'Animated proof approved', exact: true }).waitFor();
diff --git a/server/services/musicVideo/autonomousService.js b/server/services/musicVideo/autonomousService.js
index d2cf254f3e..cd51de6435 100644
--- a/server/services/musicVideo/autonomousService.js
+++ b/server/services/musicVideo/autonomousService.js
@@ -1,6 +1,6 @@
import { musicVideoMediaMode, musicVideoAllowsMedia } from '../../lib/musicVideoMediaPolicy.js';
-import { prepareProductionReview, renderProductionProof } from './productionReviewService.js';
-import { assertProductionApproval, productionReadiness, productionProofNeedsRender, productionProofWindow } from './productionReview.js';
+import { prepareProductionReview } from './productionReviewService.js';
+import { assertProductionApproval, productionReadiness } from './productionReview.js';
/**
* Fully-autonomous Music Video — the run orchestrator.
@@ -161,8 +161,6 @@ const stagePatch = (run, stage, patch) => ({ stages: { [stage]: { ...run.stages[
// ---- production review auto-approval (brief.autoApprove) --------------------------
const RENDER_STEP = 'rendering';
-const PROOF_POLL_MS = 5_000;
-const PROOF_WAIT_MAX_MS = 90 * 60_000;
const autoApproves = (run, stage) => normalizeAutoApprove(run.brief.autoApprove).includes(stage);
/**
@@ -189,30 +187,6 @@ async function autoApproveStage(project, run, stage) {
return getProject(project.id);
}
-/**
- * Wait for the current proof excerpt to finish rendering (polls the record; the
- * excerpt job runs on its own). Stops when the run is stopped or canceled; a
- * failed render or a render past the cap fails the stage.
- */
-async function awaitProofExcerpt(projectId, run) {
- const polls = Math.ceil(PROOF_WAIT_MAX_MS / PROOF_POLL_MS);
- for (let i = 0; ; i++) {
- const project = await getProject(projectId);
- const latest = projectAutonomousRun(project);
- if (latest?.id !== run.id || latest.status !== 'running' || latest.processId !== PROCESS_ID) {
- throw runError(409, 'NOT_RUNNING', 'The run was stopped while its proof rendered');
- }
- const excerptId = project.productionReview?.proof?.excerptId;
- const excerpt = excerptId ? (project.excerpts || []).find((e) => e.id === excerptId) : null;
- if (excerpt?.status === 'complete') return project;
- if (excerpt && excerpt.status !== 'rendering') {
- throw runError(500, 'PROOF_RENDER_FAILED', `The proof render failed: ${trimTo(excerpt.error || excerpt.status, 400)}`);
- }
- if (i >= polls) throw runError(504, 'PROOF_RENDER_TIMEOUT', 'The proof render did not finish within 90 minutes');
- await deps.wait(PROOF_POLL_MS);
- }
-}
-
// ---- stage executors -------------------------------------------------------------
// Each returns `{ output }` (merged into run.output) or `{ output, wait: true }`
// when the stage's completion arrives later (production).
@@ -429,15 +403,8 @@ const STAGES = {
: await deps.generateDocument(project.id, input);
await deps.acceptDocument(project.id, candidate.document.directory);
}
- project = await getProject(project.id);
- const readiness = productionReadiness(project);
- if (productionProofNeedsRender(project, readiness.basis.proof)) {
- await renderProductionProof(project.id, productionProofWindow(project));
- }
- // Older briefs may grant proof approval. Honor the render wait, but never
- // manufacture review evidence: a reviewer must approve the finished excerpt.
- if (autoApproves(run, 'proof')) await awaitProofExcerpt(project.id, run);
- assertProductionApproval(await getProject(project.id));
+ // The animated proof is optional review evidence, so the run renders the film once the
+ // storyboard is approved; the director can still render and approve a proof by hand.
const render = await deps.renderVideo(project.id);
// The run is not finished until the MP4 exists: stay on produce and let the render's own event settle it.
return { output: { renderJobId: render?.jobId || null }, wait: true, step: RENDER_STEP };
diff --git a/server/services/musicVideo/autonomousService.test.js b/server/services/musicVideo/autonomousService.test.js
index 4e49a293ac..bad2042c33 100644
--- a/server/services/musicVideo/autonomousService.test.js
+++ b/server/services/musicVideo/autonomousService.test.js
@@ -761,11 +761,10 @@ describe('events and process pinning', () => {
});
});
-it('parks standalone code at real human gates and replaces a stale proof before final rendering', async () => {
+it('parks standalone code at the art and storyboard gates, then renders the final without an animated proof', async () => {
creativeReview.real = true;
const { approveProductionStage, productionReviewBasis } = await vi.importActual('./productionReview.js');
const { renderProductionProof } = await import('./productionReviewService.js');
- let proofNumber = 0;
doubles.analyzeSong.mockImplementation(async () => {
Object.assign(store.get('mv-auto'), {
audioAnalysis: { durationSec: 20, sections: [{ id: 'chorus', label: 'Chorus', startSec: 18, endSec: 20 }] },
@@ -773,63 +772,32 @@ it('parks standalone code at real human gates and replaces a stale proof before
devArtifacts: [{ id: 'guide', version: 1, file: 'guide.html', mimeType: 'text/html' }],
productionReview: { draft: {
cast: 'Paper dancer', environments: 'Theatre', visualLanguage: 'Ink silhouettes', motionLanguage: 'Slow orbit',
- guideArtifactId: 'guide', lyricsMode: 'instrumental', timingNotes: 'Synthetic instrumental master checked.',
+ guideArtifactId: 'guide', lyricsMode: 'instrumental', timingNotes: '',
storyboard: [{ sceneId: 'shot', lyricCueIds: [], action: 'Dancer unfolds', staging: 'Wide theatre', camera: 'Orbit', transition: 'Fade' }],
} },
});
});
doubles.generateDocument.mockResolvedValue({ document: { directory: 'music-video/mv-auto/composition/example' } });
- renderProductionProof.mockImplementation(async (_id, window) => {
- const project = store.get('mv-auto');
- const id = `proof-${++proofNumber}`;
- project.excerpts = [{ id, status: 'complete', filename: `${id}.mp4` }];
- project.productionReview.proof = { ...window, excerptId: id };
- project.productionReview.proof.basis = productionReviewBasis(project).proof;
- return { jobId: id };
- });
const approve = stage => {
const project = store.get('mv-auto');
- const excerpt = project.excerpts?.find(e => e.id === project.productionReview?.proof?.excerptId);
- store.set(project.id, approveProductionStage(project, { stage, basis: productionReviewBasis(project)[stage],
- proofReview: stage === 'proof' ? { watchedWithAudio: true, excerptId: excerpt.id, filename: excerpt.filename,
- energyComparison: 'Human fixture reviewed the intended energy.', timecodedNotes: '0:04 the chorus action lands.' } : undefined }));
+ store.set(project.id, approveProductionStage(project, { stage, basis: productionReviewBasis(project)[stage] }));
};
await service.startAutonomousVideo({ prompt: 'Synthetic animation', tools: ['code:render'], authoring: { providerId: 'example', model: 'example-code' } });
await settled('needs-human');
expect(doubles.generateDocument).not.toHaveBeenCalled();
expect(doubles.renderVideo).not.toHaveBeenCalled();
approve('art');
- approve('storyboard');
await service.resumeAutonomousVideo('mv-auto');
await settled('needs-human');
- expect(doubles.generateDocument).toHaveBeenCalledOnce();
- expect(renderProductionProof).toHaveBeenCalledOnce();
- expect(renderProductionProof).toHaveBeenLastCalledWith('mv-auto', { startSec: 0, endSec: 20 });
expect(doubles.renderVideo).not.toHaveBeenCalled();
- store.get('mv-auto').excerpts[0].status = 'rendering';
- await service.resumeAutonomousVideo('mv-auto');
- await settled('needs-human');
- expect(renderProductionProof).toHaveBeenCalledOnce();
- for (const status of ['error', 'canceled']) {
- store.get('mv-auto').excerpts[0].status = status;
- store.get('mv-auto').excerpts[0].filename = null;
- const callsBefore = renderProductionProof.mock.calls.length;
- await service.resumeAutonomousVideo('mv-auto');
- await settled('needs-human');
- expect(renderProductionProof).toHaveBeenCalledTimes(callsBefore + 1);
- expect(doubles.renderVideo).not.toHaveBeenCalled();
- }
- approve('proof');
- store.get('mv-auto').composition.document.directory = 'music-video/mv-auto/composition/revised';
- await service.resumeAutonomousVideo('mv-auto');
- await settled('needs-human');
- expect(renderProductionProof).toHaveBeenCalledTimes(4);
- expect(doubles.renderVideo).not.toHaveBeenCalled();
- approve('proof');
+ // An instrumental needs no typed reason; approving the storyboard is enough.
+ approve('storyboard');
await service.resumeAutonomousVideo('mv-auto');
await vi.waitFor(() => expect(runOf()?.output.renderJobId).toBe('render-1'));
await service.__testing.onRenderEvent({ projectId: 'mv-auto', jobId: 'render-1', status: 'completed' });
await settled('completed');
+ expect(renderProductionProof).not.toHaveBeenCalled();
+ expect(store.get('mv-auto').productionReview.approvals.proof).toBeUndefined();
expect(doubles.renderVideo).toHaveBeenCalledOnce();
expect(doubles.generateDocument).toHaveBeenCalledOnce();
expect(doubles.startProduction).not.toHaveBeenCalled();
@@ -886,49 +854,24 @@ describe('auto-approve the rest (brief.autoApprove)', () => {
});
it('never approves past a readiness problem: the run parks for a human at that stage', async () => {
- reviewFixture({ timingNotes: '' });
+ // A vocal song with no lyrics imported is a real readiness problem.
+ reviewFixture({ lyricsMode: 'vocal' });
await service.startAutonomousVideo({ prompt: 'p', tools: ['image:local'], autoApprove: ['art', 'storyboard'] }, { autoApproveAuthorized: true });
await settled('needs-human');
- expect(runOf()).toMatchObject({ errorCode: 'MUSIC_VIDEO_APPROVAL_REQUIRED', error: 'Explain and confirm the instrumental exception.' });
+ expect(runOf()).toMatchObject({ errorCode: 'MUSIC_VIDEO_APPROVAL_REQUIRED', error: expect.stringContaining('Import lyrics') });
expect(approvals().art).toMatchObject({ approvedBy: 'autopilot' });
expect(approvals().storyboard).toBeUndefined();
expect(doubles.startProduction).not.toHaveBeenCalled();
});
- const proofRenders = async (outcome) => {
- const { renderProductionProof } = await import('./productionReviewService.js');
- renderProductionProof.mockImplementation(async (_id, window) => {
- const project = store.get('mv-auto');
- project.excerpts = [{ id: 'proof-1', status: 'rendering', filename: null }];
- project.productionReview.proof = { ...window, excerptId: 'proof-1' };
- project.productionReview.proof.basis = actual.productionReviewBasis(project).proof;
- return { jobId: 'proof-1' };
- });
- // The excerpt job settles while the run waits between polls.
- doubles.wait.mockImplementation(async () => { Object.assign(store.get('mv-auto').excerpts[0], outcome); });
- return renderProductionProof;
- };
-
- it('waits for the proof render then parks for substantive review even with a legacy proof grant', async () => {
+ it('ignores a legacy proof grant: code renders the final without rendering or approving a proof', async () => {
reviewFixture();
- await proofRenders({ status: 'complete', filename: 'proof-1.mp4' });
- await service.startAutonomousVideo({ prompt: 'p', tools: ['code:render'], authoring: { providerId: 'example', model: 'example-code' },
- autoApprove: ['art', 'storyboard', 'proof'] }, { autoApproveAuthorized: true });
- await settled('needs-human');
- expect(doubles.wait).toHaveBeenCalledWith(5000);
- expect(approvals().proof).toBeUndefined();
- expect(actual.productionReadiness(store.get('mv-auto')).readyForProduction).toBe(false);
- expect(doubles.renderVideo).not.toHaveBeenCalled();
- });
-
- it('fails the run with the excerpt error when the proof render fails', async () => {
- reviewFixture();
- await proofRenders({ status: 'error', error: 'Synthetic encoder failure' });
+ const { renderProductionProof } = await import('./productionReviewService.js');
await service.startAutonomousVideo({ prompt: 'p', tools: ['code:render'], authoring: { providerId: 'example', model: 'example-code' },
autoApprove: ['art', 'storyboard', 'proof'] }, { autoApproveAuthorized: true });
- await settled('failed');
- expect(runOf()).toMatchObject({ errorCode: 'PROOF_RENDER_FAILED', error: 'The proof render failed: Synthetic encoder failure' });
+ await vi.waitFor(() => expect(doubles.renderVideo).toHaveBeenCalledOnce());
+ expect(renderProductionProof).not.toHaveBeenCalled();
expect(approvals().proof).toBeUndefined();
- expect(doubles.renderVideo).not.toHaveBeenCalled();
+ expect(actual.productionReadiness(store.get('mv-auto')).readyForProduction).toBe(true);
});
});
diff --git a/server/services/musicVideo/productionReview.js b/server/services/musicVideo/productionReview.js
index 9ed54866d6..98a61f7457 100644
--- a/server/services/musicVideo/productionReview.js
+++ b/server/services/musicVideo/productionReview.js
@@ -27,9 +27,9 @@ export const documentStoryboardBasis = project => hash({
// Share the evidence contract between new decisions and persisted approvals:
// a legacy automatic waiver must not become production-ready after an upgrade.
+// Playback notes are optional: approving is the director's call, not a form to fill in.
function hasProofEvidence(review) {
- if (!review || review.autoApproved || !text(review.energyComparison) || !text(review.timecodedNotes)
- || !/(?:\b\d{1,2}:\d{2}(?:\.\d+)?\b|\b\d+(?:\.\d+)?s\b)/.test(review.timecodedNotes)) return false;
+ if (!review || review.autoApproved) return false;
if (review.method === 'machine') {
const evidence = review.machineEvidence;
return review.watchedWithAudio === false && text(evidence?.visualReview) && evidence.visualReview.trim().length >= 40
@@ -227,11 +227,9 @@ export function productionReadiness(project) {
const cues = (project.lyricCues || []).filter(c => text(c.text));
if (draft.lyricsMode === 'instrumental') {
if (cues.length) boardProblems.push('This song has lyrics. Remove the instrumental exception or correct the song data.');
- if (!text(draft.timingNotes)) boardProblems.push('Explain and confirm the instrumental exception.');
} else {
if (!cues.length) boardProblems.push('Import lyrics and align them to the current vocal; missing lyrics are not an instrumental.');
if (draft.timingStatus !== 'verified' || review.alignmentBasis !== alignmentBasis) boardProblems.push('Lyric alignment is provisional or changed. Listen and verify the current word timings.');
- if (!text(draft.timingNotes)) boardProblems.push('Record how the vocal timings were checked.');
if (cues.some(c => !(Number.isFinite(c.startSec) && c.endSec > c.startSec && c.endSec <= duration)
|| !c.words?.length || c.words.some(w => !(Number.isFinite(w.startSec) && w.endSec > w.startSec)
|| w.startSec < c.startSec || w.endSec > c.endSec))) {
@@ -281,7 +279,8 @@ export function productionReadiness(project) {
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) },
castAndSets: castAndSetsApproval(project),
- readyForProduction: proofApproved };
+ // The animated proof is optional review evidence: the approved storyboard is what the final render needs.
+ readyForProduction: storyboardApproved };
}
const refuseRevert = (message, code) => new ServerError(message, { status: 409, code });
diff --git a/server/services/musicVideo/productionService.js b/server/services/musicVideo/productionService.js
index 079a69254d..33d18d9fba 100644
--- a/server/services/musicVideo/productionService.js
+++ b/server/services/musicVideo/productionService.js
@@ -1,5 +1,5 @@
-import { prepareProductionReview, renderProductionProof, attachProductionPilotProof } from './productionReviewService.js';
-import { productionReadiness, productionProofNeedsRender, productionProofWindow } from './productionReview.js';
+import { prepareProductionReview, attachProductionPilotProof } from './productionReviewService.js';
+import { productionReadiness, productionProofNeedsRender } from './productionReview.js';
import { currentPlateEvidence, plateRequirementBasis, selectedPlatePasses } from '../../lib/musicVideoPlateEvidence.js';
import { ensureSceneTakes, selectSceneTake } from './takes.js';
/**
@@ -431,13 +431,6 @@ async function takeSteps(projectId, runId) {
}
return halt(projectId, runId, { status: 'blocked', reason: 'Watch and approve the rendered pilot in Production review before bulk generation.' });
}
- if (step.type === 'review' && !readiness.proof.approved) {
- if (productionProofNeedsRender(project, readiness.basis.proof)) {
- await renderProductionProof(projectId, productionProofWindow(project));
- }
- return halt(projectId, runId, { status: 'blocked', reason: 'Watch and approve the animated proof in Production review before the full film.' });
- }
-
if (step.type === 'idle' || step.type === 'wait') return { project, run, action: step };
if (step.type === 'plan-pilots') {
diff --git a/server/services/musicVideo/productionService.test.js b/server/services/musicVideo/productionService.test.js
index f44a574210..59655a05ce 100644
--- a/server/services/musicVideo/productionService.test.js
+++ b/server/services/musicVideo/productionService.test.js
@@ -1270,7 +1270,7 @@ it('blocks unreviewed production, resumes an approved board, and refuses a revoc
expect(theRun().steps[0]).toMatchObject({ status: 'refused', errorCode: 'MUSIC_VIDEO_APPROVAL_REQUIRED' });
});
-it('retries canceled proof evidence on Resume and keeps a late chorus window inside the master', async () => {
+it('moves past the optional animated proof to review without rendering or waiting on one', async () => {
creativeReview.real = true;
const { approveProductionStage, productionReviewBasis } = await vi.importActual('./productionReview.js');
const { renderProductionProof } = await import('./productionReviewService.js');
@@ -1298,17 +1298,7 @@ it('retries canceled proof evidence on Resume and keeps a late chorus window ins
store.set(project.id, approveProductionStage(project, { stage, basis: productionReviewBasis(project)[stage] }));
}
await start();
- expect(theRun().status).toBe('blocked');
- expect(renderProductionProof).toHaveBeenCalledOnce();
- expect(renderProductionProof).toHaveBeenLastCalledWith('mv-example', { startSec: 80, endSec: 100 });
- await service.resumeProduction('mv-example', theRun().id);
- await settle();
- expect(renderProductionProof).toHaveBeenCalledOnce();
- store.get('mv-example').excerpts[0].status = 'canceled';
- await service.resumeProduction('mv-example', theRun().id);
- await settle();
- expect(renderProductionProof).toHaveBeenCalledTimes(2);
- expect(dispatch).not.toHaveBeenCalled();
- expect(startAutoReview).not.toHaveBeenCalled();
- expect(theRun().status).toBe('blocked');
+ expect(renderProductionProof).not.toHaveBeenCalled();
+ expect(JSON.stringify(theRun())).not.toMatch(/animated proof/);
+ expect(startAutoReview).toHaveBeenCalled();
});
diff --git a/server/services/musicVideo/render.js b/server/services/musicVideo/render.js
index d8646b190b..2df6b79ceb 100644
--- a/server/services/musicVideo/render.js
+++ b/server/services/musicVideo/render.js
@@ -801,7 +801,8 @@ async function renderSeekedMode(projectId, project, handOff, renderer, options =
async function assertCurrentRenderApproval(projectId, preparedProject, options) {
const current = await getProject(projectId);
- assertProductionApproval(current);
+ // The final render needs the approved storyboard; the animated proof is optional.
+ assertProductionApproval(current, 'storyboard');
if (productionReviewBasis(current).proof !== productionReviewBasis(preparedProject).proof) {
throw new ServerError('The reviewed film changed during render preparation.', { status: 409, code: 'MUSIC_VIDEO_REVIEW_STALE' });
}
@@ -817,9 +818,9 @@ export async function renderMusicVideo(projectId, options = {}) {
async function renderAdmittedMusicVideo(projectId, options, permit) {
const project = await getProject(projectId);
if (!project) throw new ServerError('Project not found', { status: 404, code: 'NOT_FOUND' });
- assertProductionApproval(project);
+ assertProductionApproval(project, 'storyboard');
if (typeof options?.codeDirectory === 'string' && options.codeDirectory) {
- throw new ServerError('Import and select the composition document, then approve its animated proof before rendering.', { status: 409, code: 'MUSIC_VIDEO_UNREVIEWED_DIRECTORY' });
+ throw new ServerError('Import and select the composition document before rendering.', { status: 409, code: 'MUSIC_VIDEO_UNREVIEWED_DIRECTORY' });
}
const existingJob = projectRenders.get(projectId);
if (existingJob && (existingJob === PENDING || jobs.has(existingJob))) {