Skip to content

Conformance: trace frame-throttled frameworks via yield=frame - #110

Open
NullVoxPopuli-ai-agent wants to merge 1 commit into
NullVoxPopuli:mainfrom
NullVoxPopuli-ai-agent:conformance-frame-pacing
Open

Conformance: trace frame-throttled frameworks via yield=frame#110
NullVoxPopuli-ai-agent wants to merge 1 commit into
NullVoxPopuli:mainfrom
NullVoxPopuli-ai-agent:conformance-frame-pacing

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown
Contributor

Split out of #109 per review there: conformance adjustments belong in their own PR.

Marko's scheduler has a frame-rate floor (first write in a frame renders in a microtask, every later write waits for the next rAF — schedule() in marko's src/dom/schedule.ts), so the task-paced conformance queries coalesce into one render per frame and can't observe its per-write states. Skipping the specs would drop anti-cheat coverage; this keeps it instead:

  • ?yield=frame (common): delivers one write per animation frame — a rAF and then a setTimeout task, because posted MessageChannel messages run before timers, so a rAF-posted flush has already run and re-armed by the time the write lands. fan-out gets the same pacing through its message hop.
  • conformance.spec.ts: FRAME_THROTTLED frameworks run the externally-paced specs with a pacedQuery using yield=frame; every trace assertion (exact state sequence, zero element churn, text-node budget) applies to them unchanged. The self-advancing incrementing-render-effect spec needs no pacing (it waits for each render).

No-op for every current framework: FRAME_THROTTLED lists only marko (added in #109), the task-paced queries everyone else runs are untouched, and without ?yield=frame the workloads behave exactly as before — verified locally: all 4 conformance specs × preact/react/svelte pass unchanged, and all 4 × marko pass with the paced queries (with #109's apps).

Merge order: this first, then #109's conformance CI step goes green.

🤖 Generated with Claude Code

A scheduler with a frame-rate floor (marko: the first write in a frame
renders in a microtask, every later write waits for the next animation
frame) coalesces one-update-per-task workloads into one render per
frame, so the task-paced conformance queries cannot observe its
per-write states -- and a skip would drop the anti-cheat coverage
entirely.

Instead, `?yield=frame` paces a workload by animation frame: a rAF and
then a setTimeout task (posted MessageChannel messages run before
timers, so a rAF-posted flush has already run and re-armed by the time
the next write lands -- it renders on its own). fan-out gets the same
through its message hop. The conformance specs give FRAME_THROTTLED
frameworks a pacedQuery using it, and every trace assertion (exact
state sequence, zero element churn, text-node budget) applies to them
unchanged.

No-op for every current framework: FRAME_THROTTLED lists only marko
(from NullVoxPopuli#109), the task-paced queries everyone else runs are untouched,
and without `?yield=frame` the workloads behave exactly as before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

@NullVoxPopuli-ai-agent is attempting to deploy a commit to the NullVoxPopuli's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant