Skip to content

fix: serialize non-finite accessibility ranges - #150

Merged
RasulOs merged 1 commit into
mainfrom
fix/portal-infinity-minimax-config
Jul 27, 2026
Merged

fix: serialize non-finite accessibility ranges#150
RasulOs merged 1 commit into
mainfrom
fix/portal-infinity-minimax-config

Conversation

@RasulOs

@RasulOs RasulOs commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Serialize non-finite accessibility range values as JSON null.
  • Preserve finite min, max, and current values and the range type.
  • Add JVM regressions for -Infinity, +Infinity, NaN, and finite ranges.
  • Add an Android instrumentation regression using a real framework-sealed accessibility node with unbounded range bounds.

Root cause

Android permits accessibility ranges with infinite bounds. Portal copied those values directly into its accessibility-tree JSON, but JSON encoding rejects non-finite numbers with Forbidden numeric value: -Infinity. As a result, state_full/get_state failed and the client repeatedly retried an unrecoverable serialization error.

User impact

Accessibility trees containing unbounded ranges now return valid JSON. Consumers receive null for non-finite range fields instead of losing the entire device state response.

Validation

  • Focused AccessibilityTreeBuilderTest: 7/7 passed
  • Debug Portal APK and Android test APK built successfully
  • Android 16/API 36 instrumentation regression: passed
  • Live state_full validation: successful valid JSON with no forbidden numeric-value error
  • Full JVM suite: 482/483 passed. The remaining failure is the unrelated pre-existing SwitchTintResourceTest.trackTintSeparatesCheckedAndUncheckedStates color mismatch (#0D9373 expected, #4566D9 actual); the relevant resources and test are unchanged from origin/main

References droidrun/mobilerun#386.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Test Build Ready

APK for PR #150 is available for testing.

Download APK from workflow run

Artifacts expire after 30 days.

@RasulOs
RasulOs marked this pull request as ready for review July 23, 2026 18:42
@RasulOs

RasulOs commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 817c7e73fd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@RasulOs
RasulOs merged commit ddbbefe into main Jul 27, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant