Repository navigation
feat(engine): a script-load failure names where the script came from and why it failed - #7088
Conversation
…and why it failed
Edit accuracy: accurate 267 (base branch 267), smooth 98 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (2)
|
There was a problem hiding this comment.
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
Buildjob failsverify: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 inscripts/package-size-budgets.jsonand give the reason in the PR body, as the check asks. - blocker:
Fallow auditfails 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.
…e engine size budget
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]>
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_failurewarning now ends with a closed suffix, for example[script_load: local/net::ERR_CONNECTION_RESET, cdn/http-503],.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).net::ERR_*name,http-<status>, orunknown. Free-form browser text is never passed through.The failure rule itself is unchanged.
Tests
frameCapture-scriptLoadCause.test.ts: each origin and code maps as above, unmatched error text becomesunknown, 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.