Repository navigation
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 real behavior proof before merge. What this changesThis PR adds Android OpenClaw ID node enrollment and an opt-in native tunnel transport. Example: An Android user scans a node invitation and enters https://discovery.example.test.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 9 items remain Keep this maintainer-authored draft open; the enrollment handoff bypasses existing gateway-switch safeguards, and the explicitly deferred storage decision remains unresolved. Priority: P2 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherAndroid onboarding passes invitations to a runtime enrollment controller, which persists identity and verified trust through SecurePrefs and supplies a native tunnel-backed WebSocket to the existing GatewaySession. flowchart LR
A[Android setup UI] --> B[Enrollment controller]
B --> C[Discovery HTTPS]
B --> D[SecurePrefs identity and trust]
D --> E[Native tunnel adapter]
E --> F[GatewaySession node connection]
F --> G[Gateway]
Technical reviewBest possible solution: Keep enrollment and transport in their existing owners, route the admitted target through guarded gateway-switch admission, and retain the draft until its explicit approval and qualification gates are satisfied. Do we have a high-confidence way to reproduce the issue? Source tracing establishes the handoff bypass: an admitted invitation calls raw connect(), whereas ordinary Add Gateway admission checks pending composer work and active audio; no target code was executed. Is this the best way to solve the issue? The native adapter and node-only session reuse are coherent, but the smallest complete implementation must reuse the existing guarded switching owner when enrollment finishes. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 21cd90050fb6. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Node-only credential separation is visible in source, but final-effect role and revocation enforcement remains unproven. EvidenceSecurity concerns:
What I checked:
Likely related people:
PR surfaceSource +2454, Tests +2136, Docs +65, Config +103. Total +4758 across 42 files. Added test files: 6. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 6, 2026, 11:07 AM ET / 16:07 UTC. |
031aad5 to
69e19a5
Compare
b3959bc to
22ea74b
Compare
22ea74b to
ec707e2
Compare
69e19a5 to
7f9243b
Compare
ec707e2 to
f05b1ad
Compare
7f9243b to
b6765ac
Compare
f05b1ad to
15a773f
Compare
b6765ac to
76878bb
Compare
15a773f to
62742ee
Compare
76878bb to
f1adbdd
Compare
62742ee to
d5f9459
Compare
Integrate the shared UniFFI binding, retain native results across cancellation, and provision JNI build prerequisites through shared Android CI setup. Refs: openclaw-517.9. Android build/device proof and complete distribution license notices remain outstanding.
Exercise the existing durable trust owner with a signed node-removal snapshot, failed persistence, and older membership replay after reopening the store. Production already persists advanced state on refusal; no storage contract changes.
Keep shared Android CI and native-owner workflows unchanged. Gate Rust packaging behind openclawIrohNative and fail closed without a native factory. Add one filtered opt-in packaging proof workflow with a pinned checksummed rustup installer. Current-pin Kotlin/JNA/Rust loopback and 24 JVM regressions pass. Android SDK/device proof remains unverified; upstream generated Kotlin currently fails the unchanged warnings-as-errors gate.
d5f9459 to
2d4ba2a
Compare
Storage contract approved (Josh)
Josh approved the proposed Android durable storage contract on November 8, 2026, at 16:28 PST ("Approve: 1", relayed by the coordinator): one encrypted
SecurePrefsrecord keyednode.openclaw-id.$stableId, wherestableIdisopenclaw-id|${clawId}|${rootFingerprint.substringAfter(':')}. Approved fields areclaw,root,host,discovery,relay,admitted,seed(W), andtrustcontainingbinding,seq,issued, andsnapshotBinding.The approved behavior advances durable high-water state for a newer signed removal snapshot and never exposes a dial target after storage failure. Node keys are separate from device-auth keys across platforms. The existing
OpenClawIdNodeStore.kt/NodeRuntime.ktimplementation matches this storage shape; no source change is needed.Keep this PR draft: storage approval does not waive device/emulator proof, a real enrollment-to-Gateway connection, UI screenshots, or the license-notice distribution gate; these remain open.
Related: #194174 (native crate base). Coordinated work:
openclaw-517; Android laneopenclaw-517.9.What Problem This Solves
Android needs an explicit, owner-approved way to enroll as an OpenClaw ID node and reach its Gateway through the native tunnel without acquiring operator or chat credentials.
User Impact
Opt-in builds provide an experimental paste-or-scan node invitation flow with a separate Discovery HTTPS origin, a six-digit verification code, and owner approval of the declared capabilities. This is node-only access, not an operator/chat login.
Native packaging is opt-in with
-PopenclawIrohNative=true. Existing default build lanes remain unchanged: they do not require Rust/NDK or package this native transport. Generated Kotlin still compiles unconditionally; attempting an OpenClaw ID node connection without native packaging fails closed with a clear “native transport not packaged” error. Ordinary Gateway connections retain their existing path.Why This Change Was Made
The Android adapter uses the OpenClaw-owned UniFFI crate from native commit
92c25067451b1a105b1e83615da641e352c51e7c, with matching checked-in Kotlin bindings. Enrollment verifies pinned signed trust evidence before dialing the verified server key overopenclaw/tunnel/1; no TCP proxy, default relay, hostname dial, or direct WebSocket fallback is added.Native suspend calls drain under
NonCancellable, explicit cancellation signals terminate the underlying work, and returned resources are disposed if cancellation wins the handoff. Cancelling admission may retire this node's single connection; reconnect recreates it. Endpoint initialization is lazy and seed buffers are erased.The dedicated path-filtered
android-iroh-native.ymlowns its NDK/Rust provisioning and verifies a pinned rustup-init checksum before execution. Shared Android actions, CodeQL, and the native owner'siroh-ffi.ymlare unchanged relative to the base.Scope/simplification: this is the Android consumer stage stacked on the separately owned native crate, not a second transport owner. The earlier shared CI provisioning and obsolete guard allocation were removed in favor of one opt-in packaging lane. Necessary growth is enrollment/trust verification, framing, the transport adapter, explicit UI intent, and distinct replay/cancellation/EOF regressions; the checked-in protocol fixture accounts for 1,127 lines. Against the native base: 39 files, 4,737 insertions and 19 deletions. No native crate changes are included in this consumer diff.
Enrollment handoff repair
9894edf0d4a3dfabe52923f2e4123dd9bd64ce26saves approved enrollment without activating the target, then uses the existing quick-switch owner to recheck composer and microphone work at the handoff. Cancelled or retired enrollment cannot resume a stopped service. A busy user keeps the current Gateway and can select the saved node later.Seven production-controller regression cases cover import, send and audio beginning during approval, idle handoff, cancellation, ViewModel retirement, and service Stop. HTTP I/O and the native endpoint are fixtures; Discovery decoding, signed trust, durable enrollment and UI/runtime admission are production paths. Independent Astra source review found no verified P0–P2 findings. The one changed UI string has its regenerated native i18n inventory;
native:i18n:verifyandgit diff --checkpassed.Compilation, unit tests and debug native packaging passed on exact head
9894edf0d4a3dfabe52923f2e4123dd9bd64ce26in both the push run and PR run. Terminal PR-run logs confirmtestPlayDebugUnitTestandtestThirdPartyDebugUnitTestexecuted successfully; the workflow verifies the default APK excludes iroh and both opt-in debug variants contain all four native ABIs. No local Gradle execution or screenshot/device proof is claimed. Keep this PR draft; device/runtime, upgrade and distribution qualification remain open. Rebind/J5 is a separate stacked follow-up in #196442.Evidence
Passed:
92c25067451b1a105b1e83615da641e352c51e7c: framed HEAD status 101, FIN, maximum 62-bit numeric application-close code, explicit connect cancellation token, and a typed pre-cancelled dial. Built from the exact archived source with locked Rust 1.99.0 inputs; Linux x86_64 only, not Android JNI proof. Native library SHA-256:5075327bfbed3e3cf89ab261b24648917d2781c03b37cc09b28bdb7bb1d66a0b(13,185,944 bytes).git diff --check.Packaging passed at head
b3959bc24da3d965326483351b68cdae9ba213b3: PR run and push run, verifying the default APK excludes iroh and the opt-in Android variants build and pass their tests; this is build/packaging evidence, not device-runtime proof.The unmodified generated binding builds in
:openclaw-irohwith compiler warnings allowed, while the app retains its unchangedallWarningsAsErrors(true)gate; no native-generator-owner action is required.Unverified / required before completion:
openclaw-517P2 task remains open. The inventory covers 285 crates; 20 archives lack notices. Complete transitive notices and MPL source-availability obligations for UniFFI andattohttpcare not complete. The current iroh/Tailscale notice is partial, not clearance to distribute.No host SDK/NDK installation or app distribution was performed. Storage approval is recorded above; this draft does not waive remaining device/runtime proof, screenshots, or the distribution gate.