Skip to content

test(android): await gateway trust lifecycle publication - #139807

Merged
steipete merged 1 commit into
mainfrom
codex/android-bootstrap-trust-test-sync
Sep 6, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/android-bootstrap-trust-test-sync

Conversation

@steipete

@steipete steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

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:ktlintCheck passed. Independent P2 review found no actionable issues. Production LOC: 0; tests: +4.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: XS maintainer Maintainer-authored PR labels Sep 6, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 2:01 AM ET / 06:01 UTC.

ClawSweeper review

What this changes

Android 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
Reviewed head: 2bf7602e8b95806ea3c3fbef51d48cfd1ce266ec

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused test repair with sound publication ordering, preserved safeguards, and reported targeted validation.
Proof confidence 🌊 off-meta tidepool Not applicable: The supplied MEMBER classification exempts this test-only PR from external-contributor runtime proof; its reported focused Robolectric and lint results support test validation without claiming live Android behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The supplied MEMBER classification exempts this test-only PR from external-contributor runtime proof; its reported focused Robolectric and lint results support test validation without claiming live Android behavior.
Evidence reviewed 6 items Verified introduced scope: The pinned merge-base-to-head diff changes only existing trust tests, retaining pre-confirmation checks and existing wait bounds.
Asynchronous lifecycle explains the race: The lifecycle helper queues work when its mutex is occupied. Acceptance saves the pin before starting the replacement connection; dismissal clears the prompt inside that same lifecycle. Waiting for publication therefore matches the owner’s actual ordering.
Connection publication boundary: GatewaySession publishes its desired connection through a volatile field. The existing helper observes this publication, and the added assertion verifies that the session receives the newly accepted fingerprint.
Findings None None.
Security None None.

How this fits together

Android’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]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +4. Total +4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 5 1 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 5 1 +4

Review metrics

None.

Technical review

Best 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.

Labels

Label justifications:

  • P3: This repairs test synchronization without changing production behavior or user settings.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The supplied MEMBER classification exempts this test-only PR from external-contributor runtime proof; its reported focused Robolectric and lint results support test validation without claiming live Android behavior.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T05:50:23.720Z sha 2bf7602 :: needs maintainer review before merge. :: none

@steipete
steipete marked this pull request as ready for review September 6, 2026 05:55
@steipete
steipete merged commit a17fa9b into main Sep 6, 2026
118 checks passed
@steipete
steipete deleted the codex/android-bootstrap-trust-test-sync branch September 6, 2026 06:36
@steipete

steipete commented Sep 6, 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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant