Skip to content

adb: mark every host refusal as hostRefusal and derive dispatched: "no" from it #3075

Description

@thymikee

Part of #3069.

Purpose

#3055 adds hostRefusal: true to the device_offline classification in packages/platform-android/src/adb-failure.ts, meaning the host adb refused the command before it reached the device. Five other reasons in the same matcher table are host refusals too and carry no flag: device_unauthorized, multiple_devices, no_devices, device_not_found, server_version_mismatch. On the dispatched branch, discloseAdbInputDispatch in input-actions.ts says no only for TOOL_MISSING, so an input tap refused for an unauthorized device reads unknown today.

Required behavior

  • Each host-refusal reason in ANDROID_ADB_FAILURE_MATCHERS carries hostRefusal: true. A reason that can also come from a command that ran on the device (install_*, connection_dropped, timeout) does not.
  • attachAdbFailureHint keeps stamping details.adbHostRefusal.
  • discloseAdbInputDispatch and the helper-session producers say dispatched: "no" when adbHostRefusal === true and no earlier step was dispatched (dispatchedSteps === 0). The classifier is the single source; no second string match.
  • One row per host refusal in contracts/fixtures/dispatch-disclosure.json, each driven through attachAdbFailureHint and the real executor.

Completion conditions

  • adb-failure.test.ts asserts hostRefusal for the six reasons and its absence for the rest.
  • The dispatch-disclosure gate passes with the new rows owned by the Android driver test.
  • pnpm check:affected --run passes.

Dependencies

Blocked by: #3055 (introduces hostRefusal) and #3071 (introduces the table).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions