Skip to content

feat(cli): a render that finds a file missing says which kind of file, never its path - #6742

Merged
miguel-heygen merged 1 commit into
mainfrom
fix/render-missing-path-kind
Oct 29, 2026
Merged

miguel-heygen merged 1 commit into
mainfrom
fix/render-missing-path-kind

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Description

Some renders fail partway through with ENOENT: a frame file the render wrote, or meant to read, is gone. The error's words are redacted before they reach telemetry, so today nothing says which file went missing, and so nothing says who removed it: the render's own cleanup, the shared extraction cache's eviction, the sweep of abandoned render folders, or something outside the CLI.

render_error now carries missing_path_kind, a name from a fixed list, never the path:

Missing file under missing_path_kind
a shared extraction-cache entry (hfcache-…) extract_cache
the render's own extracted video frames video_frames
the merged captured frames captured_frames
a capture worker's frames worker_frames
capture calibration calibration
the compiled composition compiled
anywhere else in the render's work folder work_dir
anything else (a project file, a temp file) other

It reads the path from the error or its causes (.path on the ENOENT, or the quoted path in its message), and is absent when nothing was missing.

Why under 100 lines

It is one classifier and one event field. Which file kind goes missing decides the fix, so the field ships first and the fix follows the data.

Testing

fails without the fix: missingPathKind (packages/cli/src/telemetry/missingPathKind.test.ts) does not exist on main; its 10 cases cover each kind with Windows and POSIX paths, an ENOENT wrapped as a cause, a message-only ENOENT, and errors that are not ENOENT.

  • missingPathKind.test.ts: 10 passed, 3 runs in a row. events.test.ts: 81 passed.
  • CLI tsc --noEmit, format, comment ratchet, the pre-commit gates: clean.

What I did NOT exercise

  • A real render that hits ENOENT: I could not make one happen on Windows or Linux runners (long streaming renders, concurrent video renders plus a snapshot, a 50 MB extraction-cache cap). That is why this field exists.
  • Render failures that exit before the pipeline starts do not reach render_error from this path.

@github-actions

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 144 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE · 0 blocker · 1 important · 0 nits · head 223761de

The classifier sends only fixed names, never a path, and every directory name it matches is one the producer and engine actually create.

  • important: Studio renders still emit render_error with no missing_path_kind. emitStudioRenderError (packages/cli/src/server/studioRenderTelemetry.ts:124) calls trackRenderError without it, so an ENOENT in a studio-server render reports nothing. If the failures you're chasing come through studio, the data stays empty. Fix: add missingPathKind: missingPathKind(err) there.
Scope
  • Checked against the real names: hfcache-v8- (extractionCache.ts), __hyperframes_video_frames, captured-frames, capture-attempt-N/worker-N and retry-N-batch-N-worker-N (captureStage.ts), capture-calibration (captureCost.ts), compiled, work-<uuid>.
  • missingPathKind.test.ts is new, so the fails-without-fix line holds.
  • CI at this head is green, including Windows render verification.

@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 9438490 Oct 29, 2026
70 checks passed
@miguel-heygen
miguel-heygen deleted the fix/render-missing-path-kind branch October 29, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant