Skip to content

feat: Add contract tests for client-side secure mode hash (h query param)#376

Open
joker23 wants to merge 3 commits into
v3from
skz/sdk-2512/secure-mode-client-side-v3
Open

feat: Add contract tests for client-side secure mode hash (h query param)#376
joker23 wants to merge 3 commits into
v3from
skz/sdk-2512/secure-mode-client-side-v3

Conversation

@joker23

@joker23 joker23 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Cherry-picks the client-side secure mode hash contract tests from the v2 branch
  • Adds Hash field to SDKConfigClientSideParams so test services can receive the secure mode hash at client initialization
  • Registers doClientSideSecureModeHashTests in the client-side test suite
  • Adds MapHasKey helper to custom_matchers_general.go for cleaner key-existence assertions
  • Polling tests adapted to v3 data system API (NewCommonPollingTests / SDKDataSystem / Synchronizers[0].Endpoint())
  • Streaming tests adapted to use setupDataSystems instead of setupDataSources

Note

Low Risk
Test harness and documentation changes only; no production SDK runtime behavior in this repo.

Overview
Adds client-side contract coverage for secure mode: when clientSide.hash is set, client SDKs must send it as the h query parameter on streaming and polling connections, and omit h when hash is unset.

The harness now exposes hash on SDKConfigClientSideParams, documents it in service_spec.md, wires doClientSideSecureModeHashTests into the client-side suite (gated on secure-mode-hash), and introduces a MapHasKey matcher for asserting absence of h in parsed query strings.

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

joker23 added 2 commits July 8, 2026 16:22
…ram)

Adds streaming and polling contract tests verifying that client-side SDKs
include the h query parameter when a secure mode hash is configured, and
omit it when no hash is configured. Tests gate on the existing
secure-mode-hash capability alongside the implicit client-side requirement.

Adds Hash o.Maybe[string] to SDKConfigClientSideParams so the harness can
pass a hash value through the test protocol to client-side SDK test services.
@joker23 joker23 force-pushed the skz/sdk-2512/secure-mode-client-side-v3 branch from 9150650 to 5a59423 Compare July 8, 2026 20:41
@joker23 joker23 marked this pull request as ready for review July 8, 2026 20:41
@joker23 joker23 requested a review from a team as a code owner July 8, 2026 20:41

@devin-ai-integration devin-ai-integration Bot 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

1 participant