[GH-ISSUE #6980] [Bug] An out-of-range script_index is reported as a malformed manifest #4254

Closed
opened 2026-10-31 00:48:08 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Adolanium on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/6980

Before submitting

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

Area

Evidence, artifacts, or reconstruction

Observed behavior

trace_web_module_imports and trace_web_source_location with a script_index past the end of a valid export_web_scripts manifest return an invalid_request whose issue is reason: "invalid_format", with a message that starts with the manifest path. It reads as if the manifest file were malformed, and it gives no valid range.

Reproduction

Ran on Linux (WSL Ubuntu, Node 24.22.1) at upstream/main 3ce311757, through the captured module artifact reader in a test:

  1. Export one script with export_web_scripts.
  2. Load it with script_index: 5.
  3. The issue is { path: ["script_index"], reason: "invalid_format", message: "<manifest path>: No script at index 5; manifest contains 1 scripts." }.

Expected behavior

{ path: ["script_index"], reason: "out_of_range", minimum: 0, maximum: 0 }.

Impact and scope

Agents and CLI users correct requests from the issue reason and bounds; they are told the manifest is malformed instead of being given the valid index range.

REA version

6.7.0, revision 3ce311757

Runtime and platform

Linux (WSL Ubuntu), Node 24.22.1

Target and artifact context

A one-script manifest produced by export_web_scripts from a fixture capture.

Interface

MCP

Earliest failure stage

Request parsing or validation

Relevant output or evidence

Root cause and fix are in #6979, with the regression test.

Typed outcome or recovery expected

AnalysisInputError with an out_of_range issue on script_index.

Analysis or suspected cause

Root cause and fix are in #6979.

Additional context

Fixed by #6979.

Originally created by @Adolanium on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6980 ### 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 Evidence, artifacts, or reconstruction ### Observed behavior `trace_web_module_imports` and `trace_web_source_location` with a `script_index` past the end of a valid `export_web_scripts` manifest return an `invalid_request` whose issue is `reason: "invalid_format"`, with a message that starts with the manifest path. It reads as if the manifest file were malformed, and it gives no valid range. ### Reproduction Ran on Linux (WSL Ubuntu, Node 24.22.1) at upstream/main 3ce311757, through the captured module artifact reader in a test: 1. Export one script with `export_web_scripts`. 2. Load it with `script_index: 5`. 3. The issue is `{ path: ["script_index"], reason: "invalid_format", message: "<manifest path>: No script at index 5; manifest contains 1 scripts." }`. ### Expected behavior `{ path: ["script_index"], reason: "out_of_range", minimum: 0, maximum: 0 }`. ### Impact and scope Agents and CLI users correct requests from the issue reason and bounds; they are told the manifest is malformed instead of being given the valid index range. ### REA version 6.7.0, revision `3ce311757` ### Runtime and platform Linux (WSL Ubuntu), Node 24.22.1 ### Target and artifact context A one-script manifest produced by `export_web_scripts` from a fixture capture. ### Interface MCP ### Earliest failure stage Request parsing or validation ### Relevant output or evidence Root cause and fix are in #6979, with the regression test. ### Typed outcome or recovery expected `AnalysisInputError` with an `out_of_range` issue on `script_index`. ### Analysis or suspected cause Root cause and fix are in #6979. ### Additional context Fixed by #6979.
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#4254
No description provided.