[GH-ISSUE #6473] [Bug] inspect-with-objdump omits the rejected symbol field from input errors #3882

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

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

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

inspect-with-objdump correctly rejects symbols --symbol main, but returns no rejected-field diagnostic. Its recovery tells the caller to “Correct the listed fields” although neither details nor a field list is present. The schema identifies symbol as the unrecognized key; that information is discarded before CLI output.

Reproduction

For a fresh source checkout at 9eb829aca34be36ff112826337996f6139f82eff, prepare the documented built entry point:

npm ci && npm run build:cached

Then run from the checkout root:

WORK=$(mktemp -d)
mkdir -p "$WORK/home"
printf 'fixture\n' > "$WORK/fixture.bin"
HOME="$WORK/home" node scripts/rea.mjs inspect-with-objdump \
  "$WORK/fixture.bin" symbols --symbol main --json --full-output

The command exited 1 with empty stderr and no error.details in both fixture runs (2/2). The same omission also reproduced twice using the checkout's package.json. The existing built runtime was used for these observations; the preparation commands above describe fresh-checkout setup.

The seven-byte text fixture is sufficient because validation rejects the selector before artifact/provider admission. That ordering is established by source inspection. No GNU objdump installation is needed to reproduce this validation result.

Expected behavior

Keep the rejection, while identifying symbol as an invalid argument for this operation. The provider guide explicitly says other operations reject this selector. The repository contract requires preserving meaningful failure reasons.

The existing input-issue projector already converts this schema failure to {"path":["symbol"],"reason":"unknown_argument"}. Direct execution of the built schema and projector confirmed that result for the same input.

Impact and scope

P3: the missing correction diagnostic makes rejected requests harder to diagnose from their response alone. Classification, exit status and non-retryable metadata are correct. Help documents that --symbol requires disassemble; consulting it and correcting the request is the available workaround. No failure of valid analysis, wrong success, data loss or harmful retry loop was observed.

Observed scope is the built CLI validation path on macOS. MCP validation and successful provider analysis were not exercised.

REA version

6.7.0 (source 9eb829aca3)

Runtime and platform

Node.js v26.12.1; macOS 27.0.1; arm64. No analysis engine was launched for this input-validation case.

Target and artifact context

A local text file containing fixture plus newline. Its binary format is irrelevant to the initial selector rejection.

Interface

CLI

Earliest failure stage

Request parsing or validation

Relevant output or evidence

Both fixture runs returned this error object inside the full output envelope:

{
  "code": "invalid_request",
  "category": "invalid_input",
  "message": "Analysis input is invalid. Check the arguments and try again.",
  "retryable": false,
  "remediation": {
    "action": "Read the declared input schema or CLI usage for inspect_with_objdump; if using MCP and the catalog may be stale, call tools/list. Correct the listed fields, then retry. Do not repeat the unchanged call."
  },
  "recovery": {
    "kind": "inspect_input_contract",
    "operation": "inspect_with_objdump"
  }
}

As an observed comparison, execute-rizin-command on the same fixture with a newline-bearing command returned details.issues:

HOME="$WORK/home" node scripts/rea.mjs execute-rizin-command \
  "$WORK/fixture.bin" "$(printf 'iI\nii')" --json --full-output

Its issue was {"path":["command"],"reason":"invalid_value","message":"A single command line is required"}. The comparison also exited 1 with empty stderr.

Typed outcome or recovery expected

Preserve invalid_request, invalid_input, retryable:false and inspect_input_contract recovery. Include details.operation and the available details.issues entry naming symbol with unknown_argument, without echoing raw caller values.

Analysis or suspected cause

Source-derived diagnosis: the CLI handler forwards the selector to the shared service. inspectWithObjdump calls safeParse, then constructs AnalysisInputError with only its operation, discarding the parse issues. The constructor defaults issues to an empty list, and the public projection emits input details only for a nonempty list.

The sibling resolveRizinCommandRequest preserves parse issues through the standard helper, consistent with the observed comparison.

Additional context

Closed #5401 concerns missing-file/directory diagnostics at later target acquisition. Closed #1421 fixes projection of unmatched union discriminators, whereas this schema produces unrecognized_keys and its projector already preserves the field. Open #5971 and closed #2213 describe separate Android and Frida constructors losing correction issues. None covers this objdump schema-failure branch.

NOT_ENOUGH_INFO: the first introducing revision and last known good version are unknown. No fix or restoration test was performed.

Originally created by @coygeek on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6473 ### 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 `inspect-with-objdump` correctly rejects `symbols --symbol main`, but returns no rejected-field diagnostic. Its recovery tells the caller to “Correct the listed fields” although neither `details` nor a field list is present. The schema identifies `symbol` as the unrecognized key; that information is discarded before CLI output. ### Reproduction For a fresh source checkout at `9eb829aca34be36ff112826337996f6139f82eff`, prepare the documented built entry point: ```sh npm ci && npm run build:cached ``` Then run from the checkout root: ```sh WORK=$(mktemp -d) mkdir -p "$WORK/home" printf 'fixture\n' > "$WORK/fixture.bin" HOME="$WORK/home" node scripts/rea.mjs inspect-with-objdump \ "$WORK/fixture.bin" symbols --symbol main --json --full-output ``` The command exited 1 with empty stderr and no `error.details` in both fixture runs (2/2). The same omission also reproduced twice using the checkout's `package.json`. The existing built runtime was used for these observations; the preparation commands above describe fresh-checkout setup. The seven-byte text fixture is sufficient because validation rejects the selector before artifact/provider admission. That ordering is established by source inspection. No GNU objdump installation is needed to reproduce this validation result. ### Expected behavior Keep the rejection, while identifying `symbol` as an invalid argument for this operation. The [provider guide](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/docs/reverse-engineering-tools.md#L21) explicitly says other operations reject this selector. The [repository contract](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/AGENTS.md#L31) requires preserving meaningful failure reasons. The existing [input-issue projector](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/domain/inputIssueProjection.ts#L73) already converts this schema failure to `{"path":["symbol"],"reason":"unknown_argument"}`. Direct execution of the built schema and projector confirmed that result for the same input. ### Impact and scope P3: the missing correction diagnostic makes rejected requests harder to diagnose from their response alone. Classification, exit status and non-retryable metadata are correct. Help documents that `--symbol` requires `disassemble`; consulting it and correcting the request is the available workaround. No failure of valid analysis, wrong success, data loss or harmful retry loop was observed. Observed scope is the built CLI validation path on macOS. MCP validation and successful provider analysis were not exercised. ### REA version 6.7.0 (source 9eb829aca34be36ff112826337996f6139f82eff) ### Runtime and platform Node.js v26.12.1; macOS 27.0.1; arm64. No analysis engine was launched for this input-validation case. ### Target and artifact context A local text file containing `fixture` plus newline. Its binary format is irrelevant to the initial selector rejection. ### Interface CLI ### Earliest failure stage Request parsing or validation ### Relevant output or evidence Both fixture runs returned this error object inside the full output envelope: ```json { "code": "invalid_request", "category": "invalid_input", "message": "Analysis input is invalid. Check the arguments and try again.", "retryable": false, "remediation": { "action": "Read the declared input schema or CLI usage for inspect_with_objdump; if using MCP and the catalog may be stale, call tools/list. Correct the listed fields, then retry. Do not repeat the unchanged call." }, "recovery": { "kind": "inspect_input_contract", "operation": "inspect_with_objdump" } } ``` As an observed comparison, `execute-rizin-command` on the same fixture with a newline-bearing command returned `details.issues`: ```sh HOME="$WORK/home" node scripts/rea.mjs execute-rizin-command \ "$WORK/fixture.bin" "$(printf 'iI\nii')" --json --full-output ``` Its issue was `{"path":["command"],"reason":"invalid_value","message":"A single command line is required"}`. The comparison also exited 1 with empty stderr. ### Typed outcome or recovery expected Preserve `invalid_request`, `invalid_input`, `retryable:false` and `inspect_input_contract` recovery. Include `details.operation` and the available `details.issues` entry naming `symbol` with `unknown_argument`, without echoing raw caller values. ### Analysis or suspected cause Source-derived diagnosis: the [CLI handler](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/cli/reverseEngineeringCommands.ts#L172) forwards the selector to the shared service. [inspectWithObjdump](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/application/reverse/ReverseEngineeringService.ts#L216) calls `safeParse`, then constructs `AnalysisInputError` with only its operation, discarding the parse issues. The [constructor](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/domain/analysisErrorCore.ts#L112) defaults issues to an empty list, and the [public projection](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/domain/analysisErrorProjection.ts#L343) emits input details only for a nonempty list. The sibling [resolveRizinCommandRequest](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/application/reverse/ReverseEngineeringService.ts#L89) preserves parse issues through the standard helper, consistent with the observed comparison. ### Additional context Closed #5401 concerns missing-file/directory diagnostics at later target acquisition. Closed #1421 fixes projection of unmatched union discriminators, whereas this schema produces `unrecognized_keys` and its projector already preserves the field. Open #5971 and closed #2213 describe separate Android and Frida constructors losing correction issues. None covers this objdump schema-failure branch. NOT_ENOUGH_INFO: the first introducing revision and last known good version are unknown. No fix or restoration test was performed.
Author
Owner

@ezrabrilliant commented on GitHub (Oct 23, 2026):

I'd like to work on this. Plan: keep the schema issues when inspectWithObjdump rejects its input, using analysisInputErrorFromIssues as resolveRizinCommandRequest already does, so the rejection lists symbol as an unknown argument. The regression test goes in tests/composition/objdumpSelectedDisassembly.test.ts. I'll open a PR shortly.

<!-- gh-comment-id:6366158887 --> @ezrabrilliant commented on GitHub (Oct 23, 2026): I'd like to work on this. Plan: keep the schema issues when `inspectWithObjdump` rejects its input, using `analysisInputErrorFromIssues` as `resolveRizinCommandRequest` already does, so the rejection lists `symbol` as an unknown argument. The regression test goes in `tests/composition/objdumpSelectedDisassembly.test.ts`. I'll open a PR shortly.
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#3882
No description provided.