* test(core): a rule of thousands of selectors must split its list a fixed number of times
* fix(core): split a rule's selector list once when rewriting svg id references
* fix(studio-server): preview copies of long clips with sound finish again
The piece join ran with ffmpeg's -xerror once it moved onto the shared concat input, which made the timestamp repair at each seam of a clip with sound fatal: the copy failed, its pieces stayed, and the clip waited for a copy that never came. The join opts out of -xerror; the video-only render joins keep it.
* fix(studio-server): a preview copy that joins short is refused and made again
Only a join of pieces with sound runs without -xerror, and every join is measured before it is kept: a copy shorter than its pieces is refused and its pieces are removed, so the next attempt makes them again. The sound test reads ffprobe's JSON so CRLF output parses too.
* fix(studio-server): a preview copy is measured against its own pieces
The join was compared with the source container's length, which counts tracks the copy leaves out, so a whole copy of a source with a longer subtitle or alternate audio track was refused on every try. It is now compared with the summed length of its pieces, which carry only the streams the copy maps; a piece that cannot be measured refuses the join.
* fix(studio-server): every piece of a preview copy is checked against its own stretch
The copy's length now comes from the picture and the sound it keeps (stream durations, or the Matroska DURATION tag), not the container, so its stretches end where those streams end. Each piece and the joined copy are measured against their own stretch, so a short piece can no longer lower the bar. A caller that leaves while the copy is measured stops the measuring, and a left copy is never written to the cache.
* fix(studio-server): long preview copies keep only the picture in pieces and add the sound once
AAC pieces overlap at every seam (each piece's priming frame reaches back into the one before), so a strict join refuses them. Pieces now carry only the picture and join strictly, exactly like the render joins; the sound is encoded once from the source and put with the picture by a stream copy that keeps both on the source's timeline. This replaces the length checks of the earlier commits, and old pieces with sound get a new name tag so they are never joined as picture-only pieces.
* fix(studio-server): each picture piece of a preview copy starts exactly where its stretch does
At a frame rate that does not divide 15 s, such as 29.97, every piece ran about 15 ms long and the join placed the next piece after it, so the picture drifted from the continuous sound (600 ms over 10 minutes). The join list now gives each piece its stretch's length (ffconcat duration), so pieces land on the source's timeline and the offset stays within a frame.
* fix(studio-server): a preview copy of a clip whose picture starts late keeps that start
On ffmpeg 8 the piece join moved the first piece to zero, so a picture that starts after the sound lost its lead against the sound added later. The join now keeps each piece's own timestamps (ffconcat inpoint 0 with each stretch's duration, and -copyts), on ffmpeg 7 and 8 alike. The long-source path moves into copyInPieces.
* fix(studio-server): a preview copy never keeps a short or broken piece from a stopped copy
A piece left by an earlier run is made again when it runs short of its stretch; when the join refuses one, every piece is dropped and made again once in the same run. A refused join no longer leaves its pieces or a picture temp behind; a stopped one keeps its pieces.
* fix(studio-server): a resumed preview copy remakes a piece a frame short and stops on cancel
A piece left by a stopped copy now has to run its stretch to within half a frame. The pieces are measured one at a time, and leaving the copy stops the running ffprobe (probeMediaMetadata takes a signal) and frees the copy.
* refactor(studio-server): read the piece check's frame rate outside the copy setup
* test(studio-server): run the real-ffmpeg join tests in their own file, inside the flake gate's limit
The flake gate runs each changed test file under full CPU load with 120 s per run. With this change's real-ffmpeg join tests added, proxyTranscoder.test.ts took about 108 s a run at a6d62ae2 and went over at 56cf7c74. Those tests move to proxyTranscoder.seams.test.ts; under 4-core load the two files take 15 s and 32 s.
* test(studio-server): keep the real-ffmpeg join tests inside the flake gate's limit
The seams file went over the gate's 120 s per run. Three tests whose checks the others already make are gone (plain copy with sound, the picture-and-sound-together clap case, the 5 s piece), each clip is measured in one ffmpeg pass, and the stopped-copy tests have their own file. On 4 busy cores the files take 15 s and 10 s. The cut piece keeps its header now, so the test reaches the retry after a refused join.
* fix(media-use): remove only the temp folders media-use made, and never fail on cleanup
discardPrivateOutput now removes a folder only if privateOutputPath made it in this
run, instead of matching names against the raw temp setting, and a removal error no
longer turns a finished or failed generation into a cleanup error. The hosted video
and favicon providers use the same helper, so resolve removes their folders too.
Provider tests remove the folders they create; the resolve test also redirects
TEMP and TMP, so it checks the cleanup on Windows as well.
* test(media-use): prove resolve can remove the hosted video and favicon folders
* test(media-use): name the folder this run did not make plainly
* test(core): a scope with thousands of excluded clips must check each element once
* test(core): a page of many svg clips and mounts must scope without a pairwise scan
* fix(core): check svg id scopes against excluded roots in one ancestor walk
* fix(share): ask before sharing from Studio, naming the review it changes
A composition's script runs on Studio's origin by default, and a received
folder's .hyperframes/review.json can point Studio at an existing review.
Every share action except sign-in now asks the person first, naming the
review (its link), who can open it, the workspace and whether project files
are uploaded. The request carries the manage link of the review that was
shown, and the server refuses it with share_target_changed when the
project's review no longer matches, so nothing is shared or changed.
* fix(share): bind each Studio share action to the review id the person confirmed
Studio now gets the id and title of the review an action reaches, including a folder
whose record names a review it never opened (a received folder can ship one). The
confirmation names that review, its workspace and who can open it, and says plainly
when a folder arrives already linked. Actions carry the confirmed id; a missing one is
refused as confirmation_required and a different one as share_target_changed, and
after that refusal Studio drops the earlier choice. The docs describe the
confirmation and that project files are included only when chosen.
* fix(share): show the review title on one quoted line in the confirmation
* fix(share): say a linked share also sets who can open it, and check the new state fields
* fix(share): separate the question from the details and say when a title is unknown
* docs(share): name the review record without a path the citation check reads as a file
* fix(studio): a video with no size of its own keeps its file's size while a lighter copy plays
The preview plays a smaller copy of a large video, and a video the film gives no
size took the copy's size: a 1920x1080 file in a 1080p film drew at 456x257 at
Quality 1/2 and 608x342 at Full, while a render draws it at 1920x1080. While a
copy plays, a rule keyed by the copy's address now gives the video its file's
shown size (its pixels' aspect and turn included), at zero specificity so any
size the film's own CSS sets still wins. Studio's media facts now carry the
pixel aspect and turn, read by the same code the engine uses.
* fix(studio): size only a video the film leaves unsized while its copy plays, as Chromium lays it out
A video whose box is its file's own size (300x150 before the file loads) gets a
plain width and height at that size while a smaller copy plays, through a
preview-only mark and a rule keyed by mark and copy address. A video the film
sizes in either direction is left to the film's CSS, so authored aspect
ratios, box sizing, containment and earlier rules lay out as before. The size
is the original's decoded size when the browser has it, else its facts with
narrow pixels stretching the height as Chromium does. ffprobe is asked for the
side data list, which 4.x also knows, in Studio and in the CLI. A video shown
with object-fit none or scale-down keeps its file.
* fix(studio): an unsized video keeps its size when its copy is made cold behind a still
* test(core): a held video gets its file back when waiting for its copy throws
* fix(core): a copy wait that throws counts as not served, so a held video gets its file back
* test(core): each proxy test resets its own runtime's copy reporting, so none reports into the next
* test(core): the stale-runtime test runs past the report throttle, as a finished test does
* test(core): a framed proxy test's runtime must not report its copies into the next test
* test(core): every proxy test runtime loaded fresh has its copy reporting reset after the test
* fix(studio): a sealed preview turns a rotated element live and saves the turn on its own route
* fix(studio): a sealed rotate regrabbed mid-save cancels to where it started on the frame too
* refactor(studio): keep the gesture handlers file under the size limit
* fix(studio): a sealed preview's timeline names each file by its project path
* fix(studio): keep a file on another site at its own address in a sealed preview's timeline
* test(studio): a sealed shadow's failed reload says only what it reported
* fix(studio): a sealed preview's failed reload no longer blames a page that never loaded
* fix(studio): a failed reload names the restore seek when the timeline already arrived
* test(studio): keep the restore seek test's comment under 120 characters
* fix(engine): bound the seek-index rebuild copy to a single mov/mp4 source
The seek-index rebuild now runs only for a source ffprobe reads as one
mov/mp4 file, and reads it with the mov demuxer, so a playlist or list
input is never copied. The copy is capped with -fs at twice the source's
size plus 1 MiB; a copy that reaches the cap is removed and extraction
continues as it does without a rebuild. The copy also waits for an
extraction slot like other ffmpeg work.
* fix(engine): remove the seek-index copy folder when the copy throws
The stream copy now runs in try/finally, so its temp folder is removed
whenever the copy is not kept, including when ffmpeg fails to start.
* fix(studio): a scene edit swaps in place and a far scene mounts for selection in a sealed preview
* test(studio): a sealed undo that reloads marks its scenes stale first
* test(core): a selector with many unclosed openers must scan in linear time
* fix(core): scan a selector's quoted, bracketed and comment parts in one linear pass
* refactor(core): split the guarded scan's bracket and escape steps into small helpers
* test(core): page goldens carry the linear selector scan the pages now inline
* test(catalog): mirror the font subset requests the pages' new inline scan text makes
* style(core): wrap the guarded scan's doc comment under 120 columns
* test(studio): a lane drag in a sealed preview restacks and saves its z-index
* fix(studio): a lane drag in a sealed preview saves the stacking change it implies
* test(studio): format the sealed restack test and skip a clip with no stored z-index
* fix(studio): dragging a layer in a sealed preview's layers panel restacks it
* fix(studio): a sealed layer drag restacks nothing from a malformed sibling reply
* chore(studio): drop a doc line the comment check counts against the stack base
* fix(core): a sealed preview's own videos load with CORS, so colour grading and audio effects work
* style(core): fit the sealed media note within the line limit
* test(studio): a lane drag in a sealed preview restacks and saves its z-index
* fix(studio): a lane drag in a sealed preview saves the stacking change it implies
* test(studio): format the sealed restack test and skip a clip with no stored z-index
* fix(studio): a sealed lane drag restacks from the z-index the preview paints
A sealed preview's lane drag read the clip's z-index from the store, which holds only inline styles and the value
from when the drag began. It now asks the frame for the computed z-index when the gesture runs, so a stylesheet's
value and an earlier queued gesture's save both count.
* chore: release v0.9.71
* chore: release notes for v0.9.71 link the commit after the first cut
* chore: release notes for v0.9.71 add the two commits merged after the review
* fix(engine): extract frames from MP4s whose seek index leaves out the first keyframe
Some MP4s (seen from VLC's muxer) carry a sync-sample table (`stss`) that omits the
IDR at the start of the file. Browsers ignore `stss` and play them normally, but every
ffmpeg input seek before the next listed keyframe fails ("Cannot find an index entry
before timestamp ... could not seek to position"), so frame extraction for that window
comes back empty. With JPEG frames the encoder then opens at EOF and ffmpeg exits
non-zero, surfacing as "Video source could not be decoded"; with PNG it exits 0 and
surfaces as zero_output. In distributed renders this fails every chunk that samples the
clip before its second keyframe, and the render fails after the retry pass.
When extraction's stderr shows that seek failure, stream-copy the source into a fresh
MOV (same packets, no re-encode; the muxer rebuilds the index from the packets' keyframe
flags), clear any partial frames, and extract once more from the copy. The copy lives in
its own temp dir and is removed afterwards; the result still reports the original srcPath.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(engine): keep the seek-index retry under the file's comment share
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(core): selector alias values escape '<' so style text can't end early
Attribute values that the compiler copies into selector text, such as an
SVG reference alias's rewritten value or a composition or root id in a
scope selector, are written inside a <style> element. A '<' in one could
close that element early. These values now write '<' as the CSS escape
\3c , which reads back as the same character, so each selector still
matches the same elements.
* test(core): name the '<' escape tests for what the escapes guarantee
The selector escapes write '<' as \3c themselves, so selector text cannot
end its style element even when the CSS is serialized without postcss's
own </style escaping. The test names and comments now say that.
* fix(media-use): provider error lines print control characters as escapes
The local video, local image, Codex image, local voice and HeyGen providers
print a helper tool's output or an error message when a step fails. Those
lines now go through terminalText, as the sound effect provider already does,
so escape and bell bytes from a prompt or a helper's output show as visible
\xNN escapes instead of reaching the terminal. Printable text, return values
and thrown errors are unchanged.
* fix(media-use): keep line breaks in escaped provider error lines
A helper's multi-line error output printed as one long line, because every
line break showed as a visible escape. A new terminalLines helper keeps each
line break (a CRLF pair counts as one) and escapes every other control
character, a lone carriage return included. Provider lines that can carry
multi-line helper output now use it.
* test(core): pin that selector alias growth is charged while it is built
* fix(core): keep SVG selector alias growth within the compile budget
* fix(core): charge renamed-id selector growth too, and settle to the sheet's real growth
* chore(core): regenerate the selector alias installer and page goldens
* test(core): build the alias growth fixture from compiler-written aliases
* test(core): trip the alias budget only in the selector rewrite
* test(core): rewrite an escaped id with exactly its growth left
* fix(core): charge a renamed id against the token it replaces
* chore(core): regenerate the selector alias installer and page goldens
`catalog --type=` passed an empty string, which the truthiness check
read as no filter: it listed every item and exited 0. Any given value
other than block or component is now a usage error (exit 2), as #7669
made it for other bad values.
Follow-up to #7678 review.
Claude-Session: https://claude.ai/code/session_01M3Xbw44WYGyVqg4AjkzFxj
Co-authored-by: Claude <noreply@anthropic.com>
`mediaTimeWindow` parsed `data-start` with a raw `Number()`. A negative start,
which `readClipTiming` clamps to zero, produced a window entirely before zero,
so `mediaWindowsOverlap` reported no overlap and `video_audio_double_source`
missed a real duplicate-audio error.
Read the window through `readClipTiming`, the same contract parser the renderer
uses, and keep returning null when the start or duration is unknown.
* test(producer): compile-time remote downloads are capped, timed and stop with the render
* fix(producer): cap compile-time remote downloads, give them one deadline and stop them on cancel
* test(producer): size-limit tests stay under the remote download cap
* test(producer): count a refetched bundled script; start the deadline at the first download
* test(producer): export the download deadline so its test reads the real value
* fix(producer): count every downloaded script and start the download deadline at the first one
* test(producer): read the host's script copy once however many tags name it
* fix(producer): read a bundled script once per address; document the compile download limits
* test(producer): size the shared-font test from the 64 MB limit so it reaches it
* test(producer): cancel a render while it compiles
* fix(producer): cancelling a render stops its compile
* test(producer): compile-time remote downloads are capped, timed and stop with the render
* fix(producer): cap compile-time remote downloads, give them one deadline and stop them on cancel
* test(producer): size-limit tests stay under the remote download cap
* test(producer): count a refetched bundled script; start the deadline at the first download
* test(producer): export the download deadline so its test reads the real value
* fix(producer): count every downloaded script and start the download deadline at the first one
* test(producer): read the host's script copy once however many tags name it
* fix(producer): read a bundled script once per address; document the compile download limits
* test(producer): size the shared-font test from the 64 MB limit so it reaches it
* test: pages holding an SVG element named template
* fix: read template content only from HTML templates
* test: SVG elements named template in previews, inline mounts and lint
* fix: treat only HTML templates as scenes and inline mounts
* test: scene ids next to SVG elements named template
* fix: take scene ids only from HTML templates
* test(producer): pin that an alias list written into authored HTML never reaches the CSS
* test(producer): keep the alias test's comment within the line limit
* fix(core): read selector aliases only from what the compiler wrote
* test(producer): cover root-only pages and kept templates for authored alias lists
* fix(core): also drop authored alias lists from kept templates and root-only renders
* fix(core): walk each kept template once when dropping authored alias lists
* chore(catalog): mirror the font requests of pages carrying the new alias installer
* fix(core): leave linkedom template content uncopied when dropping authored alias lists
* fix(core): drop authored alias lists inside SVG elements named template
* test(core): count every element the alias cleanup processes
* fix(core): visit each element once when dropping authored alias lists
* chore(core): regenerate the inline selector alias installer
* test(core): refresh page goldens for the regenerated installer
* fix(inspector): the page runtime carries no wide characters, so inspected pages stay one byte a char
* fix(core): the inlined page runtime carries no wide characters either
* fix(core): the wide-character check lives in core, which every runtime build image copies
* fix(media-use): re-freezing a recipe archives only under an integer version
freezeRecipe archived the previous folder at `${dir}@v${previous.version}`,
taking version straight from the old recipe.json and removing that path
recursively before renaming the folder onto it. recipe.json is committed
with the project, so a received project could set version to a path such
as "1/../../../../victim", ship a promo@v1 folder for it to walk through,
and the next freeze of that name deleted a folder outside the project and
moved the recipe folder into its place.
Only a positive integer version is trusted now; anything else archives as
v1, the same fallback the version bump already used. Both media-use copies
of recipe-store.mjs carry the change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(media-use): never replace an existing recipe archive on re-freeze
A malformed recipe.json version fell back to slot 1, so re-freezing removed a
real promo@v1 archive before renaming the current folder into it. The archive
slot is now the claimed version only when that archive does not exist yet;
otherwise it is the first number above every archive on disk. Nothing is
removed any more. The version is checked against Number.MAX_SAFE_INTEGER
before either folder moves, so a freeze never writes a version the next
freeze would reject.
Refs SECOPS-2882
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
recipe.mjs and prefs.mjs printed recipe.json and preferences.json values
raw: names, workflows, approval dates, brief values, confirmed-in project
names, and the known-recipe list in an unknown-name error. Both files
travel with a project, so an escape sequence in them could rewrite or
hide earlier output, set the window title or write the clipboard in
terminals that allow it. The SFX provider's empty-search line repeats the
intent, and its Openverse fallback line repeats a network error.
Each of those lines now goes through terminalText, like the resolve and
adopt lines beside them. --json output is unchanged.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* test(core): svg attribute selectors rewrite in linear time over many fragment references
* perf(core): index a scope's svg reference aliases once by id and attribute name
* refactor(core): split svg attribute alias lookup out of the selector rewrite
* test(core): refresh page goldens and font mirror for the smaller inlined svg alias code
* test(core): repeated references to one svg symbol rewrite in linear time
* test(core): count alias checks so repeated svg references show quadratic work
* perf(core): index each repeated svg reference alias once
* fix(studio): a sealed preview's timeline shows its text clips' words and look
A sealed preview's timeline rows come from the clip list the film sends, which
carried no text, so its text clips drew as blank rows. The film now sends each
plain text layer's words (up to 200 characters) and look, read by the same rule
Studio uses for its own rows, and the row shows the words as plain text.
* fix(studio): check a sealed clip's text on arrival, cap only what the film sends
Studio now takes a clip's text from the film's message only when every field is
text within the film's limits; otherwise the clip keeps its row without words.
The 200-character limit applies to the film's message alone, so an open
preview's own rows keep their full words as before.
* test(parsers): a tab in a concat list path is kept
* fix(parsers): refuse only what ends a concat list line, so a tab in a folder name renders
* test(parsers): a real ffmpeg join keeps every clip under a tab-named folder
* test(parsers): end ffprobe options before the joined file in the tab join test
Layering walked the whole host data-variable-values map and the whole render
overrides map for every declarer and every composition id, so many declarers
that emit nothing were never charged to the size budget. Each declarer now
walks only its own declared ids, and a host's overlap with the overrides is
computed once per host. Output is unchanged except that names inherited from
Object.prototype are no longer treated as declared.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* test: a concat list refuses paths whose folder name holds a line break
* fix(engine): write every concat list through one writer that refuses control characters
* test: name the line-break folders without slashes; skip them on Windows
* Revert "fix(engine): write every concat list through one writer that refuses control characters"
This reverts commit 97d482340a.
* Reapply "fix(engine): write every concat list through one writer that refuses control characters"
This reverts commit 7d723fd276.
* test(engine): a chunk concat list ends with a newline
* fix(producer): raise the sub-composition expansion limit to 64 MB
A render may now inline up to 64 MB of composition HTML across its mounts,
four times the 16 MB per-file limit, so a project with several large
distinct scenes is no longer refused.
* test(producer): size the generated-output tests from the expansion limit
Four size-limit tests used fixed counts that only exceed the current
32 MB expansion limit. Compute each count from
MAX_EXPANDED_COMPOSITION_BYTES so the tests keep reaching the limit if
it changes.
* test(studio): a sealed preview keeps its loading overlay while media buffers
* fix(studio): a sealed preview's loading overlay waits for its media through the editing port
* fix(studio): Studio never calls a preview ready before its asset check has answered
* refactor(studio): the preview asset wait lives outside the Player component
* refactor(studio): the preview asset wait moves to its own file, out of the Player
* refactor(studio): one asset-wait state; a sealed frame's first check is its own value
* fix(studio): a sealed preview's missing asset answer is asked again, never taken as ready
* fix(studio): a closed preview frees its editing-port client
* style(studio): keep the client comment under the line limit
* fix(cli): a project .env provider key gives way only in a received project
Your own or a cloned project's .env provider keys are used as set again, as
the docs describe. Capture no longer drops a project .env vision key next to
a shell credential, and the audio scripts no longer drop an own project's
Gemini key next to the shell's other Gemini key. A received project's keys
still give way to your own credential, and the notes that name a project
key when it is used stay.
* test(cli): check the note for a cloned project's key; say when a received key is ignored
* fix(studio): a sealed preview keeps Studio's size, move and turn edits after a seek
* fix(studio): a sealed preview reapplies Studio's edits on each frame it seeks or plays to
* fix(studio): build the sealed reapply script from constants, never a caller's value
* fix(studio): a sealed preview reapplies Studio's edits after a redraw at the same time
* fix(studio): serve the seek reapply only into sealed preview documents
* chore(core): shorten the redraw count's doc line
Capture's image captioner can now authenticate to Vertex AI with
HYPERFRAMES_VERTEX_PROJECT_ID plus HYPERFRAMES_VERTEX_ACCESS_TOKEN, as an
alternative to a service-account JSON. A caller that mints a short-lived
token per run no longer has to hand the CLI a long-lived key. The token is
used as given and never refreshed; when both are set, the token is used.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(studio): a script edit re-runs in place in a sealed preview, without a reload
* fix(studio): a sealed timing edit takes the saved clip and film timing along with its soft reload
* test(studio): the sealed timing test checks a soft reload was sent before reading it
* refactor(studio): the sealed soft reload code passes the quality audit without suppressions
* chore(core): core's size budget makes room for the sealed preview's frame-side editing code
Main already measured 1,841,737 bytes packed against a 1,830,000 budget; the sealed soft reload brings it to 1,855,277. Budgets follow SIZE_BUDGET_HEADROOM: ceil(1,855,277 x 1.05) packed, ceil(4,665,659 x 1.05) unpacked.
* fix(core): a sealed timing edit is not skipped when a nested file's root repeats a clip's id