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
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(music-video): accept rendered frames and animatics as review evidence in code-only projects
Claude741ea2b288a0
diff --git a/server/routes/musicVideoDevArtifacts.test.js b/server/routes/musicVideoDevArtifacts.test.jsindex 97a982ce0b..3f4e3fb30b 100644--- a/server/routes/musicVideoDevArtifacts.test.js+++ b/server/routes/musicVideoDevArtifacts.test.js@@ -117,6 +117,20 @@ describe('music-video development artifacts', () => {expect(served.headers['content-security-policy']).toMatch(/^sandbox;/);});+ it('keeps planning images out of a code-only project but accepts rendered frames as storyboard evidence', async () => {+ const codeOnly = await projects.createProject({ name: 'Code Only', mediaMode: 'code-only' });+ const png = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==', 'base64');+ const guide = await upload(codeOnly.id, { name: 'sheet.png', body: png, type: 'image/png', fields: { kind: 'cast-sets', title: 'Painted sheet' } });+ expect(guide.status).toBe(422);+ expect(guide.body.code).toBe('MUSIC_VIDEO_MEDIA_POLICY');+ const frames = await upload(codeOnly.id, { name: 'frames.png', body: png, type: 'image/png', fields: { kind: 'storyboard', title: 'Rendered frames' } });+ expect(frames.status).toBe(201);+ expect(frames.body.artifact.mimeType).toBe('image/png');+ // the HTML guide path is unchanged+ const html = await upload(codeOnly.id, { fields: { kind: 'cast-sets', title: 'Code-authored sheet' } });+ expect(html.status).toBe(201);+ });+it('refuses an unsupported file type and a new artifact without a kind, storing nothing', async () => {const exe = await upload(project.id, { name: 'tool.exe', body: 'MZ', type: 'application/octet-stream', fields: { kind: 'other', title: 'x' } });expect(exe.status).toBe(400);diff --git a/server/services/musicVideo/devArtifactService.js b/server/services/musicVideo/devArtifactService.jsindex db95dfbb1e..cbf7fcc005 100644--- a/server/services/musicVideo/devArtifactService.js+++ b/server/services/musicVideo/devArtifactService.js@@ -38,6 +38,9 @@ async function requireProject(id) {return project;}+/** Artifact kinds that show rendered output rather than planning imagery. */+export const DEV_ARTIFACT_EVIDENCE_KINDS = new Set(['storyboard', 'animatic']);+function publish(projectId, project, artifact) {musicVideoEvents.emit('dev-artifact', { projectId, artifactId: artifact?.id || null, project });}@@ -62,7 +65,13 @@ async function storeVersion(projectId, {const mimeType = devArtifactTypeFor(ext);if (!mimeType) throw new ServerError('Unsupported file type — accepted: HTML, Markdown, MP4, PNG, JPG', { status: 400, code: 'VALIDATION_ERROR' });const project = await requireProject(projectId);- await assertDocumentMediaPolicy(project, [{ rel: `guide.${ext}`, data: buffer, abs: tempPath }]);+ // Code-only projects refuse images and clips as *document* assets, and the art guide must be+ // code-authored (productionReview.js checks the selected guide's type). Storyboards and+ // animatics are review evidence — frames and clips rendered FROM the code — so they are+ // exempt here; a planning guide (cast-sets, treatment, other) is still held to the policy.+ if (!DEV_ARTIFACT_EVIDENCE_KINDS.has(kind)) {+ await assertDocumentMediaPolicy(project, [{ rel: `guide.${ext}`, data: buffer, abs: tempPath }]);+ }if (artifactId) findDevArtifact(project, artifactId);const id = artifactId || newDevArtifactId();const version = nextDevArtifactVersion(project, artifactId);