Repository navigation
Conversation
Retain numeric assignment tokens through browser and Node fetches, portable wires, and cache-safe snapshots. Reject inexact whole numbers, nonzero underflow, and overflow with TYPE_MISMATCH while accepting finite fractional rounding and exactly representable large integers. Ref: FFLSDK-292
OpenFeature Browser Provider Bundle SizesMeasured from the Vite production output after installing packed Both scenarios initialize an OpenFeature provider, evaluate a boolean flag, change context, and evaluate again. Telemetry is disabled for DatadogProvider; no tracking hooks are registered for DatadogCoreProvider. DatadogProvider fetches precomputed assignments for each context; DatadogCoreProvider receives rules from fetchRulesConfiguration once and evaluates locally. Sizes include OpenFeature and the same small scenario harness. Configuration responses are supplied by Playwright and are not bundled. These are complete scenario JS sizes, not configuration payload sizes or isolated provider/Protobuf costs; the difference between rows is not a decoder-only delta.
Dependency checks passed: no Protobuf markers in default/precomputed scenarios; markers present in rules-based scenarios. OpenFeature Browser Tracking Hook Bundle SizesSynthetic entrypoints import and call tracking hook factories from the packed
OpenFeature Node Server Bundle SizesIndependent Webpack production builds of the installed core and Node SDK tarballs, targeting Node 18 with ESM (
Adding SSR helpers to the provider adds 87.6 KiB raw / 25.3 KiB gzip in this build. This includes fetching, parsing, and serialization, not just the decoder. SSR helpers fetch rules for the browser, not for configuring that provider (which uses its existing JSON API). Adding precomputation to the provider adds 21.2 KiB raw / 7.0 KiB gzip in this build. Both precompute scenarios import precomputeConfiguration from /rules-based and receive already-parsed rules from the test harness; they do not fetch, parse, or serialize configuration. These are bundler sizes, not npm install sizes, unbundled Node require/import costs, payload sizes, or latency. Gzip compares compressed artifacts. Deltas compare scenarios in this build, not changes against the base branch. The browser scenarios include OpenFeature and a different harness, so their sizes are not directly comparable. Dependency checks passed: no Protobuf runtime or generated schema modules in the provider-only, precompute, or precomputed-fetch bundles; present in both rules-fetch SSR bundles (checked using Webpack module statistics). This report shows current PR artifact sizes only; it does not compare against the base branch. |
Preserve exact large integers during serialization, reject invalid numeric prerequisites, and isolate cached numeric sources from older readers. Downlevel lossless-json in legacy bundles and expand regression coverage. Ref: FFLSDK-292
Summary
Fixes FFLSDK-292: precomputed numeric assignments must be checked against their original JSON tokens, before
JSON.parse()can round them or turn a nonzero value into zero.This addresses the remaining numeric SDK defects discussed in the FIT #221 review thread. That PR currently skips the three
numeric-decimal-*fixtures for Web because of these defects. This PR fixes the SDK behavior; removing those skips still requires a fixed browser release and an updated FIT dependency pin.TYPE_MISMATCH, the caller's default, and no variant for inexact whole numbers, nonzero underflow, and overflow. Keep healthy sibling flags usable.Number.MAX_SAFE_INTEGERand finite fractional rounding for all supported numeric wire labels.text().Validation
BigIntunavailable; this is a runtime-compatibility unit check, not a device test.Dependency And Bundle Cost
Adds the MIT-licensed
lossless-jsonparser and its license attribution. The numeric conversion policy is SDK-specific; the dependency handles JSON syntax and token-preserving serialization.An identical Webpack 5.108.0 production scenario exporting only core's precomputed parser, serializer, and evaluator measured 30,193 to 40,532 bytes raw and 10,778 to 13,983 bytes gzipped versus released core 3.6.0: approximately +10.1 KiB raw / +3.1 KiB gzip. This is a minimal core scenario, not the full browser SDK. The existing packed-browser bundle report also passes: default/precomputed imports remain protobuf-free.
Rollout
No package versions or internal dependency pins are changed here. Release core first, then update dependent package pins as part of their releases. Shared-fixture Web skips and FIT's dependency pin can be updated after the fixed browser release; this PR does not change FIT or its fixture expectations.