Repository navigation
ci: Run the Flagsmith SDK behavioural spec - #89
Conversation
320926c to
32f5af6
Compare
|
@themis-blindfold review |
|
@themis-blindfold review |
32f5af6 to
796f54c
Compare
796f54c to
adbefbe
Compare
⚖️ Themis review: 🟠 Fix before mergeThe SDK behavioural spec is now wired into CI and the trait serializer retains the common JSON types, but the new adapter still rejects a permitted
🟠 Majors
📝 Walkthrough
🧪 How to verify
Automate: add adapter coverage for a null trait and an integer above 2^53. Product take: A solid CI safeguard for SDK behaviour, but it should cover the complete trait value contract before it becomes the regression gate. Big picture: Observed: the adapter maintains a separate dependency list and Android stub surface from the SDK build. Predicted: future SDK dependency or framework changes could make only the spec build drift; add a parity check or derive those inputs from a shared source. 🧭 Assumptions & unverified claimsNo unverified assumptions or claims. A sharper spec harness needs one more edge in its trait drawer · reviewed at 32f5af6 1 finding(s) anchored outside the diff (not posted inline)
Preserve every trait value accepted by the adapter protocol Observed: |
3ebeda6 to
1f2dc92
Compare
|
@themis-blindfold review |
⚖️ Themis review: 🟠 Fix before mergeThe behavioural spec and existing test checks passed, and the trait serialization fix preserves primitive JSON types. However, the Renovate rule updates only one of the two workflow references that are required to stay aligned; the first tag-based update will split them.
🟠 Majors
📝 Walkthrough
🧪 How to verify
Product take: Behavioural-spec coverage is a solid safety improvement, but it needs reliable release-pin maintenance to keep that protection current. 🧭 Assumptions & unverified claimsNo unverified assumptions or claims. The spec caught a real trait regression; its two release pins should travel together · reviewed at 1f2dc92 |
⚖️ Themis review: 🟠 Fix before mergeThe behavioural-spec workflow, unit tests, and build check all completed successfully. The new runner exercises environment and identity evaluation, but the configured Renovate update would leave the reusable workflow pinned to its old revision while changing only
🟠 Majors
📝 Walkthrough
🧪 How to verify
Product take: This adds valuable cross-SDK compatibility coverage and fixes trait typing that directly affects segment evaluation. The benefit is meaningful, provided spec revision updates cannot silently split the runner from its harness. 🧭 Assumptions & unverified claimsNo unverified assumptions or claims. Two pins, one source of truth — just make the robot move both · reviewed at 1f2dc92 |
1f2dc92 to
7e2fe6e
Compare
|
@themis-blindfold review |
7e2fe6e to
6464104
Compare
|
@themis-blindfold review |
⚖️ Themis review: ✅ Ship itThe behavioural-spec job adds meaningful end-to-end coverage for environment and identity flag retrieval without changing the shipped SDK. The captured SDK-spec, unit-test, and build checks were still running; static validation found the JVM adapter disables the Android-only analytics path and keeps its runtime dependencies aligned with the client build.
📝 Walkthrough
🧪 How to verify
Product take: Solid quality improvement: the SDK now exercises its server-facing flag and trait contract against a real Flagsmith instance on every change. 🧭 Assumptions & unverified claimsNo unverified assumptions or claims. A useful little guardrail: may the flags stay where the harness put them · reviewed at 6464104 |
⚖️ Themis review: ✅ Ship itTL;DR: The new behavioural-spec job builds the SDK from source in a JVM-only container and passed alongside the existing unit and build checks. The step adapter covers the stated environment-flag and identity-with-traits paths, and the Renovate rules keep both spec references in the same update group.
📝 Walkthrough
🧪 How to verify
Automate: retain the reusable SDK-spec workflow as a required pull-request check. Product take: Solid regression protection for the public flag-evaluation contract. It raises confidence in routine SDK changes, particularly around identity traits, without changing the shipped client. Big picture: The standalone spec build duplicates the production runtime dependency list. That gives one client source two dependency owners, so future library upgrades need changes in both builds to keep the behavioural check representative. Keeping those versions in a shared Gradle convention or generated dependency source would contain that drift risk. 🧭 Assumptions & unverified claimsNo unverified assumptions or claims. A welcome new canary for trait-shaped trouble · reviewed at 6464104 |
Runs the Flagsmith SDK behavioural spec against this SDK on every pull request and push to
main.sdk-spec/steps.kt: the spec's steps, one function perWhenstep, under the spec's Kotlin harness. It doubles as a usage example.sdk-spec/Dockerfile: builds the SDK from source with the steps file and the harness.sdk-spec/build.gradle.ktsis a standalone Gradle JVM build that compilesFlagsmithClient/src/main/javadirectly, with minimal stubs insdk-spec/srcfor theandroid.*classes the SDK references, so it runs in a plain Linux container without the Android SDK or an emulator. The client is created with analytics disabled, since analytics needs an AndroidContext; caching and realtime updates are off by default..github/workflows/sdk-spec.yml: calls the spec's reusable workflow, pinned tov0.5.0, withlanguage: kotlin. The workflow starts a real Flagsmith instance, seeds it through the Admin API and runs the scenarios through the harness.renovate.json: bumps theuses:ref andspec-reftogether. It only enables the regex manager for the spec, so Renovate doesn't start updating other dependencies.The spec currently covers getting environment flags and getting identity flags with traits. The identity scenario caught trait values being sent as strings, fixed in #90.
The dependency versions in
sdk-spec/build.gradle.ktsduplicate those inFlagsmithClient/build.gradle.ktsand need to be kept in sync.