Repository navigation
test(android): consolidate gateway security fixtures - #118165
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 3, 2026
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
Repair shape
Root cause: these two gateway security suites repeatedly rebuilt the same UUID-isolated
SecurePrefs/NodeRuntime, approval catalog, exception, microphone-permission, and superclass-reflection setup. The duplication obscured the security-specific inputs and made fixes easy to apply unevenly.Architectural owner: the test fixtures in
GatewayBootstrapAuthTest.ktandGatewayExecApprovalRuntimeTest.kt. Production ownership remains inNodeRuntime,GatewaySession,GatewayTls,SecurePrefs, andDeviceAuthStore.Canonical fix: local deterministic fixture helpers preserve create -> connect/catalog seed -> approval seed ordering, use a fresh preferences namespace/runtime per invocation, and leave concrete assertions in each named case. Removed paths are duplicated test setup only; no runtime fallback or compatibility path changed.
Size and parity
0+219/-540, net-32153 + 26 = 79names retainedassertEquals,assertFalse,assertNotEquals,assertNotNull,assertNull, andassertTrue2bbc636c39036e3b534918012aabbe69725f602757793245381b56a7baa77980Security/lifecycle coverage retained
Proof
Blacksmith Testbox lease
tbx_01kz1ywkx530x4em7v8yy9gxza::app:ktlintCheck: passedGatewayBootstrapAuthTest+GatewayExecApprovalRuntimeTest: passed in Play and third-party flavorspnpm check:changed -- <two files>gate: passedorigin/main: clean; no Android files changed on main since the proven baseOne combined adjacent run hit Robolectric's
FileSystemAlreadyExistsExceptionwhile loading native fonts across consecutive flavor tasks in one reused Gradle daemon. Third-party passed immediately in isolation; Play then passed all 142 with a fresh single-use daemon. The focused both-flavor run had already passed.Two independent xhigh reviewers returned CLEAN and judged this the canonical bounded fix. Their only residual note is the intentional package-level test-helper relationship for superclass reflection; both flavors compile and exercise the complete test source set.
Final collision census through
2026-08-02T19:55:14.981Z: 143 updated open PRs fully paged, including the 213-file oversized tail; exact matches for both reserved paths were zero.No changelog: test-only refactor with no user-visible behavior change.