test(concurrent-keys): integration coverage for view-scoped key rejection - #796
Draft
aaron-zeisler wants to merge 1 commit into
Conversation
aaron-zeisler
force-pushed
the
aaronz/SDK-2860/reject-view-scoped-keys
branch
from
August 5, 2026 20:40
c6bcde9 to
677f834
Compare
aaron-zeisler
force-pushed
the
aaronz/SDK-2860/view-scoped-keys-integration-tests
branch
5 times, most recently
from
August 6, 2026 17:55
9479d41 to
bd308e1
Compare
aaron-zeisler
force-pushed
the
aaronz/SDK-2860/reject-view-scoped-keys
branch
from
August 6, 2026 20:12
706ca7a to
ffc86d5
Compare
…tion Exercises the ingestion filter through both real harnesses — the auto-config stream and the offline archive — rather than at the BuildAcceptedSet unit boundary, so the assertions run against actual downstream authentication and live SDK connections. Covers the cases the unit tests cannot reach: that a rejected key really does fail auth on every SDK endpoint while its siblings keep working, that it is absent from the /status arrays, that a key which gains a view mid-session has its live stream torn down and cannot reconnect while other keys' connections stay up, that losing the view again re-admits it, and that a malformed payload carrying view-scoped keys logs the malformed error without claiming to have rejected anything. Also pins that the ingestion WARN fires exactly once per payload, which is what makes the decision to keep the stream parse boundary silent regress loudly rather than silently doubling every message.
aaron-zeisler
force-pushed
the
aaronz/SDK-2860/view-scoped-keys-integration-tests
branch
from
August 6, 2026 20:15
bd308e1 to
279df24
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
Integration coverage for the view-scoped key rejection added in #795. Stacked on that branch — review #795 first, and this will retarget to
feat/concurrent-keysautomatically once it merges.Jira: SDK-2860
Background
#795 proves the filter at the
BuildAcceptedSetunit boundary: given params, the right keys land in the accepted set and the right identifiers are reported. That leaves the questions a unit test structurally cannot answer — whether a rejected credential actually fails downstream authentication, whether it really carries no state anywhere in the environment, and whether a live SDK connection on a key that gains a view is genuinely torn down.These run through the two real harnesses in the existing
concurrent_keys_*_test.gofamily (autoConfTestfor the auto-config stream,offlineModeTestfor the archive), so the assertions hit actual HTTP endpoints, a real/statusresponse, and live event streams.Changes
Seven tests, mirroring the four cases named in the ticket:
/statussdkKeys[]/mobileKeys[]arrays (asserted by exact count, so a key surfacing under an unexpected obscured value is still caught).The ingestion WARN is also asserted to fire exactly once per payload. That is what makes the decision to keep
StreamManager.validateCredentialPayloadsilent regress loudly — it runs on every environment of every payload, so logging from there would double every message.Every test was mutation-checked: disabling the non-anchor filter fails four of them, disabling the designated-key branch fails the other two, and the malformed-payload case fails only when both of its independent defenses are broken.