test(sdk): render-faithfulness test for serialize() bake contract (WS-F)#1575
Open
vanceingalls wants to merge 1 commit into
Open
test(sdk): render-faithfulness test for serialize() bake contract (WS-F)#1575vanceingalls wants to merge 1 commit into
vanceingalls wants to merge 1 commit into
Conversation
Adds session.render-faithful.test.ts with 8 assertions covering the full op batch (setStyle + setText + setTiming + addGsapTween + moveElement). Confirms serialize() emits fully override-baked, render-ready HTML — this is the SDK-side guarantee that the backend render input needs no separate override-set field. Also asserts GSAP <script> edits and data-composition- variables survive serialization unchanged. Decision recorded: no SDK bake helper. session.serialize() IS the bake. Content-address → zip → S3 upload → pointer-swap is host/backend (WS-P/WS-R). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.

WS-F — agent-bake assist
Part of the AI Studio (Pacific) SDK integration. Independent branch off
main.Shape decision
No SDK bake helper is needed.
session.serialize()is the bake — it walks the live DOM and emits fully override-baked, render-ready HTML. The content-address → zip → S3 upload → pointer-swap flow lives host/backend-side (WS-P / WS-R), not in the SDK. This PR therefore locks the bake contract with tests rather than adding an API surface.What this does
Adds a render-faithfulness test suite proving
serialize()produces render-ready HTML across the full op set, so the host/backend can rely on it as the bake artifact.Files (1 changed, +177)
packages/sdk/src/session.render-faithful.test.ts— 8 assertions coveringsetStyle,setText,setTiming,addGsapTween,moveElement, the combined batch,data-composition-variablessurvival, and a serialize → reopen round-trip.Gates
bun run build✅ ·bun test(sdk) 305/0 ✅bunx oxlint0/0 ✅ ·bunx oxfmt --check✅fallow --gate new-only✅ ("No issues in 1 changed file")Deferred
None — scope is the contract + tests. The address/zip/upload/pointer-swap pipeline is host/backend (see Pacific #29509/#29510 and experiment-framework #40078).
🤖 Generated with Claude Code