Skip to content

feat(FLAGS-38): [DRAFT] consume configuration change events - #53

Open
karishnu wants to merge 4 commits into
cloudflare:mainfrom
karishnu:feat/FLAGS-38-configuration-change-events
Open

karishnu wants to merge 4 commits into
cloudflare:mainfrom
karishnu:feat/FLAGS-38-configuration-change-events

Conversation

@karishnu

@karishnu karishnu commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • consume advertised OFREP SSE streams in the TypeScript browser provider
  • refresh the notified configuration version before emitting OpenFeature events
  • add stale/recovery and configuration-change events to local TypeScript, Go, and Python providers
  • lazily invalidate binding caches when the platform exposes a configuration version

Dependencies

Test plan

  • TypeScript SDK tests (452 passed)
  • TypeScript integration tests
  • full pnpm run check
  • Python tests (240 passed), Ruff, ty, and build
  • Go tests and go vet
  • changeset validation

Browser compatibility

Direct browser-to-Flagship requests from a different origin were already unsupported before this PR: authenticated JSON OFREP requests require a CORS preflight that the existing API does not handle. The new event-stream capability header does not introduce that limitation. Do not place a server API token in browser code. Browser deployments need a same-origin application proxy for both evaluation and SSE, or a separate browser-safe credential and endpoint. Customer-hosted server providers can call the API and open SSE directly; browser CORS restrictions do not apply to them.

@karishnu
karishnu requested review from a team, akshitsinha and vaibhavshn as code owners October 19, 2026 09:39
@changeset-bot

changeset-bot Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3b0229a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@cloudflare/flagship@53

commit: 3b0229a

@karishnu karishnu changed the title feat(FLAGS-38): consume configuration change events feat(FLAGS-38): [DRAFT] consume configuration change events Oct 19, 2026
@karishnu

Copy link
Copy Markdown
Contributor Author

Updated the TypeScript event consumer in commit 9976846 to match the service review hardening in flagship!227:

  • event-capable providers now explicitly opt in with Flagship-Event-Stream: sse, so polling/non-event clients do not cause ticket issuance
  • browser, remote server, and local-evaluation refreshes request replacement single-use tickets
  • server providers refresh their descriptor after an interrupted stream instead of retrying a consumed ticket
  • added bulk and definitions capability-header coverage

Validation: 454 TypeScript tests, full pnpm run check, and package build pass.

karishnu and others added 2 commits October 22, 2026 12:22
Retain both stream handling and flag metadata after integrating the updated base.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>

This branch has not been deployed

No deployments
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