Skip to content

Commit 2461869

Browse files
vanceingallsclaude
andcommitted
test(producer): the default tier blurs the same in chunks; docs agree distributed renders blur
Two files compare plan -> renderChunk -> assemble with the tier attribute removed, so `auto` (the filter tier) decides, against a whole render: held-card and callbacks (the muted-callback path). The skill's motion reference no longer says distributed renders are off. The rewritten R19 plan test gets 60 s for its three plan() calls. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent 3fe6e83 commit 2461869

7 files changed

Lines changed: 70 additions & 5 deletions

File tree

‎packages/producer/scripts/integration-tests.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
"src/services/vfxDeterminism.test.ts",
1111
"src/services/distributed/assemble.test.ts",
1212
"src/services/distributed/blurChunks.callbacks.integration.test.ts",
13+
"src/services/distributed/blurChunks.callbacksFilter.integration.test.ts",
1314
"src/services/distributed/blurChunks.configOff.integration.test.ts",
1415
"src/services/distributed/blurChunks.heldCard.integration.test.ts",
16+
"src/services/distributed/blurChunks.heldCardFilter.integration.test.ts",
1517
"src/services/distributed/blurChunks.onceGuardLabel.integration.test.ts",
1618
"src/services/distributed/blurChunks.scrollList.integration.test.ts",
1719
"src/services/distributed/chunkBoundary.test.ts",

‎packages/producer/src/services/distributed/__test_utils__/blurChunkRender.ts‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ export const fixtureNamed = (name: string): BlurFixture => {
3838
return f;
3939
};
4040

41+
/** The fixture with its `data-motion-blur-tier` removed, so `auto` itself picks the tier (the filter tier). */
42+
function withoutTierAttribute(f: BlurFixture): BlurFixture {
43+
const html = (blur: "on" | "off"): string => {
44+
const pinned = f.html(blur);
45+
const stripped = pinned.replace(/ data-motion-blur-tier="[a-z]+"/, "");
46+
if (blur === "on" && stripped === pinned) throw new Error(`${f.name} pins no tier to remove`);
47+
return stripped;
48+
};
49+
return { ...f, html };
50+
}
51+
4152
/** A scratch directory for the suite, whose fontconfig draws grayscale text so DOM glyphs and the capture canvas agree. */
4253
export function useBlurScratch(): () => string {
4354
let root = "";
@@ -187,8 +198,12 @@ export function expectEqualFrames(
187198
}
188199

189200
/** The frames of plan() -> renderChunk() -> assemble() with blur on equal a whole in-process render with blur on. */
190-
export async function expectChunksEqualWhole(root: string, name: string): Promise<void> {
191-
const f = fixtureNamed(name);
201+
export async function expectChunksEqualWhole(
202+
root: string,
203+
name: string,
204+
tier: "capture" | "auto" = "capture",
205+
): Promise<void> {
206+
const f = tier === "auto" ? withoutTierAttribute(fixtureNamed(name)) : fixtureNamed(name);
192207
const whole = await renderWhole(root, f, "on", WHOLE_WORKERS);
193208
const chunked = await renderChunked(root, f, "on", "chunked-on");
194209
expectEqualFrames(name, compareEveryFrame(whole, chunked));
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// The default tier through plan() -> renderChunk() -> assemble() on `callbacks`: with no
2+
// data-motion-blur-tier on the root, `auto` draws with the filter tier, and the frames a fan-out
3+
// assembles equal a whole in-process render's. Needs Chrome and ffmpeg: integration lane.
4+
5+
import { describe, it } from "vitest";
6+
import {
7+
expectChunksEqualWhole,
8+
HAS_FFMPEG,
9+
RENDER_TIMEOUT_MS,
10+
useBlurScratch,
11+
} from "./__test_utils__/blurChunkRender.js";
12+
13+
describe.skipIf(!HAS_FFMPEG)(
14+
"page motion blur in a distributed render, auto tier: callbacks",
15+
() => {
16+
const root = useBlurScratch();
17+
18+
it(
19+
"chunks of 20 frames assemble to the whole render's frames",
20+
() => expectChunksEqualWhole(root(), "callbacks", "auto"),
21+
RENDER_TIMEOUT_MS,
22+
);
23+
},
24+
);
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// The default tier through plan() -> renderChunk() -> assemble() on `held-card`: with no
2+
// data-motion-blur-tier on the root, `auto` draws with the filter tier, and the frames a fan-out
3+
// assembles equal a whole in-process render's. Needs Chrome and ffmpeg: integration lane.
4+
5+
import { describe, it } from "vitest";
6+
import {
7+
expectChunksEqualWhole,
8+
HAS_FFMPEG,
9+
RENDER_TIMEOUT_MS,
10+
useBlurScratch,
11+
} from "./__test_utils__/blurChunkRender.js";
12+
13+
describe.skipIf(!HAS_FFMPEG)(
14+
"page motion blur in a distributed render, auto tier: held-card",
15+
() => {
16+
const root = useBlurScratch();
17+
18+
it(
19+
"chunks of 20 frames assemble to the whole render's frames",
20+
() => expectChunksEqualWhole(root(), "held-card", "auto"),
21+
RENDER_TIMEOUT_MS,
22+
);
23+
},
24+
);

‎packages/producer/src/services/distributed/plan.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ describe("plan() and page motion blur (R19)", () => {
577577
expect(blurred).toEqual({ captureMode: "screenshot", forceScreenshot: true });
578578
expect(plain).toEqual({ captureMode: "beginframe", forceScreenshot: false });
579579
expect(await planCaptureMode(blur, "blur-config-off", "off")).toEqual(plain);
580-
}, 30_000);
580+
}, 60_000);
581581
});
582582

