Skip to content

docs(flags): name the per-call feature flag event option - #109

Merged
turnipdabeets merged 3 commits into
mainfrom
posthog/flutter-6-public-api-names
Oct 21, 2026
Merged

turnipdabeets merged 3 commits into
mainfrom
posthog/flutter-6-public-api-names

Conversation

@posthog

@posthog posthog Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Why

posthog-flutter 6.0 renamed three public names onto the ones the other SDKs already use. Three lines in the specs describe the old Flutter names and are now wrong, and the specs never stated what the per-call feature-flag-event option is called — which is why the Flutter divergence went unrecorded for four years.

Source SDK changes

PR Change
posthog-flutter #636 Added optIn()/optOut() and sendFeatureFlagEvent, deprecated enable()/disable() and sendFeatureFlagEvents
posthog-flutter #647 Renamed getFeatureFlagResult's sendEvent to sendFeatureFlagEvent
posthog-flutter #638 Removed the 5.x-deprecated names for v6

What changed

  • New requirement in get-feature-flag-result: the per-call option that suppresses $feature_flag_called is named sendFeatureFlagEvent on client SDKs and sendFeatureFlagEvents on server SDKs, in platform casing, and defaults to sending the event.
  • get-feature-flag-result: Flutter variant corrected from { sendEvent = true } to { sendFeatureFlagEvent = true } (6.0+).
  • feature-flag-called-tracker: the Flutter note now cites getFeatureFlagResult(sendFeatureFlagEvent: ...).
  • opt-in: adds the missing Flutter surface variant, noting enable()/disable() were deprecated in 5.x and removed in 6.0.

Proposed, applied, and archived on this branch under openspec/changes/archive/2026-10-08-name-per-call-flag-event-option/.

Uncertainty

The singular/plural split is recorded as the observed state across the audited SDKs (iOS, Android, Flutter 6.0, and posthog-js use the singular; Node, Python, Ruby, and PHP use the plural), with the rationale that the client option governs one call while the server option governs a whole evaluation. If that split is considered accidental rather than intended, this requirement is the wrong place to freeze it — worth a look.

Validation

openspec validate --specs --strict is unchanged from main (33 passed / 31 pre-existing long-requirement warnings), and the change validated clean before archiving. These are specification checks, not executed SDK conformance tests.


Created with PostHog Desktop

🤖 Generated with Claude Code

posthog-flutter 6.0 renamed getFeatureFlagResult's sendEvent option to
sendFeatureFlagEvent and enable()/disable() to optIn()/optOut(), the names
every other client SDK already used. Three spec lines described the old
Flutter names and are now wrong, and the specs never stated what the
per-call option is called in the first place.

Adds a requirement naming the option (singular on clients, plural on
servers), corrects the Flutter variant in get-feature-flag-result and the
Flutter note in feature-flag-called-tracker, and adds the missing Flutter
variant to opt-in. Applies and archives the change on this branch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 88004f09-5e06-46d4-b82d-ce0799263066
posthog-js names the per-call option sendEvent (core, react-native) and
send_event (browser); its sendFeatureFlagEvent is the instance-level client
option. Record these, and released Flutter 5.x's sendEvent, as known
divergences so the requirement does not silently make them non-compliant.

The Flutter getFeatureFlagResult rename and the enable()/disable() removal
are merged only for Flutter 6.0 (unreleased; latest release 5.56.0), so the
live specs and archive now say so. Adds the archive's missing .openspec.yaml.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets
turnipdabeets marked this pull request as ready for review October 20, 2026 19:46
@turnipdabeets
turnipdabeets requested a review from a team as a code owner October 20, 2026 19:46
@turnipdabeets turnipdabeets self-assigned this Oct 20, 2026

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated advisory code review.

@marandaneto
marandaneto requested a review from a team October 21, 2026 14:27
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets
turnipdabeets merged commit 018c44e into main Oct 21, 2026
7 checks passed
@turnipdabeets
turnipdabeets deleted the posthog/flutter-6-public-api-names branch October 21, 2026 17:39
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.

2 participants