revert(pipeline): back out picture-lock trimming from the preview build
Deploy / deploy (push) Successful in 6m19s

Production fallout after enabling it: the trimmed EXR footage started
after the head handle as intended, but the overlay's burn-in timecode
(hardcoded to start at frame 1001) did not shift with it, so the
delivered burn-in no longer matched the footage. The picture-lock
reference render also never worked correctly in practice. Reverts the
AE panel checkbox, the preview-build script's trim/reference logic, and
the server/worker plumbing around it back to their pre-feature state
(82dfaee) — untrimmed previews, no picture-lock reference, overlay
timecode correct again.

The noPictureLock/piclockRefKey schema columns and their migration are
deliberately left in place: they're already applied in production, and
dropping an applied migration's file risks the next `prisma migrate
deploy`. They sit unused and harmless until this is revisited.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
twotalesanimation
2026-08-23 21:44:45 +02:00
parent 67d8639861
commit a18dfc6203
12 changed files with 21 additions and 341 deletions
+1 -10
View File
@@ -26,11 +26,7 @@ export const PIPELINE_CONFIG_DEFAULTS = {
"validation.sampleEvery": 25,
/** Per-check severity overrides, e.g. {"exr_type":"warn"} (§17.3). */
"validation.overrides": "{}",
/**
* Frames of head/tail handle the studio pads every render with. Used for the
* API timecode fallback (§8.1a) and, symmetrically, to trim the preview
* build's client-facing comp back to the picture-lock edit (§9).
*/
/** Frames of head handle the plates carry; only used for the API timecode fallback (§8.1a). */
"validation.handleFrames": 8,
/**
* Studio-wide delivery defaults (§11.2). A project's own `deliveryConfig`
@@ -47,11 +43,6 @@ export const PIPELINE_CONFIG_DEFAULTS = {
"preview.lutComp": "_SHOW LUT",
"preview.movTemplate": "4444 Tri",
"preview.mp4Template": "REVIEW_PREVIEW",
// Bare footage root the preview build reads picture-lock plates from, at
// `{footageRoot}/{showId}/_PICLOCKS` — same convention as the panel's own
// "Footage Root" setting (VFXReviewConnector.md). Per-project override via
// pipelineConfig.footageRoot for a show on different storage.
"preview.footageRoot": "V:/_FOOTAGE",
// Essential Property names on the NETFLIX_SLATE layer for the per-submission
// fields. If a name is wrong the build logs the template's actual property
// names as a warning, so it is a config fix rather than a code change.
+1 -8
View File
@@ -70,11 +70,6 @@ export interface CreateExportInput {
* frames would produce the wrong MOV.
*/
skipPreview?: boolean;
/**
* Skip picture-lock trimming and the picture-lock reference render for this
* export — set when picture lock is missing or wrong for the shot.
*/
noPictureLock?: boolean;
}
/**
@@ -210,7 +205,6 @@ export async function createExport(input: CreateExportInput) {
vfxScope,
submissionNote,
skipPreview: input.skipPreview === true,
noPictureLock: input.noPictureLock === true,
submittedById: submittedBy?.id ?? null,
submittedByName: submittedBy?.name ?? input.submittedByEmail ?? null,
},
@@ -253,8 +247,7 @@ export async function createExport(input: CreateExportInput) {
actorId: submittedBy?.id ?? null,
note:
`Queue Export ${versionString}${input.force ? " (force)" : ""}` +
`${input.skipPreview ? " (skip preview)" : ""}` +
`${input.noPictureLock ? " (no picture lock)" : ""} — ` +
`${input.skipPreview ? " (skip preview)" : ""} — ` +
`${provenance.ok ? "" : "WARNING: "}${provenance.note}`,
},
});
+2 -43
View File
@@ -32,18 +32,6 @@ export interface PreviewManifest {
mp4Output: string;
slateScopeProp: string;
slateSubmissionProp: string;
/** Skip picture-lock trimming and the reference render entirely (§9, picture lock). */
noPictureLock: boolean;
/** `{footageRoot}/{showId}/_PICLOCKS`, mirroring the panel's getShowFootageRoot(). */
piclockDir: string;
/** e.g. "UNG_106" — mirrors the panel's getEpisodePrefix(); the picture-lock glob prefix. */
piclockGlobPrefix: string;
seqTimecodeStart: string | null;
seqTimecodeEnd: string | null;
/** Studio-standard head/tail handle count, applied symmetrically. */
handleFrames: number;
/** Full-duration (handles included), ungraded picture-lock reference render. */
piclockRefOutput: string;
slate: {
versionName: string;
date: string;
@@ -70,7 +58,6 @@ type ExportForPreview = {
fps: number;
vfxScope: string | null;
submissionNote: string | null;
noPictureLock: boolean;
};
/**
@@ -91,27 +78,18 @@ export async function buildPreviewManifest(exportRow: ExportForPreview): Promise
description: true,
notes: true,
slateDescription: true,
seqTimecodeStart: true,
seqTimecodeEnd: true,
project: { select: { name: true, code: true, showId: true, pipelineConfig: true } },
},
});
if (!shot) throw new PipelineError(404, "Shot not found for export");
const [cfg, handleFrames] = await Promise.all([getPreviewConfig(), getConfigNumber("validation.handleFrames")]);
const cfg = await getPreviewConfig();
// Per-production templates: each show has its own slate/overlay AEP, and
// above all its own show LUT. Falling back to another show's would render a
// preview that is quietly the wrong colour.
const templates = await resolveProjectTemplates(shot.project);
const base = `${shot.shotCode}_cmp_TT_${exportRow.versionString}`;
// Same convention as the panel's getShowFootageRoot()/getEpisodePrefix(): the
// picture-lock plate lives at {footageRoot}/{showId}/_PICLOCKS, glob-matched
// by "{showId}[_{episode}]_*".
const showId = shot.project.showId?.trim() || shot.project.code;
const piclockDir = templates.footageRoot ? `${templates.footageRoot}/${showId}/_PICLOCKS` : "";
const piclockGlobPrefix = shot.episode?.trim() ? `${showId}_${shot.episode.trim()}` : showId;
return {
stage: "PREVIEW",
exportId: exportRow.id,
@@ -132,13 +110,6 @@ export async function buildPreviewManifest(exportRow: ExportForPreview): Promise
mp4Output: `${exportRow.outputDir}/${base}.mp4`,
slateScopeProp: cfg.slateScopeProp,
slateSubmissionProp: cfg.slateSubmissionProp,
noPictureLock: exportRow.noPictureLock,
piclockDir,
piclockGlobPrefix,
seqTimecodeStart: shot.seqTimecodeStart,
seqTimecodeEnd: shot.seqTimecodeEnd,
handleFrames,
piclockRefOutput: `${exportRow.outputDir}/${base}_PICLOCK_REF.mp4`,
slate: {
versionName: base,
date: slateDate(),
@@ -187,7 +158,6 @@ export async function inheritPreviewMedia(
deliveryMovPath: true,
previewMovKey: true,
thumbnailKey: true,
piclockRefKey: true,
versionId: true,
},
});
@@ -204,7 +174,6 @@ export async function inheritPreviewMedia(
deliveryMovPath: donor.deliveryMovPath,
previewMovKey: donor.previewMovKey,
thumbnailKey: donor.thumbnailKey,
piclockRefKey: donor.piclockRefKey,
// The Version row stays attached to the export that actually produced the
// media; this one only points at the same files.
versionId: donor.versionId,
@@ -298,13 +267,9 @@ export interface FinalizeInput {
thumbnailKey?: string;
metadataKey?: string;
logFileKey?: string;
/** Full-duration, ungraded picture-lock reference MP4 — a diagnostic sidecar, not a Version. */
piclockRefKey?: string;
};
renderStats?: { renderSeconds?: number; previewSeconds?: number };
media?: { width?: number; height?: number; frameCount?: number; fps?: number; fileName?: string };
/** Why the picture-lock trim/reference was skipped, when it was — surfaced on the export's timeline. */
piclockSkippedReason?: string | null;
}
/**
@@ -473,12 +438,7 @@ export async function finalizePreview(jobId: string, machineId: string, body: Fi
? " — review version media replaced"
: ` — review version created (${inheritedApproval ?? "PENDING_REVIEW"})`
: " — no preview media reported") +
(taskRenamed ? ` — task renamed to ${taskTitle}` : "") +
(artifacts.piclockRefKey
? " — picture-lock reference built"
: body.piclockSkippedReason
? ` — picture lock skipped (${body.piclockSkippedReason})`
: ""),
(taskRenamed ? ` — task renamed to ${taskTitle}` : ""),
},
{
...(versionId ? { versionId } : {}),
@@ -486,7 +446,6 @@ export async function finalizePreview(jobId: string, machineId: string, body: Fi
...(artifacts.previewMovKey ? { previewMovKey: artifacts.previewMovKey } : {}),
...(artifacts.thumbnailKey ? { thumbnailKey: artifacts.thumbnailKey } : {}),
...(artifacts.metadataKey ? { metadataKey: artifacts.metadataKey } : {}),
...(artifacts.piclockRefKey ? { piclockRefKey: artifacts.piclockRefKey } : {}),
}
);
+1 -8
View File
@@ -20,10 +20,6 @@ export const pipelineConfigSchema = z.object({
templateAep: z.string().max(1000).optional().nullable(),
/** Where per-shot pre-renders live, imported by Import Renders. */
rendersRoot: z.string().max(1000).optional().nullable(),
/** Bare footage root (e.g. "V:/_FOOTAGE") the panel's Pull Picture Lock reads
* from at `{footageRoot}/{showId}/_PICLOCKS` — same convention as the panel's
* own `getShowFootageRoot()`. */
footageRoot: z.string().max(1000).optional().nullable(),
/** Overrides for templates that depart from the {showId}_* convention. */
overlayComp: z.string().max(200).optional().nullable(),
previewComp: z.string().max(200).optional().nullable(),
@@ -38,7 +34,6 @@ export type PipelineConfigInput = z.infer<typeof pipelineConfigSchema>;
export interface ResolvedTemplates {
templateAep: string;
rendersRoot: string;
footageRoot: string;
overlayComp: string;
previewComp: string;
lutComp: string;
@@ -83,11 +78,10 @@ export async function resolveProjectTemplates(project: {
return fallback;
};
const [defaultAep, defaultMov, defaultMp4, defaultFootageRoot] = await Promise.all([
const [defaultAep, defaultMov, defaultMp4] = await Promise.all([
getConfigValue("preview.templateAep"),
getConfigValue("preview.movTemplate"),
getConfigValue("preview.mp4Template"),
getConfigValue("preview.footageRoot"),
]);
return {
@@ -95,7 +89,6 @@ export async function resolveProjectTemplates(project: {
// No sensible studio-wide default: a renders root that points at another
// show's folder is worse than an empty one the panel can report.
rendersRoot: pick("rendersRoot", ""),
footageRoot: pick("footageRoot", defaultFootageRoot),
overlayComp: pick("overlayComp", convention.overlayComp),
previewComp: pick("previewComp", convention.previewComp),
lutComp: pick("lutComp", convention.lutComp),