Skip to content

feat: Add client-use-post capability and POST request variants - #445

Merged
kinyoklion merged 2 commits into
v3from
rlamb/sdk-3052/client-use-post
Sep 8, 2026
Merged

feat: Add client-use-post capability and POST request variants#445
kinyoklion merged 2 commits into
v3from
rlamb/sdk-3052/client-use-post

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

FDv2 client-side SDKs can send the evaluation context in the request body with POST (the client-side FDv2 usePost option) instead of encoding it into the GET path. The harness could only exercise GET and, for SDKs that declare client-use-report, REPORT.

  • Adds the client-use-post capability and a clientSide.usePost configuration parameter.
  • The polling and streaming request tests (method and headers, URL path, query parameters, context properties, etag) gain a POST variant next to GET and REPORT when the SDK declares the capability. POST requests must use the FDv2 /sdk/poll/eval and /sdk/stream/eval paths and carry the context JSON in the body. Existing test names are unchanged; the new variants are additive.
  • The auto-env-attribute request-body tests use REPORT when the SDK declares client-use-report, otherwise POST when it declares client-use-post, and skip when it declares neither.
  • Documents the capability and parameter in docs/service_spec.md, including the promise that the harness never sets useReport and usePost in the same configuration, so test services do not need a precedence rule. A unit test pins that promise on the request-method configurer.

Verified against the Flutter client SDK contract test service with usePost support (launchdarkly/flutter-client-sdk, branch rlamb/sdk-3051/fdv2-use-post): the full v3 suite passes, 844 total, 823 ran, including 20 POST subtests.


Note

Overview
Adds client-use-post and clientSide.usePost so FDv2 client SDKs can be contract-tested when they send streaming/polling flag requests as POST with context in the body (parallel to existing REPORT / useReport).

When a test service declares the capability, shared poll/stream suites gain additive POST subtests: FDv2 /sdk/poll/eval and /sdk/stream/eval, body assertions via sendsContextInBody() (covers both REPORT and POST). Auto-env-attribute body tests pick REPORT if client-use-report is declared, else POST if client-use-post, otherwise skip.

docs/service_spec.md documents the capability and the rule that the harness never sets useReport and usePost together; a unit test locks that on withFlagRequestMethod.

Reviewed by Cursor Bugbot for commit 6b70b95. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 6b70b95. Configure here.

mockld.PollingPathContextBase64Param, // details of base64-encoded context data are tested separately
)
return h.IfElse(method == flagRequestREPORT,
return h.IfElse(method.sendsContextInBody(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Roku path matcher ignores POST

Medium Severity

The Roku polling URL-path matcher still treats only REPORT as a body method, so a POST variant falls through to the FDv1 GET prefix. availableFlagRequestMethods still adds POST when the SDK declares client-use-post, so those assertions check the wrong route instead of the FDv2 /sdk/poll/eval path.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 6b70b95. Configure here.

@kinyoklion
kinyoklion merged commit 377a9ac into v3 Sep 8, 2026
8 checks passed
@kinyoklion
kinyoklion deleted the rlamb/sdk-3052/client-use-post branch September 8, 2026 17:19
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