Skip to content

v0 [3/7]: JS scenarios, hand-off fixtures and JS goldens - #27

Merged
adhorodyski merged 3 commits into
v0from
stack/1c-scenarios
Nov 25, 2026
Merged

adhorodyski merged 3 commits into
v0from
stack/1c-scenarios

Conversation

@adhorodyski

@adhorodyski adhorodyski commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Scenarios (verify/scenarios/): the JS scenarios are no longer pending. Most edits are one line; perf-budget and the cross-* scenarios get real bodies, which run on devices in v0 [6/7]: example apps (bare, Expo) and device and web e2e #24.
  • Hand-off fixtures (verify/fixtures/*.handoff.json, generated): one per Jest scenario (R6), holding the seam payload JS hands to native. The Android and iOS layers replay them through the native cores.
  • JS goldens (verify/expected/*.js.otlp.json, generated): the exact OTLP output of the JS path, with sequential test IDs.
  • No upstream-only JS runs: handoff-basic, odd-attributes and export-headers are seam scenarios. Jest records their hand-off fixtures but no .js golden, because that output would be upstream's encoding alone. smoke-js is removed, and so is the degraded Jest project: probe.test.ts (v0 [1/7]: context propagation — runtime patch, startup probe, Metro helper #21) already proves a native await fails the probe and sets the flag.
  • Harness: the collector gunzips request bodies (opentelemetry-swift gzips); compare gains draft mode (VERIFY_E2E_DRAFT); scenarios get the TestNative type and per-app targets.

How to review

Read the harness and scenario diffs. The ~2,450 lines of fixtures and goldens are recorded output (VERIFY_UPDATE=1); spot-check two or three pairs, for example nest-promise-all-race (parent IDs in .js.otlp.json).

Verified locally

bun verify static fast-js: 35 + 62 tests green.

Decisions for you (defaults applied; override with spec: comments)

  1. odd-attributes contract: NaN and ±Infinity export as doubles; -0 becomes int 0 (visible in its .android, .ios and .web goldens).
  2. One span per scenario body. Each scenario's body creates a single span, not several.
  3. interaction-manager: RN 0.88 removed InteractionManager, so this scenario stays pending. Either drop it, or extend the context patch to cover requestIdleCallback.
  4. Expected files: the *.js.otlp.json and *.shape.json files in verify/expected were drafted from the implementation and need your review.

Part of the v0 stack that replaces #20 for review, bottom-up: #21 context → #26 SDK → #27 JS scenarios → #22 Android → #23 iOS → #24 examples + e2e → #25 ops. Review fixes land as new commits on the layer they belong to, and the layers above are rebased. History before the split: v0-impl / #20. Nothing publishes: release runs only after CI on main, and the npm environment does not exist yet.

🤖 Generated with Claude Code

adhorodyski and others added 3 commits November 25, 2026 20:04
Un-pends the JS scenarios and records, per Jest scenario, the seam payload (`verify/fixtures/*.handoff.json`, replayed
by the native cores in the next layers) and the exact OTLP output of the JS path (`verify/expected/*.js.otlp.json`).
The degraded Jest project keeps native async and proves the probe fails. Harness: the collector gunzips, compare
gains draft mode (VERIFY_E2E_DRAFT), scenarios get the TestNative type and per-app targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
handoff-basic, odd-attributes and export-headers built a span with a harness TracerProvider and the upstream OTLP
exporter, so their `.js.otlp.json` goldens pinned upstream's encoding, not our code. They become `seam` scenarios:
Jest still records their hand-off fixtures (the native contract), without a JS golden. smoke-js only repeated
handoff-basic and is removed with its fixture and goldens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It repeated what other tests already pin: probe.test.ts builds a native-async step with `new Function` and checks
the probe fails, logs once and sets the degraded scope attribute; start.test.ts checks the flag reaches the SDK's
tracers; rich-span's JS run checks stamped scope attributes reach OTLP. Removes the project config, its test, the
`degraded-probe` scenario and goldens, and the `jest-degraded` runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adhorodyski
adhorodyski merged commit b0a2cf0 into v0 Nov 25, 2026
@adhorodyski
adhorodyski deleted the stack/1c-scenarios branch November 25, 2026 19:20
@adhorodyski adhorodyski added this to the Alpha milestone Nov 26, 2026
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