Skip to content

fix(android): stabilize input verification and initial device context - #39

Merged
houlianpi merged 2 commits into
mainfrom
codex/fix-android-input-layout
Oct 20, 2026
Merged

houlianpi merged 2 commits into
mainfrom
codex/fix-android-input-layout

Conversation

@houlianpi

@houlianpi houlianpi commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fix two Android exploration failures that caused repeated actions. Edge input now accepts normal movement or resizing of a uniquely resolved resource-ID-bound field after exact readback. Android context now recovers one precisely identified first-read ApplicationSharedMemory initialization error before launch_app, without repeating the launch action.

Related issue

No separate issue; both bounded conformance fixes were explicitly authorized through /spec-driven.

Design document

No separate design required. Existing contracts already require original-target verification, device-info-based context, correct failures, and no implicit action retry.

SPEC updates

No SPEC delta. Reviewed SPEC.md and relevant drivers, drivers/android, core, core/runner, core/interfaces, and harnesses SPEC.md files. Public APIs, ownership, dependencies, context shape, and action retry policy remain accurate.

Changes

  • Require unique native/XPath input matches, editability, stable class/package/resource identity, and exact unmasked readback. Allow changed bounds only for an explicitly resource-ID-bound target; positional/no-ID locators retain conservative bounds checks.
  • In context() only, identify the actual SDK RPCUnknownError using its exact error code, Java exception, shared-memory message, and first stack frame, then read device.info once more.
  • Persistent/unrelated faults and cancellation propagate. No empty context fallback, cache, reconnect, service restart, extra UI writes, or application launch retry.
  • Add test-first regressions and actual SDK offline coverage. Actual Runner/Harness/Driver tests check transient recovery with one launch, persistent preparation failure with zero launches, and real startup failure with one failed launch. Evidence errors preserve primary failure.

Verification

  • Final Python regression: 4,781 passed, 11 Windows-only skips. Command: .venv/bin/python -m pytest -q -ra --ignore=tests/test_playwright_web_driver_real_browser.py --basetemp=. User configuration isolated; real-browser module excluded under the no-live-testing boundary.
  • Context focused: .venv/bin/python -m pytest tests/test_uiautomator2_android_driver.py tests/test_android_harness.py tests/test_step_runner.py -q -ra: 213 passed.
  • Input focused before its commit: driver/harness/runner/sequence modules: 200 passed.
  • .venv/bin/ruff check . and .venv/bin/ruff format --check .: passed with Ruff 0.16.1; 367 files formatted.
  • git diff --check: passed.
  • Independent full bidirectional audits passed for both fixes. A scoped input repair review closed the positional XPath finding. Committed diffs match audited snapshots.
  • No live device/browser/model tests during implementation. Earlier authorized diagnosis reproduced the first-read error; it is not post-fix live validation.

Evidence

Offline regressions cover field movement/shrink, unsafe positional retargeting, actual SDK error parsing, persistent/unrelated faults, cancellation, and launch counts. No private goals, device identifiers, recordings, or local artifacts included.

Release or documentation impact

No version, package, CLI, Skill, Web UI, or documentation changes; no release requested.

Checklist

Spec-driven development

  • Root and relevant module SPEC files reviewed.
  • Required authorization and SPEC gates satisfied before implementation.
  • Implementation/tests agree with current confirmed SPEC.
  • Current SPEC used as implementation authority.

Quality and safety

  • Focused tests and required lint/format checks passed; exclusions explained.
  • User-facing documentation changes not applicable.
  • No credentials, personal data, env files, generated logs/reports/screenshots, or workspace outputs committed.
  • No media or Run artifacts included.
  • No large binary files added.

@houlianpi
houlianpi merged commit 28009d2 into main Oct 20, 2026
9 checks passed
@houlianpi houlianpi changed the title fix(android): verify text input across layout changes fix(android): stabilize input verification and initial device context Oct 20, 2026
@houlianpi houlianpi mentioned this pull request Oct 21, 2026
9 tasks done
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