Skip to content

fix(android): preserve numeric invoke error codes#99591

Merged
steipete merged 2 commits into
openclaw:mainfrom
ly85206559:codex/android-invoke-error-numeric-codes
Jul 3, 2026
Merged

fix(android): preserve numeric invoke error codes#99591
steipete merged 2 commits into
openclaw:mainfrom
ly85206559:codex/android-invoke-error-numeric-codes

Conversation

@ly85206559

@ly85206559 ly85206559 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Android parses gateway invoke failures from CODE: message strings so the UI can preserve stable error codes. The parser only accepted uppercase letters and underscores, so valid Android/gateway codes containing digits, such as A2UI_HOST_UNAVAILABLE, were downgraded to UNAVAILABLE and shown/classified as generic failures.

Why This Change Was Made

Gateway and Android node errors already use canonical uppercase codes that can include digits. This change keeps the existing strict parser shape but allows digits alongside uppercase letters and underscores.

User Impact

Android users now see the specific A2UI/gateway error code instead of a generic unavailable error when the code contains a numeric component.

Evidence

  • JAVA_HOME='F:\Program Files\Android\Android Studio\jbr' ANDROID_HOME='F:\Android\Sdk' ANDROID_SDK_ROOT='F:\Android\Sdk' GRADLE_OPTS='-Xmx1g -Dfile.encoding=UTF-8' ./gradlew.bat --no-daemon :app:testPlayDebugUnitTest --tests ai.openclaw.app.gateway.InvokeErrorParserTest --console=plain
  • python .agents\skills\autoreview\scripts\autoreview --mode local reported clean with no accepted/actionable findings.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android size: XS triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Jul 3, 2026
@clawsweeper

clawsweeper Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head a7e96d838b86d237eeb7eb38b49b6c8947b8b2b8, but the PR head is now 5a50a30e78c24f6017a6498d8936e26792df0b80. Its old verdict and PR readiness labels are no longer current.

Next step
Run or wait for a fresh ClawSweeper review on the current PR head.

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Jul 3, 2026
@ly85206559
ly85206559 force-pushed the codex/android-invoke-error-numeric-codes branch from 139a77f to 815788a Compare July 3, 2026 15:59
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 3, 2026
@steipete steipete self-assigned this Jul 3, 2026
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: telegram Channel integration: telegram scripts Repository scripts commands Command implementations agents Agent runtime and tooling labels Jul 3, 2026
@steipete
steipete marked this pull request as ready for review July 3, 2026 18:15
@steipete
steipete force-pushed the codex/android-invoke-error-numeric-codes branch from a7e96d8 to 5a50a30 Compare July 3, 2026 18:17
@openclaw-barnacle openclaw-barnacle Bot added size: XS and removed docs Improvements or additions to documentation channel: telegram Channel integration: telegram scripts Repository scripts commands Command implementations agents Agent runtime and tooling size: XL labels Jul 3, 2026
@steipete

steipete commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Maintainer closeout on exact head 5a50a30e78c24f6017a6498d8936e26792df0b80:

  • Refined the parser from a permissive per-character check to the canonical ^[A-Z][A-Z0-9_]*$ shape. This preserves A2UI_HOST_UNAVAILABLE while keeping leading-digit, leading-underscore, hyphenated, and mixed-case exception prefixes on the plain-text fallback path.
  • Expanded focused regressions for the accepted numeric-bearing code and malformed-prefix boundaries.
  • Local proof:
    • ANDROID_HOME=$HOME/Library/Android/sdk ./gradlew :app:testPlayDebugUnitTest --tests ai.openclaw.app.gateway.InvokeErrorParserTest
    • ANDROID_HOME=$HOME/Library/Android/sdk ./gradlew :app:assemblePlayDebug
  • Live proof: installed the Play debug APK on an Android 16 emulator, paired and node-approved it against an isolated real local Gateway, then invoked canvas.a2ui.reset; the Gateway surfaced A2UI_HOST_UNAVAILABLE: bundled A2UI host not reachable with the numeric-bearing code intact.
  • Fresh Codex autoreview: clean in uncommitted mode and again for the full branch against origin/main.
  • Exact-head CI: run 28677112511 green, including android-test-play, android-test-third-party, android-build-play, native i18n, security, and preflight.

Known proof boundary: the live A2UI command returns a structured invoke result directly; the throwable-normalization parser changed here is therefore covered by the focused unit regression, while the emulator/Gateway run proves the real numeric code and node transport. No screenshot attached because this PR has no UI change.

@steipete
steipete merged commit df14527 into openclaw:main Jul 3, 2026
50 of 55 checks passed
@steipete

steipete commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 4, 2026
* fix(android): preserve numeric invoke error codes

* fix(android): tighten invoke error code parsing

---------

Co-authored-by: Peter Steinberger <[email protected]>
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. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants