Skip to content

Use canonical FFE fixtures#275

Draft
leoromanovsky wants to merge 3 commits into
mainfrom
leo.romanovsky/ffe-canonical-fixtures-20260512
Draft

Use canonical FFE fixtures#275
leoromanovsky wants to merge 3 commits into
mainfrom
leo.romanovsky/ffe-canonical-fixtures-20260512

Conversation

@leoromanovsky
Copy link
Copy Markdown
Collaborator

Motivation

Make DataDog/ffe-system-test-data the canonical source for FFE/OpenFeature JSON fixtures in openfeature-js-client. This replaces copied package fixtures with the shared SDK corpus. Depends on DataDog/ffe-system-test-data#9.

Changes

  • Add packages/node-server/test/ffe-system-test-data as a git submodule pinned to the canonical fixture update.
  • Remove copied node-server fixture data.
  • Update the fixture tests to load canonical ufc-config.json and all sorted evaluation-cases/*.json files.
  • Assert canonical result reasons in addition to values, with a fixture-count assertion.
  • Add weekly Dependabot gitsubmodule updates.

Decisions

  • Shared evaluator behavior belongs in ffe-system-test-data and is consumed through a submodule.
  • openfeature-js-client-specific implementation tests can remain separate from the canonical fixture loop.
  • PHP is intentionally excluded until its OpenFeature client lands.

Validation

  • Blocked locally: dependencies are not installed. A direct TypeScript check against the package tsconfig is also blocked by existing TypeScript 6 config option deprecations in this environment.

sameerank added a commit that referenced this pull request May 12, 2026
- Add standalone unit test for evaluateForSubject verifying serialId
  passthrough to flagMetadata.__dd_split_serial_id
- Revert fixture changes (flags-v1.json, test-case-numeric-flag.json)
  to avoid merge conflicts with PR #275 removing JSON fixtures
- Remove fixture-dependent assertion from flags-v1.spec.ts
sameerank added a commit that referenced this pull request May 12, 2026
- Add standalone unit test for evaluateForSubject verifying serialId
  passthrough to flagMetadata.__dd_split_serial_id
- Revert fixture changes (flags-v1.json, test-case-numeric-flag.json)
  to avoid merge conflicts with PR #275 removing JSON fixtures
- Remove fixture-dependent assertion from flags-v1.spec.ts
sameerank added a commit that referenced this pull request May 12, 2026
* feat(node): expose serialId in flagMetadata for span enrichment

* test(node): add unit tests for serialId passthrough in flagMetadata

- Add serialId to numeric_flag split in test fixture
- Add test assertion verifying serialId is passed through to flagMetadata
- Update node-server to use workspace dependency for flagging-core
  so tests run against local types with serialId field

* Rename serialId to __dd_split_serial_id in flagMetadata

* Add standardized __dd_ prefixed keys to flagMetadata (#273)

* Add __dd_allocation_key and __dd_do_log, deprecate old keys

* Remove fallbacks from internal readers

* test(node): add unit test for serial ID, revert fixture changes

- Add standalone unit test for evaluateForSubject verifying serialId
  passthrough to flagMetadata.__dd_split_serial_id
- Revert fixture changes (flags-v1.json, test-case-numeric-flag.json)
  to avoid merge conflicts with PR #275 removing JSON fixtures
- Remove fixture-dependent assertion from flags-v1.spec.ts

* revert: remove __dd_ keys from browser package

Keep __dd_ prefixed keys only in node-server package. The browser SDK
uses precomputed assignments and doesn't need the standardized keys
that are intended for span enrichment in server-side tracing.

* fix: keep original keys as primary, __dd_ keys for server tracing only

- Core readers use original keys (works with browser and node-server)
- Make __dd_ keys optional, set by node-server for dd-trace-js
- Remove @deprecated markers since original keys are primary interface

* docs: clarify flagMetadata key comments in node-server
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