Repository navigation
test(android): await gateway trust lifecycle publication - #139807
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 2:01 AM ET / 06:01 UTC. ClawSweeper reviewWhat this changesAndroid gateway trust tests wait for dismissal and accepted connection publication before checking saved certificate pins. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful, narrowly scoped test repair absent from fetched main. No actionable patch defects were found; maintainer-authored and protected-label work is also exempt from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherAndroid’s gateway connection lifecycle handles certificate trust decisions before preparing a connection. These tests verify that explicit authentication and accepted certificate pins survive that asynchronous process. flowchart TD
A[Gateway connection request] --> B[Certificate trust prompt]
B --> C[Accept or decline]
C --> D[Serialized connection lifecycle]
D --> E[Dismissed prompt or prepared connection]
E --> F[Test checks saved and active certificate pins]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +4. Total +4 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep the existing bounded waits tied to lifecycle publication while preserving both saved-pin and connection-pin assertions. Do we have a high-confidence way to reproduce the issue? Yes, source establishes the race: a busy lifecycle mutex lets trust calls return before queued pin or prompt updates, while the old tests immediately inspect them. No tests were executed during this read-only review. Is this the best way to solve the issue? Yes, observing the existing publication boundary is a focused repair that preserves assertions and deadlines without changing production synchronization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ec29145c0edc. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
What Problem This Solves
Android trust tests can read an old certificate pin or a prior prompt when acceptance or dismissal queues behind the connection lifecycle mutex.
Why This Change Was Made
The tests wait for prompt dismissal before reconnecting, then observe the accepted node connection before checking the saved pin. The adjacent explicit setup-auth test uses the same publication ordering.
User Impact
No production changes. Pre-confirmation pin checks and existing wait bounds remain intact. This separate test repair was identified while validating #135599.
Evidence
CI failure showed the changed-fingerprint test reading the old pin. All 54 GatewayBootstrapAuthTest cases passed through
:app:testThirdPartyDebugUnitTest --tests ai.openclaw.app.GatewayBootstrapAuthTest, and:app:ktlintCheckpassed. Independent P2 review found no actionable issues. Production LOC: 0; tests: +4.