Skip to content

feat(engine): a script-load failure names where the script came from and why it failed - #7088

Merged
miguel-heygen merged 2 commits into
mainfrom
fix/script-load-failure-signal
Nov 3, 2026
Merged

miguel-heygen merged 2 commits into
mainfrom
fix/script-load-failure-signal

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A render stopped for "a sub-composition timeline script failed to load" names the failed URLs, but a caller that must not see URLs (usage counts, support reports) cannot tell why it failed: a transient network drop, a server refusing, or a missing file all read the same.

Change

The sub_timeline_script_failure warning now ends with a closed suffix, for example [script_load: local/net::ERR_CONNECTION_RESET, cdn/http-503],.

  • origin: local (the render's own file server), cdn (a known CDN host), remote (any other host), unknown (no URL, such as a blocked integrity check).
  • code: the browser's net::ERR_* name, http-<status>, or unknown. Free-form browser text is never passed through.
  • At most 4 entries; no URL, host or path.

The failure rule itself is unchanged.

Tests

frameCapture-scriptLoadCause.test.ts: each origin and code maps as above, unmatched error text becomes unknown, and the warning ends with the suffix. Breaking the local-origin check turns 3 cases red.

Size budget

The engine packs to 466600 bytes against 465968 on main (+632, the classifier and the suffix). That was over the 1% margin, so the engine packed budget moves 461788 to 462420, the measured increase.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 267 (base branch 267), smooth 98 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 (8)

Unstable (2)

  • seqplainkeys-none-px-r0-root-z100: tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo false, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true
  • seqrepeat-none-center-r0-root-z100: tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true / tracking 0.05, pressJump 0, drop 0, reload 0, render 0.02, renderKey -, undo true, teleport true

@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: REQUEST CHANGES · 2 blocker · 0 important · 0 nits · head cde00042
CI fails on this head because of this diff. Base 47dddedd builds green on main.

  • blocker: the CI Build job fails verify:packed-manifests: @hyperframes/engine packed size 466808 bytes is over its budget of 461788 by more than 1%. Either shrink the change or raise the engine entry in scripts/package-size-budgets.json and give the reason in the PR body, as the check asks.
  • blocker: Fallow audit fails on an unused export. ↓ inline
Scope

Read the whole diff and the three recordScriptLoadFailure call sites. It is the only writer of scriptLoadFailures outside tests, so the two arrays stay index-aligned and dedupe keeps the first cause. The codes come from a closed set (net::ERR_* regex, http-<n>, unknown), and the suffix and details.loadCauses carry no URL. Other CI workflows on this head are green. This is a feature PR, so the fails without the fix: rule does not apply.

@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 — 2 resolved, 0 open, 0 new · cde00042 → f09de208

@miguel-heygen
miguel-heygen added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit dec4659 Nov 3, 2026
137 checks passed
@miguel-heygen
miguel-heygen deleted the fix/script-load-failure-signal branch November 3, 2026 14:11
@WaterrrForever WaterrrForever mentioned this pull request Nov 3, 2026
1 task done
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 4, 2026
Adopted with tests that fail on the old code (except the link change):
- offload: rewrite media inside <template>, keep same-named files from
  other folders (heygen-com#6842, offload part only)
- autoUpdate: no background upgrade across a 0.x minor; Homebrew installs
  only notify (heygen-com#7013, autoUpdate part only)
- engine: script load failures carry origin/code; aborted scripts are not
  load failures (heygen-com#7088, heygen-com#7093)
- community Discord invite links (heygen-com#7097)
- studio: write media duration to the store once per file (heygen-com#6745)
- check: restart the idle watchdog on each driver call during analysis
  (heygen-com#6919, adapted to this line's fixed 120s idle window)
- check: default wait raised from 10s to 45s, matching snapshot/render
  (heygen-com#6947)
- image cancellations no longer ignored by extension (heygen-com#6928)
- capture: system sleep no longer counts as a stall (heygen-com#7096, hand-ported;
  the sequential branch also uses the shared stall clock)

Commit watermark advances to 183614b (28 consecutive commits with
file:line evidence); PR and issue watermarks are unchanged. The rest of
the review is in docs/UPSTREAM_REVIEW_2026-11-04_CONTINUED.md.

Co-authored-by: Miguel Ángel <[email protected]>
Co-authored-by: WaterrrForever <[email protected]>
Co-authored-by: Wenbo Zhu <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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