fix(cli): count font axes as motion in the sweep fingerprint - #3107
Open
miguel-heygen wants to merge 1 commit into
Open
fix(cli): count font axes as motion in the sweep fingerprint#3107miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
The layout audit fingerprints each element by rect and opacity, plus an 8x8 pixel hash for canvas and video. A composition whose only change over the timeline is font-variation-settings touches none of those, so all six samples hash identically and the audit reports sweep_static on a timeline that is visibly animating. Duplexed variable fonts make it unavoidable rather than unlikely. Recursive holds one advance width across its whole weight axis by design, so even the element rect stays fixed while the letterforms change. Fold the computed font-variation-settings into the per-element fingerprint. It reads normal on every element that does not use the property, so no existing composition's fingerprint changes. This is the third instance of this failure class in the same function, after the canvas-repaint and opacity-reveal cases whose regression tests already sit alongside these. Two more join them: a scene where only the axes move must change the fingerprint, and a scene where nothing moves must hash identically twice. The second is the load-bearing one, since a fingerprint that varies on its own would make sweep_static unfireable and every green layout verdict meaningless.
This was referenced Aug 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fold the computed
font-variation-settingsinto the layout audit's per-element sweep fingerprint.Why
The fingerprint is rect plus opacity, with an 8x8 pixel hash for
<canvas>and<video>. A composition whose only change across the timeline is a font axis touches none of those, so all six samples hash identically andcheckreportssweep_staticon a timeline that is visibly animating.Duplexed variable fonts make this unavoidable rather than unlikely. Recursive holds a single advance width across its entire weight axis by design, so even the element rect stays fixed while the letterforms change underneath it.
This is the third instance of the same failure class in this function. The canvas-repaint and opacity-reveal cases already have regression tests sitting right where these two go, which is itself the argument that the fingerprint is the correct place to fix it rather than the compositions.
How
font-variation-settingsreads"normal"on every element that does not use it, so no existing composition's fingerprint changes.Test plan
packages/clifull suite: 175 files passed, 1 skipped, 2489 tests passed, 2 skipped, 0 failed.oxfmt --checkandoxlintclean on both files.Two regression tests, both mutation-checked rather than trusted green:
changes the sweep fingerprint when only font-variation-settings movesMath.random()to the axis readkeeps the sweep fingerprint identical when nothing moves, font axes includedExactly one test failed in each case (1 failed, 82 passed). The second is the load-bearing one: without it a fingerprint that varied on its own would make
sweep_staticunfireable and every green layout verdict meaningless, and the suite would still be green.Worth knowing
A fresh worktree needs
bun run buildbeforevitest, or 68 files fail to collect onCannot find package '@hyperframes/parsers/ff-binaries'. That is missing workspace build output, not a real failure, and it looks alarming.feat/primitive-weight-wavedepends on this landing first. Demonstrated on the same composition: the CLI without this fix reportssweep_staticandcheckfails; with it, layout reports 0 issues across 9 samples andcheckpasses.