Skip to content

v0: one expected OTLP file per scenario for every platform - #29

Merged
adhorodyski merged 2 commits into
v0from
stack/6-goldens
Nov 26, 2026
Merged

adhorodyski merged 2 commits into
v0from
stack/6-goldens

Conversation

@adhorodyski

Copy link
Copy Markdown
Collaborator

What

  • One golden per scenario: verify/expected/<name>.otlp.json, 23 files instead of 78 per-platform <name>.<platform>.otlp.json. JS, web, Android and iOS compare against the same file.
    • Before merging them, a script checked that the JS, web and Android files were byte-identical, and that every iOS file matches under the rule below.
  • The iOS exception lives in one function (iosView in verify/harness/compare.ts) and applies on ios only:
    • Times within 256 ns: opentelemetry-swift keeps times as Date, which rounds whole microseconds to a ~238–256 ns grid in either direction (R22).
    • Ignored: the five fields its OTLP encoder never writes. These are span flags, span traceState, link flags, link traceState, and the scope schemaUrl.
    • Everything else must match exactly.
  • iOS never writes the shared file in VERIFY_UPDATE or draft mode, because its rounded times aren't the reference.
  • Shape files removed (25 files) along with shape.ts. They existed to keep platforms in agreement, and one file now does that by construction.
  • Tests: compare.test.ts drops the shape cases. It adds iOS cases: the gaps pass on iOS only, a real difference or a time more than 256 ns off still fails, and iOS never writes the file. The pending test was tautological and is gone.
  • Docs: spec §9.1, VERIFY.md, the plan and one CI comment. VERIFY.md also corrects "truncated" to "rounded".

Verified locally

  • bun verify static fast-js: 32 + 47 tests green.
  • Web e2e: 18 passed, 2 skipped.
  • iOS bare e2e against the single goldens: 24 passed, 3 skipped.

Android device runs are left to CI.

Trade-off

The iOS gaps are no longer pinned file by file. If opentelemetry-swift starts writing those fields, nothing flags it until someone tightens iosView.


On top of the v0 stack (#24 examples + e2e → #25 ops → this). Nothing publishes.

🤖 Generated with Claude Code

@adhorodyski
adhorodyski force-pushed the stack/6-goldens branch 8 times, most recently from 153eba6 to 1cb24cf Compare November 26, 2026 02:59
Base automatically changed from stack/5-ops to v0 November 26, 2026 05:46
adhorodyski and others added 2 commits November 26, 2026 06:47
JS, web and Android produced byte-identical goldens, and iOS differed only by two opentelemetry-swift gaps, so the
78 per-platform `<name>.<platform>.otlp.json` files become 23 `<name>.otlp.json`. The compare step accepts iOS's gaps
in one place (`iosView`): times within 256 ns (Date rounding, R22) and the five fields its OTLP encoder never writes
(span/link flags, span/link traceState, scope schemaUrl). iOS never writes the shared file (update or draft).

Shape files and shape.ts are gone: they existed to keep platforms in agreement, which one file now does by
construction. Spec §9.1, VERIFY.md and the plan say so; VERIFY.md also corrects "truncated" to "rounded" (iOS times
land on either side).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adhorodyski
adhorodyski merged commit 79615bb into v0 Nov 26, 2026
19 of 21 checks passed
@adhorodyski
adhorodyski deleted the stack/6-goldens branch November 26, 2026 08:15
@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