Skip to content

fix(android): session filters, talk config booleans, notification loop guard, IPv6 zone hosts#99548

Closed
ly85206559 wants to merge 1 commit into
openclaw:mainfrom
ly85206559:fix/android-session-talk-notification-ipv6
Closed

fix(android): session filters, talk config booleans, notification loop guard, IPv6 zone hosts#99548
ly85206559 wants to merge 1 commit into
openclaw:mainfrom
ly85206559:fix/android-session-talk-notification-ipv6

Conversation

@ly85206559

Copy link
Copy Markdown
Contributor

What Problem This Solves

Four small Android parity/correctness bugs:

  1. SessionFilters — device/internal sessions (agent:main:node-*, agent:main:main, onboarding) appeared in thread picker unlike iOS isRecentChatSession.
  2. TalkModeGatewayConfig — interruptOnSpeech: true` string config was ignored while sibling parsers accept string booleans.
  3. Notification forwarding — allowlist mode could forward OpenClaw's own notifications, risking gateway/node loops (blocklist already blocked self).
  4. GatewayConfigResolver — IPv6 zone URLs like ws://[fe80::1%25eth0] passed cleartext validation but stored %25eth0 in the connection host, breaking socket connect.

Why This Change Was Made

Align Android behavior with iOS session filtering, existing boolean parsing conventions, fail-closed notification forwarding, and socket-ready gateway host normalization used elsewhere in cleartext host checks.

User Impact

  • Cleaner session picker without device/internal noise.
  • Talk interrupt-on-speech respects string gateway config values.
  • Notification allowlists cannot accidentally forward the OpenClaw app itself.
  • Link-local IPv6 manual/QR gateway URLs connect using bare literals (fe80::1).

Evidence

  • SessionFiltersTest.sessionChoicesFilterAgentDeviceAndInternalSessions
  • SessionFiltersTest.isSelectableChatSession_matchesIosRecentSessionFilter
  • TalkModeConfigParsingTest.parsesStringInterruptOnSpeechFlag
  • NotificationForwardingPolicyTest.allowsPackage_neverForwardsSelfPackageEvenInAllowlist
  • SecurePrefsNotificationForwardingTest.getNotificationForwardingPolicy_blocksSelfPackageInAllowlistMode
  • Updated GatewayConfigResolverTest IPv6 zone expectations

Proof command:

cd apps/android
./gradlew :app:testPlayDebugUnitTest \
  --tests ai.openclaw.app.ui.chat.SessionFiltersTest \
  --tests ai.openclaw.app.voice.TalkModeConfigParsingTest \
  --tests ai.openclaw.app.NotificationForwardingPolicyTest \
  --tests ai.openclaw.app.SecurePrefsNotificationForwardingTest \
  --tests ai.openclaw.app.ui.GatewayConfigResolverTest.parseGatewayEndpointAllowsLinkLocalIpv6ZoneCleartextWsUrls \
  --tests ai.openclaw.app.ui.GatewayConfigResolverTest.parseGatewayEndpointAllowsSecureIpv6ZoneUrls

…ipv6 hosts

Filter internal/device sessions from thread picker parity with iOS, accept
string talk config booleans, block self-package notification forwarding in
allowlist mode, and normalize IPv6 zone IDs to socket-ready gateway hosts.

Co-authored-by: Cursor <[email protected]>
@clawsweeper

clawsweeper Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 3, 2026, 9:39 AM ET / 13:39 UTC.

Summary
The PR updates Android session filtering, Talk gateway config boolean parsing, notification forwarding policy construction, IPv6 zone-host normalization, and focused unit tests.

PR surface: Other +152. Total +152 across 10 files.

Reproducibility: no. high-confidence live repro was established. Source inspection shows current main lacks the Android session filter, Talk string-boolean parser, and IPv6 host normalization, but the notification forwarding loop claim is partly already guarded at the listener callback.

Review metrics: none identified.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted Android emulator or device proof for the visible session picker behavior and runtime proof for the Talk, notification, and IPv6 endpoint paths.
  • Update the PR body with the proof so ClawSweeper can re-review the current head automatically.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR body only lists unit-test proof; the contributor should add redacted emulator/device screenshots, terminal output, logs, or a recording showing the after-fix Android behavior, then update the PR body for re-review.

Mantis proof suggestion
A visual Android proof would materially help review the user-visible session picker portion of the PR, though non-visual paths still need logs or terminal proof. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: record Android app proof that the session picker hides internal/device sessions while a channel session remains selectable, with private endpoint details redacted.

Risk before merge

  • [P1] Contributor real behavior proof is missing; unit tests alone do not show the after-fix Android app, notification, Talk config, or gateway connection paths.
  • [P1] The notification-loop subclaim is partly already blocked by DeviceNotificationListenerService on current main, so maintainers should treat that hunk as helper-level defense in depth rather than the only production forwarding guard.

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused Android fixes after redacted device or emulator proof demonstrates the changed behaviors and maintainer review accepts the policy-level notification hardening.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Needs contributor real behavior proof and normal maintainer review; there is no actionable code defect for an autonomous repair lane.

Security
Cleared: No concrete security or supply-chain concern was found; the diff changes Android app code/tests only and adds no dependencies, workflows, secrets, or release paths.

Review details

Best possible solution:

Land the focused Android fixes after redacted device or emulator proof demonstrates the changed behaviors and maintainer review accepts the policy-level notification hardening.

Do we have a high-confidence way to reproduce the issue?

No high-confidence live repro was established. Source inspection shows current main lacks the Android session filter, Talk string-boolean parser, and IPv6 host normalization, but the notification forwarding loop claim is partly already guarded at the listener callback.

Is this the best way to solve the issue?

Yes for the main code shape: the changes stay in the Android app boundary and mirror iOS or sibling Android parser behavior. The remaining blocker is after-fix real behavior proof, not an obvious better implementation path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 153fed790a5c.

Label changes

Label justifications:

  • P2: This PR fixes bounded Android correctness issues across chat, Talk, notifications, and gateway setup, but the remaining blocker is proof/review rather than an urgent live regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR body only lists unit-test proof; the contributor should add redacted emulator/device screenshots, terminal output, logs, or a recording showing the after-fix Android behavior, then update the PR body for re-review.
Evidence reviewed

PR surface:

Other +152. Total +152 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 10 163 11 +152
Total 10 163 11 +152

What I checked:

Likely related people:

  • obviyus: Authored and merged Android Talk gateway synthesis work and merged the notification forwarding controls that introduced the relevant policy/listener surface. (role: Android Talk and notification history contributor; confidence: high; commits: 788d25ff1e26, 1a8fab063b12, 825f03eed722; files: apps/android/app/src/main/java/ai/openclaw/app/voice/TalkModeGatewayConfig.kt, apps/android/app/src/main/java/ai/openclaw/app/NotificationForwardingPolicy.kt, apps/android/app/src/main/java/ai/openclaw/app/SecurePrefs.kt)
  • nimbleenigma: PR history shows this account authored the Android notification forwarding controls, listener enforcement, policy helpers, and adjacent tests later finalized in the merged notification work. (role: notification forwarding introducer; confidence: high; commits: 27141c711bbf, 6cfb6859bb7b, f82ca2804b6a; files: apps/android/app/src/main/java/ai/openclaw/app/node/DeviceNotificationListenerService.kt, apps/android/app/src/main/java/ai/openclaw/app/NotificationForwardingPolicy.kt, apps/android/app/src/test/java/ai/openclaw/app/NotificationForwardingPolicyTest.kt)
  • jesse-merhi: Merged Android gateway onboarding work recently touched GatewayConfigResolver and nearby endpoint/auth setup behavior that this PR changes for IPv6-zone hosts. (role: recent Android gateway contributor; confidence: high; commits: 64318d7624a8, 54aab45b400e, 9da4acfcfa1d; files: apps/android/app/src/main/java/ai/openclaw/app/ui/GatewayConfigResolver.kt, apps/android/app/src/main/java/ai/openclaw/app/ui/OnboardingFlow.kt, apps/android/app/src/test/java/ai/openclaw/app/ui/GatewayConfigResolverTest.kt)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 3, 2026
@ly85206559

Copy link
Copy Markdown
Contributor Author

Superseded by four focused PRs: #99557, #99558, #99559, #99560.

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

Labels

app: android App: android P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant