Repository navigation
fix(cli): cloud render zip carries files the composition references under dot-folders - #7353
Conversation
Edit accuracy: accurate 267 (base branch 267), smooth 102 of thoseThe gate passes. Quarantined, measured but not gated (8)
Unstable (2)
|
There was a problem hiding this comment.
Requesting changes at 57b06fec. There are two blockers.
1. The PR body has no fails without the fix: line
The lane's gate needs a line starting fails without the fix: that names the failing test. The Tests section only marks two bullets with "(fails without the fix)", and those bullets don't use the test names. Please add a line such as:
fails without the fix: createPublishArchive referenced dot-paths > carries a referenced file under a dot-folder (and > fails before upload when a referenced file is missing)
The claim itself holds. With main's publishProject.ts swapped in, 4 of the 5 new tests fail: the dot-folder, missing-file, href and poster/CSS tests. The unreferenced .env guard passes either way. The body lists 3 tests but the diff adds 5, so please update that list too.
2. The missing-file stop rejects compositions that do render
tryResolveExternal now throws for every unresolved src, poster, srcset candidate and CSS url(). Some of those references are optional, and the browser handles them being absent. At this head, I checked with createPublishArchive:
<video><source src="a.webm" type="video/webm"><source src="a.mp4" type="video/mp4"></video>with onlya.mp4on disk throwsThe composition references "a.webm", which is not in the project folder.Chrome playsa.mp4, and main uploads this composition without complaint.<img src="a.png" srcset="a.png 1x, a@2x.png 2x">with onlya.pngon disk throws fora@2x.png. The browser falls back to the candidates that exist.
Both run on main and stop on this branch. Suggested fix: pass requireOnDisk = false for srcset candidates, and for a <source> element when another <source> in the same media element resolves. Alternatively, limit the hard stop to references with no fallback (<video src>, <audio src>, <img src>, poster), and add tests for both cases.
Non-blocking
ships nothing and does not fail for a missing hrefpasses only implicitly, becausenames()would throw. An explicitexpect(() => createPublishArchive(dir)).not.toThrow()plus a check thatnotes.htmlis absent would match the test name.- The rest looks right.
.gitandnode_modulesstay excluded throughshouldIgnoreSegment.?and#suffixes are stripped. The root-relative fallback matches how sub-compositions resolve. The existingpublishProject.test.tscases pass.
There was a problem hiding this comment.
Requesting changes at 87f2a483. One blocker is left.
Resolved since 57b06fec:
- The body now has the
fails without the fix:line, naming the tests and listing all 5. - The
<source>fallback andsrcsetcases no longer stop the upload. I re-ran mya.webm/a.mp4repro at this head and it uploads. - The
HARD_REFERENCESgate onvideo[src],audio[src],img[src]andvideo[poster]is the right shape. The existingpublishProject.test.tscases pass.
Blocker: a url() in a stylesheet file still stops the upload
The body says a missing CSS url() "ships if present and never blocks". That holds only for inline <style>, which goes through resolveTarget with no ref, so requireOnDisk is false. localizeCssEntry still calls tryResolveExternal(ctx, val, dir) and gets the default requireOnDisk = true. Repro at this head: index.html has <link rel="stylesheet" href="s.css">, and s.css contains .a{background:url(gone.jpg)}. createPublishArchive throws The composition references "gone.jpg", which is not in the project folder. Main uploads this project.
Fix: pass false from localizeCssEntry. Better, make requireOnDisk default to false, so only the HARD_REFERENCES path can stop an upload. Please also add a .css file case to does not fail on a missing href, source fallback, srcset candidate or CSS url.
Non-blocking
<VIDEO SRC="gone.mp4"> written in uppercase doesn't stop the upload. Main doesn't stop it either, so this is only a gap in the new check, not a regression. If el.localName or the attribute name can come back uppercase from linkedom, lowercasing the key before the HARD_REFERENCES.has check would close it.
…allback media refs do
There was a problem hiding this comment.
Approving at 5766ce61. No blockers.
Since 87f2a483, tryResolveExternal defaults to requireOnDisk = false. Only the HARD_REFERENCES path (video[src], audio[src], img[src], video[poster]) can stop an upload now, so a url() in a linked .css file ships if present and never blocks.
Verified locally:
publishProject.test.tspasses at this head: 71 tests.- With the default flipped back to
true,does not fail on a missing href, source fallback, srcset candidate or CSS urlfails on thes.css/gone.jpgcase, so the new test guards the fix. - The body's
fails without the fix:line still names the three tests I confirmed earlier fail on main.
The uppercase-tag gap from my last review is still non-blocking.
What
hyperframes cloud render(andpublish) left out any file under a dot-folder, even when the composition plays it, so the cloud render failed with "A video in the composition could not be loaded". The zip now carries every in-project file the composition references, dot-paths included.How
tryResolveExternalalready walkssrc,href,poster,srcsetand CSSurl()to find files outside the project. Its in-project branch now adds a referenced file the ignore rules skipped, resolved from the referring file's folder or the project root..gitandnode_modulesstay out, and unreferenced dotfiles such as.envare still left out. A referenced file wins over a.hyperframesignorerule, since the composition cannot render without it.Upload stops, naming the file, only when a reference with no fallback is missing:
<video src>,<audio src>,<img src>or<video poster>. A missinghref,<source>fallback,srcsetcandidate or CSSurl()ships if present and never blocks, as before.Tests
.env(guard, passes either way)fails without the fix: createPublishArchive referenced dot-paths > carries a referenced file under a dot-folder; createPublishArchive referenced dot-paths > fails before upload when a referenced file is missing; createPublishArchive referenced dot-paths > fails on a missing video, audio, img src or poster, naming the file
Publish and cloud suites pass (23 files, 321 tests). Staging every registry, example and package project (129): 7 throw, all unfilled
__VIDEO_SRC__templates or a studio fixture with a missing asset.Size
A lone root fix in one function that nothing else can carry; about 70 changed lines, half of them tests.