[GH-ISSUE #6290] [Bug] observe-web-execution advertises observation durations its handler rejects #3804

Closed
opened 2026-10-31 00:44:13 +00:00 by bsakaguchi · 1 comment
Owner

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

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

observe-web-execution --schema --json advertises observationMs.maximum: 9007199254740991, but an invocation with 2147483648 returns invalid_request with observation_ms.maximum: 2147483647. A caller following input discovery encounters a deterministic range refusal. The existing refusal is useful; the defect is the advertised range.

Reproduction

From the source checkout with locked dependencies already installed, build once with npm run build:cached. Run with HOME, DSH_HOME, XDG_CONFIG_HOME and XDG_CACHE_HOME redirected to disposable directories:

node scripts/rea.mjs observe-web-execution --schema --json
node scripts/rea.mjs observe-web-execution http://127.0.0.1:1 TARGET_ID --observation-ms 2147483648 --json
node scripts/rea.mjs observe-web-execution http://127.0.0.1:1 TARGET_ID --observation-ms 2147483647 --command-timeout-ms 1000 --json

Each command ran once through the built public CLI. No test file or provider substitution was used. No browser is needed: the boundary control reports that the loopback endpoint is unreachable.

Expected behavior

The command's public input schema should expose the deterministic duration restriction documented for this operation: the selected duration must fit the positive 32-bit millisecond range. It should exclude values the operation always refuses for that restriction. Schema validity does not promise endpoint availability or successful observation. The operation-specific limit is documented in Website runtime bounds; REA describes --schema as caller-input discovery in CLI default presentation.

Impact and scope

P2 under triage/v1: an advertised numeric input causes an avoidable failed call and correction/retry. The observed scope is above-limit durations, with no observed data loss or incorrect successful Evidence. Using at most 2147483647 avoids the duration rejection, as the control confirms; this does not provide one longer execution observation window. Real-browser behavior and full-duration waiting were not tested.

REA version

Source commit 4a4bbab3c3 (main)

Runtime and platform

Node v26.12.1; macOS 27.0.1; arm64. The repository pins Node 24.18.0; that runtime was not run. Package metadata reports REA 6.7.0.

Target and artifact context

No browser or artifact. Synthetic target ID TARGET_ID and loopback endpoint http://127.0.0.1:1; the endpoint was unreachable in the observed control.

Interface

CLI

Earliest failure stage

Request parsing or validation

Relevant output or evidence

Observed schema output, exit 0:

{"description":"Observation duration in milliseconds","default":10000,"type":"integer","minimum":1,"maximum":9007199254740991}

Observed over-limit response, exit 1, reduced to relevant fields:

{"code":"invalid_request","category":"invalid_input","details":{"operation":"observe_web_execution","issues":[{"path":["observation_ms"],"reason":"out_of_range","maximum":2147483647}]}}

Observed boundary control, exit 1: code: "provider_unavailable", details.reason: "endpoint_unreachable". All three commands had empty stderr. Ajv2020 accepted both numeric inputs against the actual advertised args/options schemas. Measured wall times were 0.676 s for schema discovery, 0.648 s for the range refusal and 0.646 s for the control.

Typed outcome or recovery expected

Advertise the applicable duration limit, retain a useful typed range refusal for above-limit input and preserve the accepted boundary. The 2147483647 control must continue reaching provider admission. No particular adapter error code is required.

Analysis or suspected cause

Source-derived: the CLI registration uses the generic duration helper, which has no operation-specific maximum. The request is then parsed against the bounded execution input by the shared workflow, before provider execution. The observed over-limit failure occurs at shared application input validation, not browser admission or an armed window.

Additional context

Related #4392, PR #4391, #3929 and PR #5605 address passive observe_web_session timer overflow and segmented waits. They do not correct this execution command's CLI range advertisement. Open/closed issues and PRs were searched using three targeted keyword sets, followed by a broader execution-tool search; no matching advertisement report was found.

Fetched main at 002e1b68c6 and inspected drift without checking it out. The domain integer refactor preserves the execution maximum, and the CLI helper/registration are unchanged. This freshness check is source-derived; current main was not built or run. NOT_ENOUGH_INFO: the first affected release is unknown.

Originally created by @coygeek on GitHub (Oct 22, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6290 ### 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 `observe-web-execution --schema --json` advertises `observationMs.maximum: 9007199254740991`, but an invocation with 2147483648 returns `invalid_request` with `observation_ms.maximum: 2147483647`. A caller following input discovery encounters a deterministic range refusal. The existing refusal is useful; the defect is the advertised range. ### Reproduction From the source checkout with locked dependencies already installed, build once with `npm run build:cached`. Run with HOME, DSH_HOME, XDG_CONFIG_HOME and XDG_CACHE_HOME redirected to disposable directories: ```sh node scripts/rea.mjs observe-web-execution --schema --json node scripts/rea.mjs observe-web-execution http://127.0.0.1:1 TARGET_ID --observation-ms 2147483648 --json node scripts/rea.mjs observe-web-execution http://127.0.0.1:1 TARGET_ID --observation-ms 2147483647 --command-timeout-ms 1000 --json ``` Each command ran once through the built public CLI. No test file or provider substitution was used. No browser is needed: the boundary control reports that the loopback endpoint is unreachable. ### Expected behavior The command's public input schema should expose the deterministic duration restriction documented for this operation: the selected duration must fit the positive 32-bit millisecond range. It should exclude values the operation always refuses for that restriction. Schema validity does not promise endpoint availability or successful observation. The operation-specific limit is documented in [Website runtime bounds](https://github.com/morluto/rea/blob/4a4bbab3c337701febeb6b532ace49041c4876e0/docs/web-runtime.md#L55); REA describes `--schema` as caller-input discovery in [CLI default presentation](https://github.com/morluto/rea/blob/4a4bbab3c337701febeb6b532ace49041c4876e0/src/cli/omittableDefaults.ts#L10). ### Impact and scope P2 under triage/v1: an advertised numeric input causes an avoidable failed call and correction/retry. The observed scope is above-limit durations, with no observed data loss or incorrect successful Evidence. Using at most 2147483647 avoids the duration rejection, as the control confirms; this does not provide one longer execution observation window. Real-browser behavior and full-duration waiting were not tested. ### REA version Source commit 4a4bbab3c337701febeb6b532ace49041c4876e0 (main) ### Runtime and platform Node v26.12.1; macOS 27.0.1; arm64. The repository pins Node 24.18.0; that runtime was not run. Package metadata reports REA 6.7.0. ### Target and artifact context No browser or artifact. Synthetic target ID `TARGET_ID` and loopback endpoint `http://127.0.0.1:1`; the endpoint was unreachable in the observed control. ### Interface CLI ### Earliest failure stage Request parsing or validation ### Relevant output or evidence Observed schema output, exit 0: ```json {"description":"Observation duration in milliseconds","default":10000,"type":"integer","minimum":1,"maximum":9007199254740991} ``` Observed over-limit response, exit 1, reduced to relevant fields: ```json {"code":"invalid_request","category":"invalid_input","details":{"operation":"observe_web_execution","issues":[{"path":["observation_ms"],"reason":"out_of_range","maximum":2147483647}]}} ``` Observed boundary control, exit 1: `code: "provider_unavailable"`, `details.reason: "endpoint_unreachable"`. All three commands had empty stderr. Ajv2020 accepted both numeric inputs against the actual advertised args/options schemas. Measured wall times were 0.676 s for schema discovery, 0.648 s for the range refusal and 0.646 s for the control. ### Typed outcome or recovery expected Advertise the applicable duration limit, retain a useful typed range refusal for above-limit input and preserve the accepted boundary. The 2147483647 control must continue reaching provider admission. No particular adapter error code is required. ### Analysis or suspected cause Source-derived: [the CLI registration](https://github.com/morluto/rea/blob/4a4bbab3c337701febeb6b532ace49041c4876e0/src/cli/webRuntimeCommands.ts#L39) uses [the generic duration helper](https://github.com/morluto/rea/blob/4a4bbab3c337701febeb6b532ace49041c4876e0/src/cliObservationOptions.ts#L7), which has no operation-specific maximum. The request is then parsed against [the bounded execution input](https://github.com/morluto/rea/blob/4a4bbab3c337701febeb6b532ace49041c4876e0/src/domain/webExecution.ts#L13) by [the shared workflow](https://github.com/morluto/rea/blob/4a4bbab3c337701febeb6b532ace49041c4876e0/src/application/WebRuntimeService.ts#L36), before provider execution. The observed over-limit failure occurs at shared application input validation, not browser admission or an armed window. ### Additional context Related #4392, PR #4391, #3929 and PR #5605 address passive `observe_web_session` timer overflow and segmented waits. They do not correct this execution command's CLI range advertisement. Open/closed issues and PRs were searched using three targeted keyword sets, followed by a broader execution-tool search; no matching advertisement report was found. Fetched main at 002e1b68c66a243948fdca57ac416cfaec617315 and inspected drift without checking it out. The domain integer refactor preserves the execution maximum, and the CLI helper/registration are unchanged. This freshness check is source-derived; current main was not built or run. NOT_ENOUGH_INFO: the first affected release is unknown.
Author
Owner

@coygeek commented on GitHub (Oct 24, 2026):

Checked the reported fix on main at d87e73f2db.

observe-web-execution now explicitly applies the same MAX_BROWSER_DEADLINE_MS upper bound to the coerced CLI number schema as the domain schema. The compiled-CLI schema regression asserts 2147483647 rather than merely testing handler rejection. No compiled CLI run here.

Implementation: webRuntimeCommands.ts, webExecution.ts.

The relevant regression checks in webRuntimeCli.test.ts passed in the focused test run on this revision. This closure is based on the current source and those checks; provider fixtures do not establish a real-engine run. Closing as completed on main.

<!-- gh-comment-id:6380750476 --> @coygeek commented on GitHub (Oct 24, 2026): Checked the reported fix on `main` at d87e73f2db50be72d33a4b3c7199af35518b441c. observe-web-execution now explicitly applies the same MAX_BROWSER_DEADLINE_MS upper bound to the coerced CLI number schema as the domain schema. The compiled-CLI schema regression asserts 2147483647 rather than merely testing handler rejection. No compiled CLI run here. Implementation: [webRuntimeCommands.ts](https://github.com/morluto/rea/blob/d87e73f2db50be72d33a4b3c7199af35518b441c/src/cli/webRuntimeCommands.ts#L38), [webExecution.ts](https://github.com/morluto/rea/blob/d87e73f2db50be72d33a4b3c7199af35518b441c/src/domain/webExecution.ts#L14). The relevant regression checks in [webRuntimeCli.test.ts](https://github.com/morluto/rea/blob/d87e73f2db50be72d33a4b3c7199af35518b441c/tests/acceptance/webRuntimeCli.test.ts) passed in the focused test run on this revision. This closure is based on the current source and those checks; provider fixtures do not establish a real-engine run. Closing as completed on main.
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#3804
No description provided.