Repository navigation
test: refresh shared FFE fixtures and metadata assertions - #429
leoromanovsky wants to merge 1 commit into
Conversation
Consume the latest candidate fixture revision and check serial IDs and logging decisions in core and Node, preserving repeated evaluations on the same configuration/provider. Environment: Datadog workspace
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 79.7 KiB raw / 22.2 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). These are bundler sizes, not npm install sizes, unbundled Node require/import costs, payload sizes, or latency. Gzip compares compressed artifacts. 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 bundle; present in both SSR bundles (checked using Webpack module statistics). This report shows current PR artifact sizes only; it does not compare against the base branch. |
Motivation
The shared JS fixture runners do not check selected split IDs or logging decisions, leaving exposure and span-enrichment metadata outside their coverage. #423 also landed with an older revision of the shared opt-out fixtures.
Changes
Advance
packages/core/test/ffe-system-test-datafrom1c831fed02a428a1b0a4ac412da9b773e22df257tob28876200152f00c7d5eb04616f721afa5955c1d, the current head of fixture PR #52. This includes merged fixture PR #53, with nine flag definitions and twelve serial-ID/logging cases.Core and Node fixture runners now assert optional
result.serialIdandresult.doLogexpectations. Zero remains a valid ID, explicit null requires no ID, and omitted expectations impose no assertion. Repeated cases run in fixture order against the same configuration/provider.Temporary pin: #52 is still open. Keep this PR as a draft until #52 merges, then replace the candidate pin with its merged commit and rerun the fixture suites before landing.
The backend deployment and coordinated package-release dependencies are tracked in #423. This follow-up changes test coverage only. Implementation and tests were prepared with AI assistance.
Test instructions
Run
yarn workspace @datadog/flagging-core test --runInBandandyarn workspace @datadog/openfeature-node-server test --runInBandafter initializing the fixture submodule and building core. The canonical fixture validator covers 361 baseline cases; core also runs 26 immediate and 42 future opt-out expectations. The twelve metadata cases run in both suites.Core: 1,043 tests passed. Node: 544 tests passed. Core build, package and test type checks, lint, and formatting passed.
These checks exercise local evaluation metadata. They do not verify emitted trace tags or backend deployment.
Checklist