Repository navigation
feat(feature-flags): Handle all feature flag lifecycle events - #1721
Draft
stanleyphu wants to merge 1 commit into
Draft
stanleyphu wants to merge 1 commit into
stanleyphu wants to merge 1 commit into
Conversation
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review this draft |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Namespaced feature flag events currently fall through to raw snake_case data, and callers cannot use their names in typed Events API filters. All eight flag, rule and target lifecycle events now produce typed camelCase data and context through event listing and verified webhooks. Flag owner/environment fields, update history, optional rule actors, and both historical value-bearing targets and current rule memberships are preserved.
This draft targets
codex/auth-7099-rule-managementto reuse the management resource contracts and should retargetmainafter those resources land. Delivery still depends on the event launch: webhook subscription enums need published-spec regeneration, and rule-update webhook delivery needs API catalog registration.Not covered by CI
Proof
A signed fixture containing
feature_flags.flag_target.createdwithrule_id: "flag_rule_test",environment_id: "environment_test",target_id: "org_test"and contextclient_id: "client_test"returnsdata.ruleId,data.environmentId,data.targetIdandcontext.clientId. The membership result omitsvalue; the historical target result retainsvalueType: "boolean"andvalue: falseand omitsruleId. Listing the same fixture produces the identical event in all four built entrypoints.These checks use API-schema fixtures and local signatures, not live webhook delivery. Before release, verify actual delivery and published subscription enums when the event launch is enabled.
Fixes AUTH-7214