fix(android): bracket IPv6 hosts in manual gateway URL composition#99107
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 2, 2026, 2:19 PM ET / 18:19 UTC. Summary PR surface: Other +18. Total +18 across 2 files. Reproducibility: yes. Source inspection shows current main composes bare manual IPv6 input into an unbracketed URL before Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow formatter reuse once current-head Android CI finishes, while keeping scheme-prefixed Host input normalization in the adjacent PR rather than widening this branch. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main composes bare manual IPv6 input into an unbracketed URL before Is this the best way to solve the issue? Yes. Reusing the existing AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 826c84ea1942. Label changesLabel justifications:
Evidence reviewedPR surface: Other +18. Total +18 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
|
Maintainer verification Before — bare IPv6 manual host is rejected as an invalid gateway URL:
After — the same host is accepted and the app advances to Gateway Recovery:
Validation:
Proof gap: no live IPv6 Gateway was available; the real app path was verified through accepted parsing into connection recovery. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Reuse formatGatewayAuthority when building manual gateway URLs so IPv6 loopback and LAN hosts parse correctly during onboarding connect setup. Co-authored-by: Cursor <[email protected]>
2eb66ac to
0fb908e
Compare
|
Merged via squash.
|
…penclaw#99107) * fix(android): bracket IPv6 hosts in manual gateway URL composition Reuse formatGatewayAuthority when building manual gateway URLs so IPv6 loopback and LAN hosts parse correctly during onboarding connect setup. Co-authored-by: Cursor <[email protected]> * test(android): cover bracketed IPv6 gateway hosts * fix(android): avoid gateway i18n inventory churn --------- Co-authored-by: Cursor <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>


What Problem This Solves
Manual gateway onboarding accepts IPv6 hosts such as
::1, butcomposeGatewayManualUrlbuilt URLs likehttp://::1:18789, which JavaURIcannot parse. Users entering IPv6 loopback or LAN addresses in the Host field could not connect even though pastedws://[::1]URLs worked.Why This Change Was Made
Reuse the existing
formatGatewayAuthorityhelper (already used for WebSocket URLs) when composing manual gateway URLs so IPv6 hosts are bracketed consistently.User Impact
Android manual/advanced gateway setup now resolves IPv6 hosts correctly (for example
::1on port18789).Evidence
composeGatewayManualUrl_bracketsIpv6ForEndpointParsinginGatewayConfigResolverTest.kt.cd apps/android ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.ui.GatewayConfigResolverTest.composeGatewayManualUrl_bracketsIpv6ForEndpointParsing