583583
describe("buildChunkSlices", () => {

‎skills-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"files": 2
77
},
88
"hyperframes": {
9-
"hash": "fcbd52e834332599",
9+
"hash": "bc11e3f30730d28b",
1010
"files": 78
1111
},
1212
"hyperframes-cli": {

‎skills/hyperframes/references/motion.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Measured frame by frame from the official HyperFrames launch films. These are defaults: a reference the person gave, or a Moment that does otherwise on purpose, wins for its own beat.
66

77
- **Moves**: a fast move takes 0.3–0.6 s and carries motion blur on its own ease, peaking at its fastest frame: 6–12 px on text-sized elements, 15–20 px full-frame, horizontal-only on a horizontal move. One move is one tween.
8-
- **Render-time blur**: for fast 2D movers, `data-motion-blur="on"` on the composition root smears them along their real path in preview and render (opt-in; also `data-motion-blur-shutter` for a longer smear, 360 is strong; `-events="on"` when the motion is set from a timeline callback such as a `render(t)` function). Suggest it when the person asks for blur or a filmic look and the piece moves fast. It draws with a per-element filter that works over WebGL and in any Chrome (cost varies by film; on two real films it cost more than capture) (spins and zooms soften rather than streak); `data-motion-blur-tier="capture"` opts into the truer capture, which loses anything in front of a mover and ignores blend modes. It is off only for HDR and distributed renders. Opt a subtree out with `data-motion-blur="off"`, e.g. a seam that already carries its own blur. After adding it run `hyperframes check`. Guide: /guides/motion-blur.
8+
- **Render-time blur**: for fast 2D movers, `data-motion-blur="on"` on the composition root smears them along their real path in preview and render (opt-in; also `data-motion-blur-shutter` for a longer smear, 360 is strong; `-events="on"` when the motion is set from a timeline callback such as a `render(t)` function). Suggest it when the person asks for blur or a filmic look and the piece moves fast. It draws with a per-element filter that works over WebGL and in any Chrome (cost varies by film; on two real films it cost more than capture) (spins and zooms soften rather than streak); `data-motion-blur-tier="capture"` opts into the truer capture, which loses anything in front of a mover and ignores blend modes. It is off for HDR renders and renders that use the engine's own sub-frame blur; distributed and `--start`/`--end` range renders blur like a whole render, and `hyperframes render --page-motion-blur off` renders without it. Opt a subtree out with `data-motion-blur="off"`, e.g. a seam that already carries its own blur. After adding it run `hyperframes check`. Guide: /guides/motion-blur.
99
- **Arrive slow, leave clean**: long-tailed ease-outs on arrivals; landing takes longer than leaving. An exit is one smooth motion, never slide, stop, then leave. Entrances that are too snappy read as glitches; slowing the whole video by about a second often fixes it.
1010
- **Ease by role**: an arrival lands on a long tail (`expo.out`, `power4.out`), a camera move or a colour flood eases both ways (`power2.inOut`), a zoom through or an exit accelerates (`power3.in`). The same `power2.out` at 0.5 s on everything is the flat default that makes a film feel generated. Linear only for rotation, progress and constant speed that is the point.
1111
- **Springs** are named by damping ratio: 1.0 never bounces, 0.7-0.85 reads premium, 0.4-0.6 playful, under 0.3 a cartoon. Position and size may bounce; opacity and colour never do. GSAP's `elastic.out(1, 0.5)` and `back.out(1.4)` are the nearest built-ins; a closed-form spring of `t` keeps any frame renderable on its own.

0 commit comments

Comments
 (0)