Commit Graph
726 Commits
Author SHA1 Message Date
Miguel Ángel 124591a9d5 fix(lint): flag a script that calls gsap before GSAP loads, and say so when a render fails on it (#7514)
* fix(lint): flag a script that calls gsap before GSAP loads, and say so when a render fails on it

* fix(lint): judge the first gsap call by when it runs, so a listener after a deferred GSAP passes

* fix(lint): keep the gsap timing helper's comment to two lines
2026-11-10 21:46:26 +00:00
Michael WangandClaude Opus 5.5 60fb9d2c5e fix(producer,engine): harden render paths, render slots and local listeners (#7508)
* fix(producer): build the render job before taking a render slot

A request whose options fail the strict render-request validator now gets
a 400 on both the blocking and streaming routes, and its inline project
directory is removed. Validate workers up front like the other overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(producer): write compiled sub-compositions only inside the compiled directory

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): keep media work files inside their directory for any element id

Map a media element id to one plain path segment before it names a frame
directory or an intermediate audio file. Ids that already are one plain
segment map to themselves, so existing paths stay the same; the producer
and the distributed plan derive the same segment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): listen on loopback by default in the engine file server

The file server feeds the co-located capture browser, which loads it from
localhost. A caller that wants another interface passes hostname.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(producer): refuse cross-origin browser posts to the standalone render server

A web page on another origin can no longer start a render or lint through
the server's POST routes. Requests without an Origin header (CLI tools,
server-to-server callers) and same-origin pages are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(engine): trim comments on the media path segment and file server host

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(producer): trust the browser's Sec-Fetch-Site verdict for render server posts

A same-origin page behind a reverse proxy that rewrites the Host header sent an
Origin that no longer matched Host, so the cross-origin guard refused it. The
guard now uses Sec-Fetch-Site when the browser sends it and falls back to the
Origin and Host comparison only for browsers that do not.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(engine): keep generated media path names apart from plain ids and within filename limits

