Repository navigation
feat: Attach traits to experiment exposures and run SDK spec v0.7.1 event scenarios - #109
Conversation
Its entry in Flagsmith/sdk-spec's compatibility matrix at v0.7.1: `core or events`.
The flag analytics timer left the error of a failed send unhandled, so a network failure or an error response from Flagsmith crashed the app with an uncaught exception. The timer now drops the error, which syncAnalyticsData has already logged, and resends on the next tick. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 36a294b) (cherry picked from commit 56b56c5)
An exposure recorded by getExperimentFlag now carries the traits the identity was evaluated with, as the other Flagsmith SDKs do, so that experiment results can be analysed by trait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit b5f536a) (cherry picked from commit 53f3740)
…elay A fixed 100 ms wait could see fewer scheduled sends than expected. The test now waits for the second failed send, which also ensures the first failure has been handled before the test ends. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit d76c743) (cherry picked from commit fc55779)
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
getExperimentFlag, trackEvent and trackExposure methods
Zaimwa9
left a comment
There was a problem hiding this comment.
Change the PR title to describe precisely the change from this PR (as this is not the full implementation
getExperimentFlag, trackEvent and trackExposure methods
Done. The title is now feat: Attach traits to experiment exposures and run SDK spec v0.7.1 event scenarios. I also rewrote the description: it now says that The PR also contains a bug fix: a failed scheduled analytics flush no longer crashes the app (6dbe991). The new spec scenarios exposed it, so I kept it here and listed it in the description. If you'd rather review it as a separate |
getExperimentFlag,trackEventandtrackExposureEventalready shipped in #94. This PR runs the event scenarios of SDK spec v0.7.1 against them and fixes the two gaps they found: exposures were missing the identity's traits, and a failed scheduled analytics flush crashed the app.Changes
getExperimentFlaginclude the traits passed to it.Contributes to Flagsmith/sdk-spec#13
Review effort: 2/5