Skip to content

feat: recognise the OpenFeature web provider, and keep telemetry SDK types valid - #69

Merged
basb7 merged 3 commits into
mainfrom
feat/openfeature-web-sdk-type
Sep 29, 2026
Merged

basb7 merged 3 commits into
mainfrom
feat/openfeature-web-sdk-type

Conversation

@basb7

@basb7 basb7 commented Sep 29, 2026

Copy link
Copy Markdown
Owner

What does this change?

@flagward/openfeature-web (basb7/flagward-sdk-js#13) registers as OPENFEATURE_WEB. The endpoint already accepts it, since sdk_register never validates sdk_type; this makes the product recognise it, so the dashboard and telemetry can count it instead of folding it into other.

A bug this avoids on the way

The telemetry allowlist is built from SDKType, and sdk_type_name reported a known type lowercased: openfeature_web. The collector (flagward-telemetry, lib/schema/v1.ts) accepts sdks[].type only as ^[a-z0-9-]{1,32}$, and its schema is strict. One underscored value rejects the whole heartbeat, so every installation with the provider connected would have stopped reporting entirely, with no error anywhere.

Nothing in production hits it today: v0.7.0 does not know the type and sends other. It would have started with this enum change.

  • sdk_type_name now reports underscores as hyphens → openfeature-web.
  • A contract test runs every SDKType value through sdk_type_name against the collector's pattern, so the next underscored type (a future OPENFEATURE_NODE) fails here, not in the field. Verified it fails with the enum added and the fix removed.

Changes

File Change
telemetry/anonymize.py underscores → hyphens in the reported SDK type
sdk_api/models.py + migration 0006 OPENFEATURE_WEB = "OpenFeature (web)" (choices only, no schema change)
frontend/src/lib/api.ts SDKType union learns 'OPENFEATURE_WEB'
tests/unit/test_telemetry_anonymize.py collector-pattern contract test + the new mapping
tests/unit/test_sdk_registration.py OPENFEATURE_WEB among the values published packages send
frontend/public/logo-mark.svg a monochrome, single-path SVG of the mark, vectorised from logo.png (silhouette matches at IoU 0.971). Needed for the openfeature.dev provider listing, whose logos are fill-less

Three commits: the telemetry fix first (it stands on its own and passes alone), then the type, then the logo.

Checks

  • pytest: 814 passed · ruff check .: clean · makemigrations --check: no changes pending
  • frontend: biome check, tsc --noEmit clean · npm test: 188 passed

@basb7
basb7 merged commit 863c71b into main Sep 29, 2026
3 checks passed
@basb7
basb7 deleted the feat/openfeature-web-sdk-type branch September 29, 2026 22:06
@basb7 basb7 mentioned this pull request Sep 29, 2026
3 tasks done
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