Skip to content

test(sdk): render-faithfulness test for serialize() bake contract (WS-F)#1575

Open
vanceingalls wants to merge 1 commit into
mainfrom
ws-f-bake-assist
Open

test(sdk): render-faithfulness test for serialize() bake contract (WS-F)#1575
vanceingalls wants to merge 1 commit into
mainfrom
ws-f-bake-assist

Conversation

@vanceingalls

@vanceingalls vanceingalls commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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 covering setStyle, setText, setTiming, addGsapTween, moveElement, the combined batch, data-composition-variables survival, and a serialize → reopen round-trip.

Gates

  • bun run build ✅ · bun test (sdk) 305/0 ✅
  • bunx oxlint 0/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

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>

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

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