[GH-ISSUE #6796] [Bug] start-adb-activity rejects scientific notation in float extras #4146

Closed
opened 2026-10-31 00:47:09 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @coygeek on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6796

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

CLI

Observed behavior

start-adb-activity --extra float:scale:1e-3 returns invalid_request at extras[0].value, with “Float extra values must be a number.” The equivalent float:scale:0.001 passes validation. Uppercase exponent notation 1E-3, .5, and 1. are also rejected. These are input-validation observations; no Android device or activity was contacted.

Reproduction

From a prepared source checkout at the revision below, run:

REA_ADB_PATH=/definitely/missing/adb node scripts/rea.mjs start-adb-activity fixture-serial android.intent.action.VIEW --extra float:scale:1e-3 --json
REA_ADB_PATH=/definitely/missing/adb node scripts/rea.mjs start-adb-activity fixture-serial android.intent.action.VIEW --extra float:scale:0.001 --json

The deliberately absent ADB executable isolates request validation from device execution. Each command ran once: the first returned invalid_request; the control reached provider selection and returned capability_unavailable for the absent executable. Both exited 1 with empty stderr. The same initial probe checked 1E-3, .5, 1., and an invalid garbage control once each; all four returned the value-format rejection. Direct evaluation of the production adbInputSchemas.start_adb_activity agreed with all six CLI outcomes.

Expected behavior

Accept ordinary decimal scientific notation for a typed float extra and pass the selected value through to Android's --ef option. Keep malformed text such as garbage rejected.

REA advertises typed float extras and maps them directly to --ef. Android's released Intent argument parser parses --ef values with Float.valueOf, whose documented grammar includes decimal scientific notation. Android acceptance is source-derived; a device-side invocation was not run.

Impact and scope

Callers using normal scientific notation cannot submit an otherwise ordinary float extra through this operation. The common schema also applies to MCP, but an MCP session was not exercised. The demonstrated workaround is to expand 1e-3 to 0.001, which passed validation in the same probe. No target mutation, data loss, or live-device failure is claimed.

REA version

Package 6.7.0; source revision bd4f5e9c197ba942ed026c9fed6ff3fae663901d, using its compiled runtime. The published npm artifact was not independently tested.

Runtime and platform

Node.js v26.12.1; Linux x64. ADB and a Java runtime were not installed or invoked.

Target and artifact context

Synthetic serial fixture-serial and a deliberately missing ADB executable; no connected device or private application.

Interface

CLI

Earliest failure stage

Request parsing or validation

Relevant output or evidence

Relevant fields from the actual rejected CLI response:

{
  "code": "invalid_request",
  "details": {
    "operation": "start_adb_activity",
    "issues": [{
      "path": ["extras", 0, "value"],
      "reason": "invalid_format",
      "message": "Float extra values must be a number",
      "expected": "regex"
    }]
  }
}

Evidence provenance: observed public CLI responses and production-schema evaluation. Local verification: reproduced at the request-validation boundary. Reproduction completeness: complete for the rejection; live Android execution was not tested. No probe was rerun after drafting.

Typed outcome or recovery expected

Proposed restoration check: with the same absent-executable fixture, 1e-3 should reach provider selection like 0.001, while garbage remains an input-format error. A subsequent device test can confirm unchanged forwarding of the selected text; that test was not run here.

Analysis or suspected cause

Source-derived: the shared float-extra schema uses ^-?\d+(\.\d+)?$, excluding exponent notation and other ordinary decimal float spellings before the provider can forward them.

Additional context

Related #5093 concerns empty string extras, a different discriminator branch. Its string admission change does not admit these float values. NOT_ENOUGH_INFO: first affected release and last known good revision were not established.

Triage assessment

  • Impact level: P2
  • Assessment status: supported
  • Impact basis: The public CLI deterministically rejects ordinary decimal scientific notation for an advertised typed float extra before provider admission; the failure is bounded to request acceptance.
  • Workaround status: available
  • Workaround basis: Rewriting the demonstrated 1e-3 value as 0.001 passed the same production schema and public CLI validation in the initial probe.
Originally created by @coygeek on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6796 ## Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ## Area CLI ## Observed behavior `start-adb-activity --extra float:scale:1e-3` returns `invalid_request` at `extras[0].value`, with “Float extra values must be a number.” The equivalent `float:scale:0.001` passes validation. Uppercase exponent notation `1E-3`, `.5`, and `1.` are also rejected. These are input-validation observations; no Android device or activity was contacted. ## Reproduction From a prepared source checkout at the revision below, run: ```sh REA_ADB_PATH=/definitely/missing/adb node scripts/rea.mjs start-adb-activity fixture-serial android.intent.action.VIEW --extra float:scale:1e-3 --json REA_ADB_PATH=/definitely/missing/adb node scripts/rea.mjs start-adb-activity fixture-serial android.intent.action.VIEW --extra float:scale:0.001 --json ``` The deliberately absent ADB executable isolates request validation from device execution. Each command ran once: the first returned `invalid_request`; the control reached provider selection and returned `capability_unavailable` for the absent executable. Both exited 1 with empty stderr. The same initial probe checked `1E-3`, `.5`, `1.`, and an invalid `garbage` control once each; all four returned the value-format rejection. Direct evaluation of the production `adbInputSchemas.start_adb_activity` agreed with all six CLI outcomes. ## Expected behavior Accept ordinary decimal scientific notation for a typed float extra and pass the selected value through to Android's `--ef` option. Keep malformed text such as `garbage` rejected. REA [advertises typed float extras](https://github.com/morluto/rea/blob/bd4f5e9c197ba942ed026c9fed6ff3fae663901d/src/cli/adbCommands.ts#L330-L348) and [maps them directly to `--ef`](https://github.com/morluto/rea/blob/bd4f5e9c197ba942ed026c9fed6ff3fae663901d/src/adb/AdbProvider.ts#L2808-L2827). Android's [released Intent argument parser](https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-13.0.0_r32/core/java/android/content/Intent.java#8124) parses `--ef` values with `Float.valueOf`, whose [documented grammar](https://docs.oracle.com/en/java/javase/24/docs/api/java.base/java/lang/Float.html#valueOf(java.lang.String)) includes decimal scientific notation. Android acceptance is source-derived; a device-side invocation was not run. ## Impact and scope Callers using normal scientific notation cannot submit an otherwise ordinary float extra through this operation. The common schema also applies to MCP, but an MCP session was not exercised. The demonstrated workaround is to expand `1e-3` to `0.001`, which passed validation in the same probe. No target mutation, data loss, or live-device failure is claimed. ## REA version Package 6.7.0; source revision `bd4f5e9c197ba942ed026c9fed6ff3fae663901d`, using its compiled runtime. The published npm artifact was not independently tested. ## Runtime and platform Node.js v26.12.1; Linux x64. ADB and a Java runtime were not installed or invoked. ## Target and artifact context Synthetic serial `fixture-serial` and a deliberately missing ADB executable; no connected device or private application. ## Interface CLI ## Earliest failure stage Request parsing or validation ## Relevant output or evidence Relevant fields from the actual rejected CLI response: ```json { "code": "invalid_request", "details": { "operation": "start_adb_activity", "issues": [{ "path": ["extras", 0, "value"], "reason": "invalid_format", "message": "Float extra values must be a number", "expected": "regex" }] } } ``` Evidence provenance: observed public CLI responses and production-schema evaluation. Local verification: reproduced at the request-validation boundary. Reproduction completeness: complete for the rejection; live Android execution was not tested. No probe was rerun after drafting. ## Typed outcome or recovery expected Proposed restoration check: with the same absent-executable fixture, `1e-3` should reach provider selection like `0.001`, while `garbage` remains an input-format error. A subsequent device test can confirm unchanged forwarding of the selected text; that test was not run here. ## Analysis or suspected cause Source-derived: the [shared float-extra schema](https://github.com/morluto/rea/blob/bd4f5e9c197ba942ed026c9fed6ff3fae663901d/src/domain/adb/adbDeviceAnalysis.ts#L91-L96) uses `^-?\d+(\.\d+)?$`, excluding exponent notation and other ordinary decimal float spellings before the provider can forward them. ## Additional context Related [#5093](https://github.com/morluto/rea/issues/5093) concerns empty string extras, a different discriminator branch. Its string admission change does not admit these float values. NOT_ENOUGH_INFO: first affected release and last known good revision were not established. ## Triage assessment - Impact level: P2 - Assessment status: supported - Impact basis: The public CLI deterministically rejects ordinary decimal scientific notation for an advertised typed float extra before provider admission; the failure is bounded to request acceptance. - Workaround status: available - Workaround basis: Rewriting the demonstrated `1e-3` value as `0.001` passed the same production schema and public CLI validation in the initial probe.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4146
No description provided.