Repository navigation
ANIM-b1 3b part 1: the runtime animator as a translated root, with its animator suite - #133
Merged
Merged
Conversation
…ator.ts) and its animator suite The parity reference animator now wraps the translated root, so the Chrome frame lanes judge the code the generated Swift and Kotlin run; the animator suite (rt-vectors/animator, harness op rt-animator, p1 suite after hit) checks the translations bit for bit against it on the host and, through device-vectors, on device. No native runtime or row changes.
Commands: pnpm regen; pnpm run parity:devices; pnpm regen
thejackshelton
added a commit
that referenced
this pull request
Oct 4, 2026
…itattributes keeps master's animator line in sorted order
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.
T065a ANIM-b1, PR 3b part 1 of 2: the runtime animator as one translated implementation (binding spec
docs/goals/milestone-2-proof/notes/T065-anim-b-spec.md§2 R2, R4, R7, R9, R10, R16, §6.1 b1-3). Based on master; landable alone. It changes no row, no native output and no static case. Part 2 (the device runtime: tables in the state program sources, the display and virtual drivers, the state.ts hunks, the device-anim lane and the native animation rows) follows once this is on master (no-stacks rule).Why a translated root
The spec's b1-3 lists "Animator (TS, Swift, Kotlin)" in
emit/runtime/anim.ts. This PR writes the animator once, in the translator subset, as a new engine root (packages/layout/src/rt-animator.ts), so:native:swift,native:kotlin) and on every device through device-vectors.The device glue in part 2 becomes thin: it converts the compiled tables to literals, applies colour writes to views and lays out the patched input.
What changed
packages/layout/src/rt-animator.ts(new, translated root, subset-clean):EasingCode,ValueCode, slots, animation lists,@keyframes, rendered, bases and closure;animatorStart/animatorEvent/animatorAdvance: R4, R7 and R2, onrt-transitionandrt-animations;animatorFrame,closureFrame(R9) andframeColors: colours as Chrome draws them;patchInput/patchRoot: lengths back into the engine input as px, % or a calc() sum (R16);lengthBase: endpoints from each assignment's resolved input (R14);animatorBusy: the display driver runs only while true (R3);AnimatorFaults;rt-interpolate.ts: an additivecolorRgba8, built from the same rounding helpers asserializeColor.lower/anim-program.ts:animTablesOf, the compiled tables as the root's plain data (layout types only, so the core boundary holds).anim-cases.ts):Animator,closureFrameandapplyFramenow wrap the root. Their API is unchanged.pnpm run parity:anim-vectorswritespackages/layout/rt-vectors/animator/cases.json: per frame case, its tables, every assignment's resolved engine input and its frame script as animator steps;rt-animator, with exact-key decoders;animatorafterhit, whose expected results are the TypeScript harness's answers; a line it throws on or refuses fails the build;anim-vectorsand its.gitattributesline.Changed tests and pins, and why
translate.test.ts: the corpus size pin gainsanimator: 18; the other suites keep their sizes.device-vectors.test.ts: the animator suite is declared with one case per frame case.p1-floor.json:animatorappended withDRAGON_FLOOR_WRITE=1; additions only.packages/layout/test/rt-animator.test.ts(4 tests) andpackages/translate/test/rt-animator.test.ts(3 tests).Outside the spec
packages/layout/src/rt-animator.ts: the spec put the animator inemit/runtime/anim.ts, hand-written per language. Here it is one translated root.packages/translate/harness/harness.ts,src/corpus.ts,src/generate.tsandtest/rt-animator.test.ts: the animator suite.packages/parity/src/cli/anim-vectors.tsand theparity:anim-vectorsscript.North-star delta
None in this part: no row changes. Part 2's device-anim rows bring the −8 on ios and android.
Deferred (device step)
The device run of p1/animator through device-vectors is the landing driver's.
What passed
pnpm typecheckpasses, andpnpm run layout:subsetreports 0 violations.pnpm run parity:anim-reportagainst the committed Chrome captures, now through the translated root: 18 cases, 2328 samples (4880 values, 11704 boxes, 582 chrome-dual samples, 18 settles), failed 0.anim-frames.test.ts: 21/21, and every runtime and rt plant still fails its own fixture./tmp/heavy-lease.sh pnpm run native:swiftandnative:kotlin: status pass,animator 18/18on both.false;colorRgba8agrees withserializeColoron rounding and alpha edge cases;/tmp/heavy-lease.sh pnpm regen: fixed point, outputs in their own commit (Regenerate: pnpm regen)./tmp/heavy-lease.sh pnpm test: Tests 15 failed | 4760 passed | 2 skipped (4777). Every failure is device step pending (lanes, lanes-records, device-failures, p6a-promotion, lanes-concurrent, land.test evidence:stamp), except planted-swift.test.ts, which timed out under machine load and passes when rerun alone.🤖 Generated with Claude Code