feat: Add contract tests for client-side secure mode hash (h query param)#376
Open
joker23 wants to merge 3 commits into
Open
feat: Add contract tests for client-side secure mode hash (h query param)#376joker23 wants to merge 3 commits into
joker23 wants to merge 3 commits into
Conversation
…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.
9150650 to
5a59423
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hashfield toSDKConfigClientSideParamsso test services can receive the secure mode hash at client initializationdoClientSideSecureModeHashTestsin the client-side test suiteMapHasKeyhelper tocustom_matchers_general.gofor cleaner key-existence assertionsNewCommonPollingTests/SDKDataSystem/Synchronizers[0].Endpoint())setupDataSystemsinstead ofsetupDataSourcesNote
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.hashis set, client SDKs must send it as thehquery parameter on streaming and polling connections, and omithwhen hash is unset.The harness now exposes
hashonSDKConfigClientSideParams, documents it inservice_spec.md, wiresdoClientSideSecureModeHashTestsinto the client-side suite (gated onsecure-mode-hash), and introduces aMapHasKeymatcher for asserting absence ofhin parsed query strings.Reviewed by Cursor Bugbot for commit 4018c80. Bugbot is set up for automated code reviews on this repo. Configure here.