A plain media id that already ends like a generated name now takes the hashed
branch too, so it can no longer share frame folders or audio work files with
the unsafe id that produced that name. The readable part of a generated name
is capped at 64 UTF-8 bytes before the digest, so long or multibyte ids that
contain separators stay within the 255-byte filename limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 20:26:24 +00:00
Miguel Ángel 1a758fd60f test(engine): split the frame extractor tests so each file stays under the flake gate budget (#7476)
* test(engine): split the frame extractor tests so each file stays under the flake gate budget

* test(engine): cut the comments the frame extractor test split carried over
2026-11-10 03:19:15 +00:00
Miguel Ángel 235c80bae0 fix(engine): a video clip shows a new source frame on every frame it is on screen (#7471)
* fix(engine): a clip shows a new source frame on every output frame it covers

* refactor(engine): shorten the frame count doc to two lines

* style(engine): collapse the single-pass ffmpeg call the formatter wants on one line
2026-11-10 02:16:59 +00:00
Miguel Ángel 4d0fa2baa8 fix(engine): short clips from Apple-encoded videos keep their last frame (#7469)
* fix(engine): short clips from Apple-encoded videos keep their last frame

* refactor(engine): name the end-of-source hold and frame bound instead of commenting them

* fix(engine): frame ranges past a source's end stay empty with the held final frame

* test(engine): move the final-frame test into its own file
2026-11-10 01:38:38 +00:00
Vance IngallsandClaude Sonnet 5.5 7bf19ab5f9 test(engine): nightly motion blur run over generated compositions (#7437)
* test(engine): nightly motion blur run over generated compositions

A seeded generator of text-free compositions combines 19 features (nested
canvas, overflow, clip path, scroll container, callbacks, a last-child rule)
and checks the two pixel invariants on auto: outside the trail at two holds
and at a moving time, inside the trail at a moving time. The runtime lane
runs seeds 1 to 3; motion-blur-nightly.yml runs 200 a day on the Chrome 153
pin and on stable, and opens one issue per failing seed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): the nightly records every failure, ignores noisy references, caps its issues

A crash, a timeout or a launch failure is recorded before the job goes red; a
failing check whose blur-off reference disagrees with itself is reported as
unstable instead of failing; the report job moves into a tested script that
fetches open titles once, caps first, and opens one systemic issue above 5 seeds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): the nightly report resists injected failure text and keeps a crashed leg's record

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(engine): nightly report escapes backslashes, test strips tags to a fixpoint

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:37:26 +00:00
Miguel Ángel b59fa20833 fix(cli): staging folders beside a project path no longer fail past 260 characters on Windows (#7338)
* fix(cli): staging folders beside a project path no longer fail past 260 characters on Windows

mkdtemp does not get the long-path prefix that mkdir does, so every staging folder
made beside a project or output path failed once its full path passed 260 characters.
They now come from one helper, createStagingDir in @hyperframes/core/atomic-file, and a
scan test fails on a new mkdtemp beside a path.

* fix(cli): give mkdtemp the long-path form instead of replacing it

CodeQL treats mkdtemp as the safe way to make a folder under the system temp dir and
flagged every file written into a folder from the mkdir-based helper. createStagingDir
now calls mkdtemp with the long-path form of the path on Windows, so both hold.

* fix(cli): leave non-Windows paths alone when making a staging folder

The long-path form is now chosen by the shape of the path, not process.platform,
so tests that pretend to be Windows keep working and the comment share does not rise.

* fix(core): a staging folder keeps a Windows path that already names its namespace

* fix(core): a staging folder keeps a Windows device path as the caller gave it

* fix(core): the staging folder helper's comment fits the line limit
2026-11-09 17:16:08 +00:00
Miguel Ángel c9fe041504 test(engine): drive the empty-screenshot probe test with fake timers (#7000) 2026-11-09 16:31:08 +00:00
Miguel Ángel 0f5914dc44 test(engine): the decode timeout warning reaches every caller (#7119) 2026-11-08 05:46:05 +00:00
Miguel Ángel adf14d7324 feat(engine): a failed CDN script's report names its library and version, never its URL (#7394) 2026-11-08 03:03:07 +00:00
Miguel Ángel b559a98d37 fix(engine): hlg footage with a large header sei also tone-maps at hlg's white (#7349)
* fix(engine): hlg footage with a large header sei also tone-maps at hlg's white

* fix(engine): say in the read's own doc line why it streams

* test(engine): the header-SEI HLG fixture encodes without b-frames, so it muxes on windows
2026-11-07 21:46:28 +00:00
Miguel Ángel 59c2065d63 fix(producer): page timers during a render run on film time (#7362)
* fix(producer): page timers during a render run on film time

* test(producer): a regression film whose timer bars must follow film time

* test(producer): schedule the timers regression film in CI shards

* fix(producer): keep setup timers on the wall clock until the page reports ready

* fix(producer): keep the renderer's own waits and deadlines on the wall clock

* test(engine): fail CI on a bare timer in code the engine runs in the page

* fix(core): type the wall-clock timers like the global timers they replace

* chore(engine): drop the comment on the shim's window type
2026-11-07 18:06:55 +00:00
Miguel Ángel ca64c2a6d3 refactor(engine): the effect scan resolves its options before scanning (#7336) 2026-11-06 22:04:48 +00:00
Miguel Ángel cfa0d0cef9 fix(engine): a missing frame file skips its self-verify sample instead of aborting the render (#7334) 2026-11-06 20:45:36 +00:00
Miguel Ángel fe0f54b38c fix(producer): a failure before the first frame reports frame capture as its stage (#7331)
* fix(producer): a failure before the first frame reports frame capture as its stage

* fix(producer): a failure after the effect scan reports frame capture, with a stable code
2026-11-06 20:17:00 +00:00
Miguel Ángel a9a8d89377 fix(engine): a render no longer finishes without an image that loaded late (#7304)
* fix(engine): a render no longer finishes without an image that loaded late

* style(engine): format the frame gate

* fix(engine): an image outside the frame no longer stops a render

* fix(engine): a render stops and warns when a frame's image never arrives, with no cloud retries

* fix(producer): a cloud chunk keeps the missing image's error name so retries stop
2026-11-06 20:11:01 +00:00
Vance IngallsandClaude Opus 5.5 18fc75dcd7 fix(engine): drawElement falls back on gpu-less linux and beginframe launches instead of hanging self-verify (#7324)
* fix(engine): a gpu-less linux host falls back from drawElement instead of hanging self-verify

On a GPU-less Linux headless shell asked for browserGpuMode "hardware", Chrome has
GPU args and no GPU, so getContext("webgl") returns null. detectGpuBackend read that
as { isSwiftShader: false }, the SwiftShader gate let drawElement engage on a
BeginFrame-launched browser, and self-verify on its truth page then stalled until
the render failed after about 300 s, with no fallback.

drawElementGate now decides the init-time fallback, each with a named deGateReason:

- swiftshader: any software GL (SwiftShader, llvmpipe, lavapipe, softpipe, Microsoft
  Basic Render Driver), from one shared token list. Detection on real GPUs is unchanged.
- webgl_unavailable: no WebGL context could be created (null, or getContext throws).
- beginframe_no_self_verify: the browser was launched for BeginFrame. Its self-verify
  truth page has no BeginFrame driver, so drawElement frames could not be checked, and
  a Linux host with a GPU would stall the same way. HF_FORCE_DRAWELEMENT bypasses only
  this gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(producer): windowed frames runs drawElement through self-verify and a recycle

Adds a drawElement case to the windowed-frames integration test: drawElement capture,
self-verify through the on-demand hook, and a browser recycle. It covers that hook
only on a macOS or Windows host with a GPU. Linux always gates drawElement away
(headless-shell launches for BeginFrame, which has no self-verify), and so does any
host with no GPU; there the case asserts the named gate fallback (swiftshader,
webgl_unavailable or beginframe_no_self_verify) and prints that drawElement did not
run. HF_TEST_REQUIRE_DRAWELEMENT=1 turns that fallback into a failure, for the hosts
that are meant to run it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 08:59:04 -08:00
Vance IngallsandClaude Sonnet 5.5 a874a6324a feat(core): motion blur reports what a composition holds, as counts (#7306)
* feat(core): motion blur reports what a composition holds, as counts

The runtime scans a composition once per blur scan, on both tiers, and reports
counts of what it holds (canvases, video, frames, custom elements, clips, masks,
scroll containers, 3D, blend modes, and movers that overflow, sit under other
content, hold fixed children or carry pseudo-elements outside their box), plus
whether pose reads need callbacks. Counts only: no ids, classes, text or URLs.

The engine puts the non-zero counts on its [motion-blur] line and hands the
parsed report to the perf summary; the producer aggregates workers (first report
wins, failed frames sum) and the CLI sends motion_blur_* properties on
render_complete, from the CLI and from Studio renders.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(cli): disclose blur counts in telemetry docs, raise inspector budget

The runtime fingerprint code is bundled into @hyperframes/inspector, which
puts its unpacked size 2.2 KB past the 1% tolerance. The telemetry docs now
list the composition counts the CLI sends with a blur render.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 15:03:34 +00:00
Vance IngallsandClaude Sonnet 5.5 07824098e9 test(engine): blur gates fail on CI when they cannot run, and prove blur drew (#7302)
* test(engine): blur browser tests fail on CI when their browser cannot run

On CI a missing Chrome, a missing core runtime build or a Chrome without drawElementImage
fails the suite's beforeAll instead of skipping every case. Off CI the suites still skip.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): every inside-the-trail case proves blur drew, not only held-card

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): the liveness test watches held-card through its slide-out

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(producer): stateful-callback joins the multi-worker blur render, split across five suites

The render differential's suite moves into __test_utils__/blurRender.ts and five files run it
over one or two fixtures each, so none nears the flake gate's 120 s cap. Every fixture that
moves must now blur more than insideMaxMae, not only held-card, and CI fails instead of
skipping when ffmpeg is missing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(producer): each blur render file imports its runner so the test classification reads it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 09:49:18 +00:00
Vance IngallsandClaude Sonnet 5.5 e2bb7da25d feat(core): auto motion blur draws with the filter tier (#7288)
* feat(core): auto motion blur draws with the filter tier

Capture stays available as data-motion-blur-tier="capture". auto now draws with the
filter tier (reasonCode tier-auto), so the capture-only defects leave the default path.
Removes the translation-only hand-off and its Discovery field, adds a filter arm to the
differential, and updates the check, guide, skill and Blur panel label.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(core): measured cost and known limits of the filter tier, the new auto default

spacex-launch (77 movers) takes 2.9x the CPU of no blur on the filter tier and 1.7x on
capture; say so, and list the filter tier's measured limits (sweep D, E, F, I, O, B).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(core): word the filter tier's cost and limits as measured, not as mechanism

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(core): do not say every filter-tier limit is pinned by a sweep test

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): split the blur differential so each file fits the flake gate's 120 s run

The filter arm moves to its own file and skips fixtures that already draw with the filter
tier; inside cases get their own file; a fixture's blur-off page is opened once per file.
Shared helpers live in __fixtures__/motionBlur/differentialPage.ts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 05:27:36 +00:00
Vance IngallsandClaude Sonnet 5.5 4bee04e4a1 fix(core): a mover's ::before and ::after outside its box stay in the blur (#7295)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 05:07:56 +00:00
Vance IngallsandClaude Sonnet 5.5 b6f2bec165 fix(core): a mover holding a fixed child stays sharp in the filter tier (#7292)
* fix(core): a mover holding a fixed child stays sharp in the filter tier

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(core): a fixed-child mover is skipped only on frames it is not already a containing block

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 05:07:48 +00:00
Vance IngallsandClaude Sonnet 5.5 2066a2ff54 fix(core): the filter tier's svg no longer changes which child is last in the root (#7293)
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 04:33:20 +00:00
Vance IngallsandClaude Sonnet 5.5 cd7e93baa0 fix(core): blur quiets discrete callbacks instead of undoing what they wrote (#7271)
* fix(core): blur quiets discrete callbacks instead of undoing what they wrote

#7191 undid the DOM a callback wrote during the blur scan with a mutation journal. That
regressed once-guarded and memoized timeline callbacks: the callback ran, its guard flipped,
and the journal put the DOM back, so the real seek never wrote it again.

Mute GSAP's onStart, onComplete, onReverseComplete and onRepeat for the scan and for eventful
pose reads, then restore them. onUpdate keeps firing, so movers driven from it are still found.
muteDiscreteCallbacks replaces a callback with a no-op rather than clearing it
(hasZeroDurationCallbackTween reads typeof vars.onComplete), walks tween.timeline for staggers
and keyframes, and skips an animation already muted because scene timelines nest in the root.
The journal (journalDom, landThenUndoDom, putBack) is deleted. The loud rewind through 0 stays.

Measured in the spike (mute-spike-report.md, "Probe matrix and fresh worker"): every GSAP
pattern matches blur off in label and fire count; 8 of 300 comparisons differ, all the non-GSAP
row, against 248 of 300 on main. This supersedes the limit #7191 accepted. Mute and restore over
2002 animations is 0.2 ms.

Limits:
- A mover that exists only because a muted callback set it up is found only if that callback
  fired before the scan. A worker starting before the call leaves that mover sharp while a later
  worker blurs it; positions stay right.
- tl.call(() => gsap.to(...)) movers are never found and stay sharp.
- A non-GSAP adapter that ignores suppressEvents (adapters/animejs.ts) and writes DOM on a
  once-only completion shows it early. Pinned by a KNOWN LIMIT test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(producer): drop the once-guard-label block-start guard that pins a block that cannot fail

The guard required a block start in [1, 15], the worker at frame 9, and the comment said it
paints on both sides of the call at 16. Its frames after the call (16, 17) sit inside the
trail mask at the label, so that block cannot show the bug. The outside-the-trail case on the
7-worker partition is what catches the mutant; the fixture stays in FIXTURE_NAMES.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): split the callbacks matrix in three and share one blur-off run per row

The matrix file took 247 s on an idle Mac and timed out at the flake gate's 120 s in all 10 reruns.
Each row now compares the arms against one blur-off page painted in order and one fresh page, not
a new blur-off page per arm and sequence; the in-order sequence is the first paints of the page that
goes back to the first time; rows run their pages together; the paint skips the full-frame PNG that
only the pixel tests read. Only the two arms with an onUpdate mover stay (both tiers): they run the
scan's mute and the per-frame mute, which the arms without a mover do not.

The rows and harness move to __fixtures__/motionBlur/callbackRows.ts and the matrix is split over
three files so each run fits the gate. Rows a to y, the three sequences, both tiers, row y and the
KNOWN LIMIT test are all kept; no assertion changed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 04:15:22 +00:00
Miguel Ángel 7290ee68c3 fix(engine): name a failed script's origin and error before the free text of its warning (#7256) 2026-11-05 18:51:19 +00:00
Miguel Ángel 5ee9e928d5 fix(core): hlg footage tone-maps to sdr at the bt.2408 reference white (#7234)
* fix(core): hlg footage tone-maps to sdr at the bt.2408 reference white

* fix(core): an HLG clip whose stream leaves its transfer unset keeps HLG's white

An SPS with an unspecified transfer takes the stream's tag, as its frames do; a failed keyframe read is not cached; the grey test needs ffmpeg 8.
2026-11-05 13:04:56 +00:00
Miguel Ángel 2af37ac0c3 fix(engine): read a video's length from its packets when headers state none (#7233)
* fix(engine): read a video's length from its packets when its headers state none

* fix(engine): ignore the cut first line of a long packet scan and count N/A as a frame

* chore(engine): trim the packet scan comments and put its doc back on the function

* style(engine): format the packet duration test
2026-11-05 11:53:45 +00:00
Miguel Ángel 659ef568d7 fix(producer): export sizes an unsized phone video as it plays, not as stored (#7228)
* fix(producer): export sizes an unsized phone video as it plays, not as stored

* fix(engine): keep the stored-size check on the video layer path
2026-11-05 09:35:36 +00:00
James RussoandClaude Opus 5.5 b98718fe93 fix(engine): report a pending setup as a setup timeout, not zero duration (#7211)
* fix(engine): headline a pending setup as a setup timeout, not zero duration

When the runtime never reaches render-ready, __hf.duration reads 0 because
the bridge masks it, so pollHfReady's timeout reported "Composition has zero
duration" even for compositions with a declared data-duration whose
window.__hf.buildReady promise was still pending. Headline that case as
"Composition setup did not finish within <timeout>ms", skip the duration
inference hint that cannot apply yet, and note that the render clock stays
at 0 until the first frame. Keep its transient retry classification and give
it its own CLI diagnostic code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(engine): name animation frames in the setup-timeout hint

Setup that awaits requestAnimationFrame hits the same render-clock rule as
setup that waits on Date or performance.now: frames only fire on a seek, and
the first seek waits for setup. Say so, and point at the waits that work.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(engine): stop suggesting scheduler.yield() for setup waits

Chrome runs scheduler.yield() continuations ahead of ordinary tasks, so a
setup loop that polls with it starves the setTimeout-driven work it waits on
(Three's compileAsync polls with setTimeout(10)) and never finishes. Plain
headless Chrome 152 hangs on a ten-line page that does exactly that. Point
authors at setTimeout and say why yield-polling does not work.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(engine): point setup waits at the library's readiness promise

HyperFrames guidance is no system timers, so the hint should not tell authors
to wait with setTimeout. Point them at the library's own readiness promise
(Three.js renderer.compileAsync) and keep the warning about scheduler.yield()
polling loops.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(engine): keep the setup-timeout hint to what it can diagnose

A scheduler.yield() polling loop starves the page, so the readiness poll never
returns and the render reports a capture stall instead of this message. Drop
that sentence; the hint covers animation-frame and clock waits only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-05 07:41:04 +00:00
Vance IngallsandClaude Sonnet 5.5 898d0fb00b fix(core): blur scan and eventful reads put back the DOM a timeline call changed (#7191)
* fix(core): blur scan and eventful reads put back the DOM a timeline call changed

With data-motion-blur-events on, the mover scan runs the timeline to the end with
callbacks on and rewinds with callbacks on. GSAP fires a tl.call on a backward
crossing too, so the rewind left the earliest call's DOM effect in place: the
callbacks fixture showed label "B" from frame 0, before its 0.5 s call.

Calls cannot be un-fired, so the scan (and eventful per-frame reads) now journal
DOM mutations with a MutationObserver, land on the frame with callbacks on as
before (keeping JS-side call parity), then undo the journal back to the
pre-scan DOM, which is what a plain seek to the frame produced.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine,producer): callbacks label-early pins become ordinary outside cases

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* perf(core): the DOM undo skips attributes and text already back at their old value

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 06:38:51 +00:00
James RussoandClaude Opus 5.5 f3e5b81dfe test(engine): pin the motion blur sweep defects A to O by their symptoms (#7149)
Adds 13 text-free fixtures from the 60-composition capture motion blur
sweep and one test per defect, each pinned by its current symptom so it
fails once the fix lands. Pins use the existing outside and inside
invariants where they see the defect, and a second check against the
engine's 32-sample sub-frame blur where they do not (E, J, K, M).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-05 04:59:48 +00:00
Vance IngallsandClaude Sonnet 5.5 aa34cffe4b fix(core): a scrolled list keeps its offset when blur moves the root (#7190)
* fix(core): a scrolled list keeps its offset when blur moves the root

Chrome resets a scrolled container's offset when the root leaves or enters the
document, so the first blurred frame of a fresh page or render worker drew the
list at offset 0. Offsets are read at move time and put back before the re-seek,
so a container that became scrollable after the scan is covered too.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): scroll-list is an ordinary outside case, not a pinned known bug

The scroll offset now survives the root's move, so the three engine differential
cases and the multi-worker render case expect blur on to equal blur off, and the
measured constants for the old symptom go.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* chore(core): drop the scroll-offset comment, the comment-share ratchet may only fall

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 04:59:44 +00:00
Miguel Ángel 73e65e2c78 fix(engine): a background image that never finishes decoding no longer stalls the frame (#6972)
* fix(engine): a background image that never finishes decoding no longer stalls the frame

* fix(engine): capture tolerates a page that returns no list of late background images

* fix(engine): a background decode timeout is reported at every caller, url redacted

* fix(engine): a relative background url keeps only its path in the decode timeout report
2026-11-04 20:41:50 +00:00
WaterrrForeverandClaude Opus 5.5 d4e4b07e3c fix(cli): a wedged render trips its 60 s watchdog, one local render at a time, and fonts the cloud can't resolve are flagged (#7168)
* fix(producer): a wedged effect scan or screenshot-session open trips the 60 s stall watchdog

The sequential streaming watchdog raced only the capture call. Session init
(where the fast-capture effect scan runs) and opening the screenshot session
for effect frames waited on CDP's protocol timeout instead, which scales with
output area up to 30 minutes, so a starved page hung a render for ~25 minutes
before the watchdog saw the next frame. The effect scan now gives up when a
chunk outlasts its 120 s budget, opening the effect-frame session gets its own
no-progress window, and session init gets a 300 s one; each trip retries on a
fresh session like any other stall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(cli): one local render at a time per machine; a second waits and says for whom

Renders started side by side from different sessions starve each other until
frames stop landing. `hyperframes render` now takes a machine-wide slot (a lock
file in the HyperFrames cache directory, held by pid) after its preflight and
holds it for the render or the whole batch. A second render waits and prints
the pid and project it is waiting behind; `--no-wait` fails at once instead.
A holder whose process is gone is taken over, and HYPERFRAMES_RENDER_LOCK=off
restores side-by-side renders. `--workers` is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(lint): flag fonts a cloud render cannot resolve, including the font shorthand

Lint read only `font-family`, so `font: 500 16px "PingFang SC", sans-serif`
passed while the renderer, which reads the shorthand too, drew the installed
Mac font locally and the cloud refused it. The shorthand now counts for
font_family_without_font_face (its parser moves to @hyperframes/parsers so
core and lint share one), and a new font_face_local_only warning names an
@font-face whose only sources are local(): it renders here and falls back in
the cloud. The rule's hint and the format reference stop recommending local()
for OS fonts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): a cloud render that refuses a font says which project files use it

The cloud's "fonts that could not be resolved: PingFang SC" named no
composition. For a render submitted from a local project, the failure now
lists each refused family with the project files that name it, and says how
to ship the font so the cloud can use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(cli): keep comment shares and exports within the gates, and split the single-render notes out of executeHeldRender

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(parsers): read a spaced line-height slash and var() before the size in the font shorthand

`font: 16px / 1.5 Inter` was read as the family `/ 1.5 Inter`, and
`font: var(--weight) 16px Inter` as `16px Inter`, because a var() counted as
the size. The parser now follows the shorthand grammar: optional style,
variant, weight and width keywords (or var()), then a length, percentage,
keyword or calc() size, then a `/ line-height` in any spacing. When no size can
be told apart from a var(), it says so: lint skips that declaration instead of
reporting a missing font, and the renderer keeps its best guess.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): say the render slot is one per user account, not per machine

The lock lives in the account's HyperFrames cache folder, so renders by two
user accounts never queued behind each other while the messages, flag help and
docs said "this machine". They now say "per user account" and that
HYPERFRAMES_CACHE_DIR set to a shared folder shares the slot across accounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): reclaim a render lock or takeover file left half-written

A lock or `.break` file that exists but cannot be parsed (a crash mid-write
where hard links are unavailable) was never reclaimed: a waiting render waited
forever and --no-wait refused forever. Once such a file is older than any real
write (5 s by mtime) it counts as abandoned: the lock goes through the same
`.break` takeover as a dead holder's, and a takeover file is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(producer): opening the capture session counts against the setup stall budget

The sequential streaming attempt opened its own capture session (Chrome launch
and new page) before the setup watchdog and outside the attempt's cleanup, so a
wedged launch still waited for the protocol timeout. Opening now shares the
300 s setup window with session initialisation, a trip fails the attempt like
any other sequential stall, and a session that finishes opening after its
attempt gave up is closed instead of leaking a browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(parsers): keep the shorthand result type module-private

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): reclaim an unreadable render lock only when its writer is provably gone

Where hard links are unavailable the lock is created by an exclusive open and
then written, so a contender paused between the two leaves an unreadable lock
while it is still alive. The 5 s mtime grace took such a lock over, and both
processes then held the slot. Each contender now writes an owner marker under
a name only it can take (pid plus random suffix, holding its process identity)
before it creates the lock, keeps it while it holds the slot, and removes it
otherwise. An unreadable lock or `.break` is reclaimed only when no other
contender's marker belongs to a live process; markers of dead processes, or of
a reused pid, are deleted. No reclaim is decided by time alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor: split acquireRenderLock and the streaming-stage session stub under the complexity gate

acquireRenderLock hands contender setup and a single marked claim to their own
functions, and the test stub for createCaptureSession splits its held-open
cases from the fake session it builds, so neither exceeds Fallow's cognitive
or CRAP thresholds. Behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ci): raise the CLI and engine size budgets for the watchdog, lock and font-lint additions

Main's CLI unpacked size was already ~0.99% over its budget; the render lock and
owner markers push it past the 1% tolerance. The CLI unpacked budget takes the same
value as #7169 and #7170 (25,159,107) so the PRs merge cleanly. The engine's packed
size grows by about 4.7 KB for the effect-scan and session-open watchdogs; its packed
budget moves to 5% above the measured 467,097, as the budget file's headroom rule sets it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(parsers): a var() size glued to its line height is the shorthand's size

`font: 700 var(--size)/1.1 "Inter"` read as no family at all: the token was
tested whole against var(), and the slash after it hid that it was the size,
so the renderer injected no face for Inter. A var() followed by `/ line-height`
(glued or spaced) can only be the size, and is now read as one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(parsers): split the shorthand size search out of parseFontShorthand

Keeps parseFontShorthand under Fallow's cognitive-complexity gate; behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(cli): render lock never removes another render's takeover, knows a reused pid, works in a shared folder and on Windows

- A `.break` takeover file is removed only by the render that wrote it. One
  whose writer is gone stops the render with the file to delete, instead of
  being removed on an earlier reading, which could remove a live `.break`
  written since and let two renders hold the slot. The takeover re-reads the
  lock under its own `.break` right before replacing it.
- The lock record keeps its holder's process start time, so a pid that now
  belongs to another process (an OOM-killed render in a container with a
  persisted cache) no longer holds the slot forever.
- The `locks` folder is created writable for every account, so accounts
  sharing HYPERFRAMES_CACHE_DIR take turns instead of the second failing with
  EACCES; a folder this account cannot write in says how to fix it, and
  another account's file that cannot be removed is left, not fatal.
- Windows: no PowerShell start-time lookup per check (pid liveness only), a
  file another handle holds (EPERM/EBUSY/EACCES) reads as held, a lock that
  vanished is retried once instead of in a tight loop, and a wait stops when
  its signal aborts. The tests end every acquire they start before removing
  their folder, and the paused contender writes through its open descriptor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(ci): raise the lint packed size budget for the font-shorthand rule

With main's audio-attribute rule (#7169) merged in, the font-shorthand and
local()-only font findings take @hyperframes/lint's packed tarball to
181925 bytes, over the 179338 budget. The new budget is that measurement
plus the usual 5% headroom.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 18:41:56 +00:00
Vance IngallsandClaude Sonnet 5.5 d36cad7985 test(engine): pixel invariants and fixtures that guard default-on capture blur (#7108)
* test(engine): pixel invariants for capture blur against blur off

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): fixtures for every capture blur failure class seen so far

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): nested canvas fixture reproduces #6975, sharp-tile fixtures have no moving times

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): capture blur must match blur off outside the trail and the shutter average inside it

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): differential tests pin known bugs by symptom, history test checks the reference frame

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): a playing preview keeps changing with blur on

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(producer): a multi-worker blur render must match blur off outside the trail

Renders five blur fixtures through the real producer as a PNG sequence with 4
workers (contiguous blocks, three of them starting mid-film, the #6967
condition): blur off twice, blur on once. Outside the trail of everything that
moved, blur on must equal blur off in every frame with two neighbours. The
callbacks and scroll-list known differences are pinned by symptom.

Import route: a relative import of blurDifferential.ts, fixtures.ts and
thresholds.ts from packages/engine/src/services/__fixtures__. The producer
tsconfig excludes test files, so I type-checked the file with a temporary
tsconfig (rootDir widened); no error. No package subpath was needed.

RENDER_OUTSIDE_MAX_MAE: render noise is 0 (blur off, twice, bit-identical), the
rewind mutation measured 111.085 when caught, so the 1.0 floor applies.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(producer): render callbacks with workers that start between its calls

With 4 workers the blocks started at 0, 15, 30, 45, each on a call, so the
rewind mutation showed in a render only 3 times in 5. Seven workers over 60
frames start at 0, 9, 18, 27, 36, 45 and 54, two of them strictly between the
calls at frames 16 and 30; the mutation then fails callbacks in 8 of 8 runs
(worst MAE 97.02), the clean build in none.

A new case checks the partition with distributeFrames. The #list and #label
rects now come from the fixture's markup, and MEASURED_RENDER_REWIND_MUTATION
is 97.02.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): blur pins bound the symptom, liveness detector reports blindness, fixtures time out

Pinned known bugs now require every bad tile inside the pinned region and a worst
MAE within half to double of the measured one. tileTouches, Rect and the band check
move into blurDifferential.ts with a dpr 2 unit test. The blank-frame census counts
canvases it cannot read and asserts none, and names both readings when no blank frame
is seen. No console.info on passing runs. Fixtures cases get a 30 s timeout.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(producer): scroll-list render case bounds the race, pins share the engine helpers

The scroll-list loss depends on timing per worker block, so the case now requires
frames 2..27 clean and any later bad tile inside #list, without requiring the loss.
The callbacks pin keeps requiring its symptom, bounds it to the label and to half to
double of its measured size, and its message names the entry to delete. Wording says
multi-worker, not 4-worker.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* build(engine): keep the blur test helpers out of the published tarball

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): print the worst outside tile of each arm to explain the CI text diff

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test: both arms draw grayscale text so host subpixel settings are not read as blur

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(producer): run the multi-worker blur render alone so it cannot skew other Chrome tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test: re-pin the producer lane runner after splitting out the heavy blur render

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): read the blank-frame pin from a wrap observer, not an animation frame poll

The pin sampled in requestAnimationFrame, so it could miss the gap between the
wrap and the first draw. A MutationObserver now reads the output canvas the
moment the root is wrapped, which is deterministic, and every fixture must
report a wrapped root.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test(engine): drop the blurs field no fixture could set to false

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* ci: give the flake gate 60 minutes, it budgets runs by file count not time

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 17:55:07 +00:00
Miguel Ángel ac1948a88b fix(engine): a full disk during frame extraction says so, not that the video is broken (#7161)
* fix(engine): a full disk during frame extraction says so, not that the video is broken

* fix(engine): a pass that filled the disk is not decoded again in software
2026-11-04 14:45:56 +00:00
Miguel Ángel 67d11c0a5c fix(engine): a script the page cancelled is not a failed load (#7093) 2026-11-03 15:00:39 +00:00
Miguel Ángel dec465949b feat(engine): a script-load failure names where the script came from and why it failed (#7088)
* feat(engine): a script-load failure names where the script came from and why it failed

* fix(engine): keep the script-load cause helpers private and within the engine size budget
2026-11-03 13:54:20 +00:00
James RussoandClaude Opus 5.5 112ba53302 fix(studio): motion blur falls back for a WebGL canvas Studio reaches first (#7060)
* fix(core): motion blur notices a WebGL canvas the Studio page touched first

When a same-origin host page (Studio) reaches a preview element before the
scene does, for example through a MutationObserver record, Chrome gives that
element the host's prototype. The scene's getContext("webgl") then ran the
host's unpatched getContext, so the canvas never reached the accelerated
canvas set, capture motion blur stayed on, and the WebGL canvas froze during
preview playback.

The tracker now records a canvas in the set of the canvas's own window, and
installs itself in a same-origin parent too, compiled with the parent's own
Function. Cross-origin parents are skipped.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(studio): track accelerated canvases in Studio's window, not the embedder's

The preview runtime no longer installs the canvas tracker in its parent
window. That ran on every preview boot, so any same-origin page embedding
the player got its getContext wrapped, and a host CSP without
unsafe-eval reported a violation on each load. Studio now installs the
tracker in its own window when its Player module loads, and core
exposes it at @hyperframes/core/page-motion-blur.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* chore: keep the comment share of the touched files from rising

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-11-03 03:59:23 +00:00
Miguel Ángel 81b93cf055 fix(cli): snapshot stops Chrome decoding videos it already replaces with extracted frames (#6949)
* fix(cli): snapshot stops Chrome decoding videos it already replaces with extracted frames

* fix(cli): a held video keeps its intrinsic size in snapshot, as in render

* fix(cli): shorten a comment line in the held-video hints
2026-11-03 01:14:27 +00:00
Miguel Ángel 3bb0a9a5b5 perf(engine): skip the screenshot on frames the page reports unchanged in beginframe capture (#7027)
* perf(engine): skip the screenshot on frames the page reports unchanged in beginframe capture

* fix(engine): beginframe reuse never returns a frame older than a cross-frame page change

* fix(engine): the BeginFrame reuse test gets a headless shell in the flake gate

* fix(ci): run the headless shell installer through its package

* fix(ci): install the headless shell with bunx, npx finds no bin in the workspace
2026-11-02 19:17:31 +00:00
Miguel Ángel 0bcd816d5b feat(engine): a chunk-fed encoder and the rule for which films may use it, off by default (#7029)
* feat(engine): a chunk-fed encoder and the rule for which films may use it, off by default

* test(engine): end the chunk encoder's ffprobe call with --
2026-11-02 17:53:57 +00:00
Miguel Ángel 6fd96ddd04 revert: stop releasing a WebGL context when its clip's window has ended (#7020) 2026-11-02 15:48:12 +00:00
Miguel Ángel 070780c695 fix(producer): a render stops when a capture session sees every composition script fail (#7009)
* fix(producer): a render stops when a capture session sees every composition script fail

* fix(producer): only capture workers decide a script failure; prep sessions stop without recording it

* fix(producer): a script failure in a capture worker still reports as the composition-script error

* style(producer): format the script-failure test
2026-11-02 15:46:50 +00:00
Jerrai 346f0e49fa feat(producer): report browser-computed reference backgrounds (#7007)
* feat(producer): report browser-computed reference backgrounds

Preserve one initial root/page reference across local, streamed and distributed
render results without guessing from film pixels.

— Jerrai

* fix(producer): preserve plan compatibility and optional inspection

Keep reference metadata outside the v2 manifest hash and read it from the
verified execution-plan artifact. Static planning uses a non-gating page
inspection instead of requiring render-worker capabilities.

— Jerrai

* fix(producer): poll readiness independently of animation frames

Use timed polling while the render clock parks animation frames. Cover readiness
that changes after the first check with a short real-browser regression.

— Jerrai

* fix(producer): budget measured reference metadata runtime growth

Producer adds 2,228 compressed bytes over current main. Tests, fixtures and source
maps are already absent from its dist-only tarball. Allow 7,766 bytes of headroom
above the verified 837,234-byte payload while retaining the unpacked limit.

— Jerrai
2026-11-02 14:42:18 +00:00
Miguel Ángel 26d6e3eef1 fix(engine): a scene that has ended gives up its WebGL context so the next scene is not slowed (#6984)
* fix(engine): a scene that has ended gives up its WebGL context so the next scene is not slowed

* build(engine): raise the engine package size budget for the WebGL release module

* chore(engine): shorten the WebGL release comment

* fix(engine): a scene gives up its WebGL context only when the runtime says its window ended

* chore(engine): drop a comment the type already says

* chore(engine): shorten a comment line
2026-11-02 07:50:16 +00:00
Miguel Ángel de6ec3811e fix: cache paths follow HYPERFRAMES_CACHE_DIR (#6716)
* fix: cache paths follow HYPERFRAMES_CACHE_DIR

Every place HyperFrames keeps downloaded or built files now takes its
folder from one helper, hyperframesCacheDir() in @hyperframes/core. The
default stays ~/.cache/hyperframes; HYPERFRAMES_CACHE_DIR moves it.

* fix: register the cache-dir subpath for bun and node, and build inspector from core source

* test: the cache-dir override test uses a folder that is absolute on every platform

* fix: the opencv cache follows HYPERFRAMES_CACHE_DIR

* fix(cli): npm installs run in their staging dir, so no cache path reaches a command line

* fix(cli): whisper.cpp is cloned inside its build dir, so no cache path is a git argument

* test(cli): the whisper clone test finds no system whisper on Windows either
2026-11-01 22:44:11 +00:00
Miguel Ángel d1d631f60a fix(producer): an export over the ceiling limits its peaks and keeps the mix's level (#6940) 2026-11-01 17:18:48 +00:00
Miguel Ángel 90f7fe624f fix(engine): GPU renders use the NVENC preset names the host's ffmpeg lists (#6930)
* fix(engine): GPU renders use the NVENC preset names the host's ffmpeg lists

* fix(engine): one ffmpeg stdout reader for encoder detection and preset listing

* ci(engine): raise the engine unpacked size budget for the NVENC preset reader
2026-11-01 15:46:57 +00:00
Miguel Ángel 9aaa3ae675 fix(engine): a video with no source no longer holds capture for 45 seconds (#6926) 2026-11-01 11:16:43 +00:00