Skip to content

test(android): consolidate gateway security fixtures - #118165

Merged
steipete merged 1 commit into
mainfrom
codex/goal100k-android-gateway-fixture-wave19-2d45
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/goal100k-android-gateway-fixture-wave19-2d45

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • centralize fresh Android gateway runtime, preferences, TLS-probe, auth, voice, approval, rejection, and reflection fixtures
  • remove repeated setup while retaining all 79 named security/lifecycle tests and every assertion call
  • keep production, config, protocol, schema, dependencies, and user-visible behavior unchanged

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.kt and GatewayExecApprovalRuntimeTest.kt. Production ownership remains in NodeRuntime, GatewaySession, GatewayTls, SecurePrefs, and DeviceAuthStore.

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

  • production LOC: 0
  • tests/total: +219/-540, net -321
  • tests: exact 53 + 26 = 79 names retained
  • assertion calls: exact per-file parity across assertEquals, assertFalse, assertNotEquals, assertNotNull, assertNull, and assertTrue
  • reviewed diff SHA-256: 2bbc636c39036e3b534918012aabbe69725f602757793245381b56a7baa77980

Security/lifecycle coverage retained

  • bootstrap-only isolation and stored operator-token handoff
  • explicit shared auth preference and operator/admin scope behavior
  • TLS trust prompt, pin replacement, manual fingerprint, timeout, and stale-probe fencing
  • pairing/credential/token/transcript reset ownership
  • canonical versus legacy approval methods, fail-closed routing, unknown write reconciliation, stale socket/epoch fencing, and notice lifecycle
  • coroutine cancellation/connect ordering and microphone ownership races

Proof

Blacksmith Testbox lease tbx_01kz1ywkx530x4em7v8yy9gxza:

  • :app:ktlintCheck: passed
  • focused GatewayBootstrapAuthTest + GatewayExecApprovalRuntimeTest: passed in Play and third-party flavors
  • adjacent pairing, approval parsing/state, secure preferences, device auth, TLS, and gateway-session ring: 142 tests passed per flavor
  • repository pnpm check:changed -- <two files> gate: passed
  • synthetic merge against current origin/main: clean; no Android files changed on main since the proven base

One combined adjacent run hit Robolectric's FileSystemAlreadyExistsException while 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.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: L maintainer Maintainer-authored PR labels Aug 2, 2026
@steipete steipete self-assigned this Aug 2, 2026
@steipete
steipete merged commit aae0342 into main Aug 2, 2026
59 of 61 checks passed
@steipete
steipete deleted the codex/goal100k-android-gateway-fixture-wave19-2d45 branch August 2, 2026 20:17
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant