Repository navigation
feat(engine): a failed CDN script's report names its library and version, never its URL - #7394
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Approving at f2944855: I found no blocker.
- The test fails without the fix. On
main'sframeCapture.tswith this PR's tests, 4 of 16 fail: the three CDNnames the library…cases andnames the failed libraries in a bracket of their own…. That includes the test named on thefails without the fix:line. With the fix, all 16 pass. Typecheck and oxlint on the two files are clean. - No URL leaks into a report.
libis set only whenorigin === "cdn", and only from a fixed host→path table. The output is limited to[a-z0-9][a-z0-9._-]{0,48}@\d+.\d+.\d+. Ranges, scoped packages, prereleases, other hosts and..paths give nolib. A..path is safe becauseURLnormalises the path before matching, so the result is whatever the browser actually requested. - The existing bracket is unchanged.
[script_load: …]reads exactly as before, and[script_lib: …]comes after it, deduped across the same first four causes. Nothing else in this repo parsesscript_load. Readers outside this repo (Desktop) were not checked.
Nit, not blocking: an exact-version prerelease such as [email protected] reports no library. That is the conservative choice, so it is fine as is.
Contributor
…ion, never its URL
miguel-heygen
force-pushed
the
dexportfix/script-lib
branch
from
November 8, 2026 01:51
f294485 to
4452602
Compare
Contributor
There was a problem hiding this comment.
Re-approving at 4452602e.
I compared the trees of the approved head f2944855 and this head. The only difference is the one-line doc comment on scriptLoadCauseSuffix in frameCapture.ts, which was reworded. No code or tests changed. The fails without the fix: line is still in the body. The rest of my review at f2944855 still applies.
miguel-heygen
enabled auto-merge
November 8, 2026 02:16
Merged
4 of 6 tasks
Merged
SanHsien
added a commit
to SanHsien/hyperframes
that referenced
this pull request
Nov 9, 2026
Port the adopted upstream fixes from f5bde95 to the current upstream tip: heygen-com#7375 multipart cloud upload, heygen-com#7382 minParallelChunks, heygen-com#7349 HLG header SEI, heygen-com#7369 skip unmounted compositions in lint/check, heygen-com#7381 filesystem-path media in the cloud archive, heygen-com#7383 Safari cut-point pre-roll revert, heygen-com#7373 clock steering between audio time updates, heygen-com#7384 injector test isolation, heygen-com#7378 preview seek retention, heygen-com#7390 virtual timer schedule per worker, heygen-com#7394 CDN script failure naming, heygen-com#7395 menu row radius, heygen-com#7119 decode timeout caller test, heygen-com#7397 authored tween order, heygen-com#7402 capture page clip loading, heygen-com#7412 muted video audio track at cuts, heygen-com#6150 template root variable test, heygen-com#7442 held tail seek once. Deliberate local differences: heygen-com#7067's audio-start hold is not carried into clock.ts, mountedSources comes from heygen-com#6827 as a helper only, cloud/_gen/types.ts omits the image-request types the fork does not generate, and the lint symlink test skips through symlinkOrSkip where the account cannot create links. Co-Authored-By: Claude Sonnet <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a script from a public CDN fails to load during a render, the failure's warning now also names the library and exact version, as
[script_lib: [email protected]], never the URL. Today it says only[script_load: cdn/net::ERR_INTERNET_DISCONNECTED], so a report cannot say which library broke.Why
Desktop reports about 20 CDN script failures in five days (offline, DNS) without knowing whether they are GSAP or something else. Which libraries fail decides whether shipping more GSAP versions in the packages is worth their size. The engine has the URL where it classifies the failure; the report must not carry it.
Related work
None found:
git grep -n "script_lib\|cdnLib" packageshad no match.How
classifyScriptLoadCauseaddslibfor an unscoped package at one exact version on jsDelivr (/npm/[email protected]/), unpkg (/[email protected]/) or cdnjs (/ajax/libs/name/x.y.z/); a range (gsap@3), a scoped package, another host or an odd path gives none. The name is[a-z0-9][a-z0-9._-]{0,48}and the versionx.y.z, so nothing free-form reaches a report.[script_load: origin/code, ...]exactly as readers parse it today and adds[script_lib: [email protected], [email protected]]after it, so no reader of the first bracket changes.Size
A lone change nothing else can carry: it touches one function and its test file in the engine, and the question it answers (which library fails) has to be answerable before the other open PR (which ships GSAP differently) can be sized.
Test plan
frameCapture-scriptLoadCause.test.ts(16 pass on the devbox), typecheck and lint clean.fails without the fix: packages/engine/src/services/frameCapture-scriptLoadCause.test.ts › "classifyScriptLoadCause" › "names the library of https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js as [email protected]" (and three other new tests in that file fail on main's
frameCapture.ts).