Skip to content

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

Open
adhorodyski wants to merge 4 commits into
v0from
stack/1c-scenarios
Open

adhorodyski wants to merge 4 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.
  • Degraded Jest project: keeps native async and proves the probe from v0 [1/7]: context propagation — runtime patch, startup probe, Metro helper #21 fails and flags the spans.
  • 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: 38 + 73 tests green. SDK bundle share 384 444 B vs the 383 873 B baseline.

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

  1. odd-attributes contract: NaN and ±Infinity export as doubles; -0 becomes int 0.
  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

Mobile attaches to native, or initializes it from the JS config (§4.4), and hands spans to native through
NativeHandOffProcessor. Web builds its own TracerProvider with BatchSpanProcessor and the upstream OTLP/proto exporter
(R7), picked by the package's `browser` export condition. The first call's handle wins; any failure logs once and
returns a no-op handle. The native module accessor no longer swallows constructor errors; start reports them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adhorodyski and others added 3 commits November 25, 2026 19:35
It bundled the example app with Metro on every static run against a committed baseline nobody set a budget for.
Removes bundleSize.ts, its test and baseline, the static step, and CI's example install that existed only for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…istro version from package.json

- No `/v1/traces` appending: `url` is the full OTLP/HTTP traces endpoint (§4.4). Native follows in the Android and
  iOS layers.
- Web reads `telemetry.distro.version` from the package's own `package.json` (self-reference through the
  `./package.json` export), so there is no hand-kept version constant.
- Tests: dropped the ones that only re-checked upstream or a constant (a span's default start time, the URL helper,
  DISTRO_VERSION against package.json); the web URL test is one case now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
@adhorodyski
adhorodyski added this pull request to stack #28 November 25, 2026 18:49
Base automatically changed from stack/1b-sdk to v0 November 25, 2026 18:50
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