fix(android): preserve numeric invoke error codes#99591
Conversation
|
Codex review: stale review; fresh review needed. Summary Next step |
139a77f to
815788a
Compare
a7e96d8 to
5a50a30
Compare
|
Maintainer closeout on exact head
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. |
|
Merged via squash.
|
* fix(android): preserve numeric invoke error codes * fix(android): tighten invoke error code parsing --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Android parses gateway invoke failures from
CODE: messagestrings so the UI can preserve stable error codes. The parser only accepted uppercase letters and underscores, so valid Android/gateway codes containing digits, such asA2UI_HOST_UNAVAILABLE, were downgraded toUNAVAILABLEand 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=plainpython .agents\skills\autoreview\scripts\autoreview --mode localreported clean with no accepted/actionable findings.