feat(render-pipeline): validation, QC and delivery builder
Completes RenderPipeline2 phases 3-5. Additive throughout: with validation.enabled=false the pipeline behaves exactly as before. Validation (§8) runs on the worker straight after a render, while it still holds the job and the files are local. Everything is read from the EXR header — one 64 KB read per sampled frame, no pixel decode — so the engine needs no oiiotool. The render job deliberately stays open through the stage, so a worker that dies there is reaped and retried instead of stranding the export in VALIDATING. Timecode is the primary check and is anchored on the plate, never the API: measured on the live show, Shot.timecodeStart is the editorial in-point and sits one handle-length (8f) ahead of the plate, so checking against it would pass the defective exports and fail the correct ones. Reference precedence is manifest timing plate -> plate found on disk -> API value, and the API rank is WARN-only. The panel now resolves plate provenance by walking the comp's own footage layers, so the worker never guesses which element carries the comp's timing. Verified against real studio renders via the new --validate mode: it catches both defect classes seen in shipped work — the +8 handle offset and frame-derived timecode (00:00:41:17 = frame 1001 at 24fps). QC (§10) is one service behind two front doors, API-key for the panel and session for the web. PASS means ready to upload and nothing else; FAIL sets the comp task to CHANGES. The panel gains a QC section that imports the real EXR sequence at full res rather than the H.264. Delivery (§11) rides the existing queue as a DELIVERY_BUILD job: hard links with a copy fallback, verification by re-hashing delivered bytes against the validation-time digest, manifest.json and the CSV report. fsutil hardlink list is unavailable over SMB, so link identity is never queried — reading the bytes back covers links and copies alike. Also fixes ApiClient.ProgressAsync throwing on transport failure, which would have aborted work in flight during a brief server outage; progress reporting is best-effort by contract. Removes the stale RenderWorker/ rule from the root .gitignore. The worker's source is tracked like the rest of the repo and its own .gitignore already covers bin/, obj/ and publish/; the rule silently excluded new files while the existing 20 stayed tracked. Not yet applied: migration 20260813000000 was hand-written because the dev database was unavailable — run prisma migrate deploy and verify before relying on it. None of this has run against a live server. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+44
-2
@@ -60,8 +60,47 @@ the artist's AEP (then it is pure `aerender`), or the ffmpeg engine.
|
||||
are never resumed — the next attempt clears its own output files and re-renders.
|
||||
- Durable reporting: complete/fail reports spool to disk and replay in order with backoff —
|
||||
rendering continues while the server is down.
|
||||
- **Validation (Phase 3)**: after a successful render the worker checks the sequence it just
|
||||
produced and reports every result in one call (E12). See below.
|
||||
|
||||
Preview generation (Phase 4) and validation (Phase 3) plug into this same service later.
|
||||
## Validation stage
|
||||
|
||||
Runs on the worker straight after the render, while it still holds the job and the files are
|
||||
local. The Export sits in `VALIDATING` until the report lands; the server decides what the
|
||||
results mean (any FAIL → `VALIDATION_FAILED`, otherwise the preview stage is queued).
|
||||
|
||||
Checks: `file_count`, `missing_frames`, `duplicate_frames`, `first_frame`, `last_frame`,
|
||||
`filename_consistency`, `zero_byte`, `corrupt`, `resolution`, `bit_depth`, `alpha_channel`,
|
||||
`exr_type`, `timecode_plate_match`, `timecode_consistency`, `timecode_fps`.
|
||||
|
||||
**No oiiotool needed.** Everything is read from the EXR header — one 64 KB read per sampled
|
||||
frame, no pixel decode. Full-sequence checks (count, gaps, names, sizes) touch every file;
|
||||
header checks sample first/middle/last plus every Nth frame (`validation.sampleEvery`).
|
||||
|
||||
**Timecode is the primary check** (spec §8.1a) and is compared against *the plate*, in this
|
||||
order: the timing plate named in the manifest → a plate found under `plateSearchRoots` →
|
||||
the API timecode minus handles, which is **WARN-only** because the API stores the editorial
|
||||
in-point and is a handle-length ahead of the plate by design.
|
||||
|
||||
Checksums are xxHash64 per file, with a sequence digest stored on the Export and reused by
|
||||
the delivery builder to verify what it packaged.
|
||||
|
||||
Server-side switches (SystemConfig, no worker redeploy): `validation.enabled`,
|
||||
`validation.sampleEvery`, `validation.handleFrames`, and `validation.overrides` for per-check
|
||||
severity, e.g. `{"exr_type":"warn"}`.
|
||||
|
||||
### Checking a render by hand
|
||||
|
||||
```powershell
|
||||
.\VFXReviewWorker.exe --validate "V:\_EXPORTS\UNG\102\UNG_102_019_010\v005" --plate "V:\_FOOTAGE\UNG\UNG_102\UNG_102_019_010_BG01_TT_v001\UNG_102_019_010_BG01_TT_v001.01001.exr"
|
||||
```
|
||||
|
||||
Runs the whole engine over an existing folder with no server, job or queue, and prints the
|
||||
report. The frame range, pattern and resolution are inferred from the files. Exits non-zero
|
||||
if any check fails, so it also works in a script. Useful for auditing work that predates the
|
||||
pipeline, and for proving the checks on real shots before turning the stage on.
|
||||
|
||||
Preview generation (Phase 4) plugs into this same service.
|
||||
|
||||
## Packaging for another machine
|
||||
|
||||
@@ -117,6 +156,7 @@ Create `C:\ProgramData\VFXReviewWorker\config.json` (§7.8):
|
||||
"aerenderPath": "C:\\Program Files\\Adobe\\Adobe After Effects 2026\\Support Files\\aerender.exe",
|
||||
"aeVersion": "24.3",
|
||||
"ffmpegPath": "C:\\pipeline\\bin\\ffmpeg.exe",
|
||||
"plateSearchRoots": ["V:/_FOOTAGE/UNG"],
|
||||
"pathMappings": [
|
||||
{ "from": "//SAN/", "to": "S:/" }
|
||||
]
|
||||
@@ -124,7 +164,9 @@ Create `C:\ProgramData\VFXReviewWorker\config.json` (§7.8):
|
||||
```
|
||||
|
||||
`pathMappings` translate the manifest's canonical UNC paths to this machine's drive
|
||||
mappings. Everything tunable (poll interval, lease, stall timeout, max attempts) lives in
|
||||
mappings. `plateSearchRoots` is optional: it is only consulted when a manifest carries no
|
||||
timing plate (older panel versions), to find the shot's plates for the timecode check.
|
||||
Everything tunable (poll interval, lease, stall timeout, max attempts, validation) lives in
|
||||
the server's SystemConfig and arrives at registration — no per-machine tuning files.
|
||||
|
||||
## Run interactively (first-time smoke test)
|
||||
|
||||
Reference in New Issue
Block a user