Skip to content

docs(reload-feature-flags): document optional completion failure reporting and iOS 4.0 signature - #99

Merged
turnipdabeets merged 2 commits into
mainfrom
docs/ios-reload-flags-result
Oct 7, 2026
Merged

turnipdabeets merged 2 commits into
mainfrom
docs/ios-reload-flags-result

Conversation

@turnipdabeets

Copy link
Copy Markdown
Contributor

Why

posthog-ios 4.0 (PostHog/posthog-ios#913) passes a PostHogFeatureFlagsLoaded (flags, variants, errorsLoading) to the reloadFeatureFlags(_:) callback, so callers can tell a failed reload from a successful one. This spec still lists the zero-argument iOS callback, and says failure reporting is SDK-specific without saying what a reported failure must mean.

Draft until posthog-ios 4.0 ships.

What changes

  • iOS surface variant updated to (PostHogFeatureFlagsLoaded) -> Void (4.0+).
  • New requirement, Reload completion failure reporting: SDKs MAY report failure through the reload completion. If they do, it MUST match whether that reload's request failed, and carry the last known flags on failure. Two scenarios cover success and a 503.
  • Error handling notes the iOS shape, the same as onFeatureFlags.

No SDK is required to change. The canonical (flags?, error?: Error) signature is unchanged; reconciling it with the errorsLoading shape is a separate cross-SDK decision. Quota-limited and partial responses stay SDK-specific (iOS and posthog-js treat them as non-failures since they return 200).

Why a requirement rather than a narrative-only edit: OpenSpec rejects a change with no requirement delta, and the optional (MAY) form binds no SDK that doesn't expose a failure signal.

Validation

  • openspec validate --specs --strict: 64 passed. The change passed strict validation before archiving.
  • git diff --check clean.
  • Specification checks only, not executed SDK conformance tests.

Related: PostHog/posthog-ios#913, PostHog/posthog-flutter#643.

🤖 Generated with Claude Code

…rting and iOS 4.0 signature

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@dustinbyrne dustinbyrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good overall. The documented iOS signature and request-specific failure behavior match the companion implementation. Two non-blocking wording suggestions inline.

AI-assisted review.

…t cached values

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@turnipdabeets
turnipdabeets merged commit d078270 into main Oct 7, 2026
10 checks passed
@turnipdabeets
turnipdabeets deleted the docs/ios-reload-flags-result branch October 7, 2026 00:22
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