Skip to content

fix(targets): remove path advice for format refusals - #1987

Merged
N0zoM1z0 merged 4 commits into
morluto:mainfrom
Ha1baraA11:pr/rea-1979
Oct 12, 2026
Merged

N0zoM1z0 merged 4 commits into
morluto:mainfrom
Ha1baraA11:pr/rea-1979

Conversation

@Ha1baraA11

@Ha1baraA11 Ha1baraA11 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A readable executable rejected by format parsing now reports its format reason without misleading path advice. CLI/MCP and rea doctor classify the refusal as an unsupported target; actual missing-path and permission diagnostics retain their own guidance.

Fixes #1979

Refs #1852

Problem and expected behavior

A readable MZ image with an NE, LE, or LX header is correctly refused, but the current message and remediation.action also advise checking whether the path exists and is readable. The path is valid, so that advice sends users toward the wrong cause. Format refusals should explain that the selected file is unsupported or malformed; path and access errors should retain their path-specific guidance.

Change and scope

  • Mark format-parser, raw-binary admission, and DOS COM admission failures with the typed file_format_rejected constraint after the file has been read.
  • Render the parser reason without generic path advice and give a format-specific remediation action.
  • Classify these results as unsupported_target in the shared CLI/MCP projection and rea doctor; preserve the existing directory, missing-path, permission and WASM static-inspection routes.
  • Add synthetic NE, LE, and LX fixture tests through target parsing, error projection, and Doctor diagnostics.

Contract and boundary impact

  • Semantic owner and earliest changed stage: BinaryTargetResolver identifies a readable file whose format is rejected; shared error presentation serves CLI and MCP, and Doctor reports the typed target classification.
  • CLI and MCP/tool-catalog contract: No tool or schema registration changes. code and details.reason remain stable; details.constraint gains the additive value file_format_rejected. Example: message: "Cannot open artifact: unsupported NE executable in MZ image."; remediation.action: "Review the reported file-format reason and select a supported, well-formed target.".
  • Provider, bridge, target-format, or platform compatibility: Applies to parser refusals and explicit raw-binary/DOS COM admission failures. Supported format admission and provider selection are unchanged.
  • Evidence, artifact, provenance, or reconstruction contract: No artifact bytes, identity, evidence, or provenance are changed; the original reason and selected path remain available in details.
  • Process execution, authorization, cleanup, or containment impact: None; format rejection still occurs before provider startup.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: None; no generated output or package files change.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/filesystem/targetDiagnostics.test.ts writes readable MZ images with NE, LE, and LX headers and checks the projected message, remediation, reason, constraint, and Doctor classification; existing directory and permission cases remain covered.
  • Base reproduction or other evidence: All three new format-refusal assertions failed on the exact unmodified PR base because the message and remediation included generic path advice and no typed format constraint; both existing directory and permission tests passed. On the patch, all five focused boundary tests pass.
  • User-visible CLI/MCP output (if applicable): message is Cannot open artifact: unsupported NE executable in MZ image.; remediation.action is Review the reported file-format reason and select a supported, well-formed target.; details.reason remains unsupported NE executable in MZ image.
  • Remaining proof gaps: Actual compiled CLI and fresh stdio MCP replay verified all three refusals, exact canonical projection parity, unchanged file bytes, service responsiveness and a missing-path control. A real native-provider session is unnecessary for these pre-startup refusals; Windows execution of the follow-up remains unverified.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Follow-up verification

  • Integrated current main, preserving the merged WASM recovery route and source metadata inspection.
  • Added strict shared-error category and non-retryable assertions; the NE/LE/LX category checks failed before the follow-up and passed afterward.
  • Preserved malformed-header, missing-path and real filesystem permission checks; separated the format test group to keep the existing lint gate.
  • Focused parser/projection/Doctor/raw-binary/DOS COM/WASM checks: 103 tests across nine files passed on the final integrated head.
  • Real Linux x64 public CLI/MCP replay: three NE/LE/LX controls and a missing-path control passed with exact canonical error parity and unchanged source bytes.
  • npm run check:ci passed all eight static tasks and architecture guards on the integrated head.
  • npm run docs:check passed on the final integrated head.

Validation performed

  • npm run test:focused -- tests/boundary/filesystem/targetDiagnostics.test.ts — passed (5 tests).
  • npm run check:fast — passed (typecheck and lint).

Compatibility, safety, and release

  • Breaking changes or migration steps: None; target_unavailable and details.reason remain stable, with an additive constraint value and clearer text.
  • Real Hopper/Ghidra, browser, or OS coverage: No engine or browser was started; macOS arm64 boundary tests passed.
  • Package or release metadata impact: None.
  • Security, privacy, process, or containment review: No new authority, external process, or persistent file access; regression fixtures are created in a temporary test directory.

Review checklist

  • This PR addresses a concrete problem or an agreed enhancement.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T00:03:15.637713Z 4fce039 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 420e9567f9

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (!detected.ok)
return err(
new BinaryTargetError(path, detected.error, {
constraint: "file_format_rejected",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve identity-change failures outside format rejection

When an ELF32 MIPS file is rewritten between the prefix parse and the second header read, readMipsElfAbiFlags returns MIPS ELF header no longer matches the resolved identity (src/application/MipsElfAbiFlags.ts:75), but this unconditional mapping labels that result file_format_rejected. systemDoctorHost.inspectTarget then reports unsupported_target, and shared remediation tells the caller to select a supported file even though the observed failure is target mutation. Keep an identity-change variant distinct from parser refusals (or verify stability before setting this constraint) so callers can retry after the file stabilizes.

AGENTS.md reference: AGENTS.md:L23-L23

Useful? React with 👍 / 👎.

@CassieFox23

Copy link
Copy Markdown
Contributor

Thanks, Ha1baraA11, for picking this up so fast. I'm testing it now on Linux, on head 420e956 against its base.

I'm reusing the files from my two runs on #1979:

  • NE, LE and LX files from Open Watcom.
  • Real RISC-V ELF and PE files from Debian, and a PowerPC Mach-O.
  • Cut-off headers, FAT cases, dos-com and raw-binary.
  • A folder, a missing path and an unreadable file, to check they keep their own advice.

I expect to post results by about 23:45 UTC. That time is a rough estimate.

🤖 Generated with Claude Code (Opus 5.5) 🦊

@CassieFox23

Copy link
Copy Markdown
Contributor

TL;DR: Fixed: every format refusal I ran lost the "check the path" sentence, on the CLI and over MCP. A folder, a missing path and an unreadable file keep their own text. Still wrong: two option errors say "check the path" when the path is fine.

I tested head 420e956 against its base 89f5e48 (#1972) on Linux. The base is also today's main tip. I used the files from my two runs on #1979.

Results

Every row below is code target_unavailable, except the unreadable file, which is access_denied. Every CLI run exits 1. "Sentence" means "Check that the path exists, is readable, and points to a supported file."

Files Base: sentence Head: sentence Head details.constraint
NE, LE, LX (3) yes no file_format_rejected
Text, 4-byte and empty files (3) yes no file_format_rejected
ELF: bad machine, class, endianness, two cut files, one real riscv64 (6) yes no file_format_rejected
PE: bad machine, one real riscv64 (2) yes no file_format_rejected
Mach-O: bad CPU, one real PowerPC, four cut files (6) yes no file_format_rejected
FAT (7) and Java .class files (2) yes no file_format_rejected
dos-com, 70,000 and 0 bytes (2) yes no file_format_rejected
raw-binary (6 on the CLI, 5 over MCP) yes no file_format_rejected
Folder no no directory_requires_file, as before
Missing path (2) yes yes, which is right none
Unreadable file in message only same as base none
Option error: architecture without raw-binary (2) yes yes, which is wrong none
  • Count: 37 refusals on the CLI and 25 over MCP. On head, each message is exactly "Cannot open artifact: " plus details.reason plus a full stop. Each remediation.action is the new sentence. A script checked all of them.
  • MCP: I called open_binary on 33 cases. The results match the CLI. Four of the 33 never reach the resolver, because the input check stops them first. They return plain text with no JSON code, the same on base and head.
  • rea doctor --json --target FILE: NE, text, ELF and FAT files go from config_drift on base to unsupported_target on head. The folder, missing and unreadable results did not change. Doctor exits 1 in all 14 runs. Each target check fails, and Hopper is also missing on this box.
  • Tests: the PR's test file passes, 5 of 5, on Node 22.23.1, 24.18.0 and 26.11.1. On base source, the 3 new cases fail and the 2 old ones pass.
  • App bundle: a folder named Fake.app with no Info.plist still gets the sentence, on base and head. I left it out of the table. The bundle layout is the problem there.
  • CI: the CI run for 420e956 shows action_required and no checks. A maintainer probably has to approve it. That is my reading, not something I confirmed.

Two small things

  • Option errors: --architecture x86 with no raw-binary, and dos-com with an architecture, still get the sentence on the CLI. The path is fine in both. Over MCP the input check catches them first. These errors are not tagged in BinaryTargetResolver.ts.
  • Missing options: raw-binary with no architecture now says to pick a well-formed target. The real fix is to pass --architecture and --entry-point.

Codex review

Codex's point is right. The tag on line 185 of BinaryTargetResolver.ts is unconditional, so a file changed mid-read is also called a format refusal. I could only simulate that in-process, not with a real rewrite. The Commands fold has the details. The table above does not depend on it.

Not run

  • Hopper and IDA. I used --provider ghidra only.
  • Windows and macOS.
  • A real rewrite race on a MIPS file.
  • Valid ELF, PE and Mach-O files as success controls.
  • A FAT file that has a host slice.

Thanks, Ha1baraA11, for the fix.

Every CLI case, base against head
Case                       details.reason                                                                                                                              Base: path sentence  Head: path sentence  Head details.constraint  CLI exit
-------------------------  ------------------------------------------------------------------------------------------------------------------------------------------  -------------------  -------------------  -----------------------  --------
ne-wzoom                   unsupported NE executable in MZ image                                                                                                       message and action   no                   file_format_rejected     1
le-cwhelp                  unsupported LE executable in MZ image                                                                                                       message and action   no                   file_format_rejected     1
lx-wcc                     unsupported LX executable in MZ image                                                                                                       message and action   no                   file_format_rejected     1
text                       unsupported binary format                                                                                                                   message and action   no                   file_format_rejected     1
four-bytes                 truncated or unsupported binary header                                                                                                      message and action   no                   file_format_rejected     1
empty-file                 truncated or unsupported binary header                                                                                                      message and action   no                   file_format_rejected     1
elf-machine-243            unsupported ELF architecture                                                                                                                message and action   no                   file_format_rejected     1
elf-bad-class              unsupported ELF class                                                                                                                       message and action   no                   file_format_rejected     1
elf-bad-endian             unsupported ELF endianness                                                                                                                  message and action   no                   file_format_rejected     1
elf-truncated-40           truncated ELF header: an ELF64 header needs 64 bytes; the file has 40                                                                       message and action   no                   file_format_rejected     1
elf-truncated-4            truncated ELF header                                                                                                                        message and action   no                   file_format_rejected     1
pe-machine-0x5032          unsupported PE architecture                                                                                                                 message and action   no                   file_format_rejected     1
macho-bad-cpu              unsupported Mach-O architecture                                                                                                             message and action   no                   file_format_rejected     1
elf-riscv64-real           unsupported ELF architecture                                                                                                                message and action   no                   file_format_rejected     1
pe-riscv64-real            unsupported PE architecture                                                                                                                 message and action   no                   file_format_rejected     1
macho-ppc32-real           unsupported Mach-O architecture                                                                                                             message and action   no                   file_format_rejected     1
macho32-trunc-24           truncated Mach-O header: a 32-bit header needs 28 bytes; the file has 24                                                                    message and action   no                   file_format_rejected     1
macho64-trunc-20           truncated Mach-O header: a 64-bit header needs 32 bytes; the file has 20                                                                    message and action   no                   file_format_rejected     1
macho64-loadcmds-4096      truncated Mach-O load commands: the header declares 4096 bytes after its 32-byte header; the file has 32                                    message and action   no                   file_format_rejected     1
macho-7bytes               truncated or unsupported binary header                                                                                                      message and action   no                   file_format_rejected     1
fat-count0                 truncated or invalid FAT architecture table                                                                                                 message and action   no                   file_format_rejected     1
fat-count129               truncated or invalid FAT architecture table                                                                                                 message and action   no                   file_format_rejected     1
fat-short-table            truncated or invalid FAT architecture table                                                                                                 message and action   no                   file_format_rejected     1
fat-arm64-only             FAT binary has no host-compatible x64 architecture                                                                                          message and action   no                   file_format_rejected     1
fat-ppc-only               FAT binary has no host-compatible x64 architecture                                                                                          message and action   no                   file_format_rejected     1
fat-x86_64-slice-past-eof  truncated FAT slice: the x86_64 slice ends at byte 104096; the file has 28                                                                  message and action   no                   file_format_rejected     1
fat64-arm64-only           FAT binary has no host-compatible x64 architecture                                                                                          message and action   no                   file_format_rejected     1
java-Hello.class           truncated or invalid FAT architecture table                                                                                                 message and action   no                   file_format_rejected     1
java-Big.class             FAT binary has no host-compatible x64 architecture                                                                                          message and action   no                   file_format_rejected     1
dos-com-70000              DOS COM requires 1..65280 file bytes (64 KiB segment minus the 256-byte PSP prefix)                                                         message and action   no                   file_format_rejected     1
dos-com-empty              DOS COM requires 1..65280 file bytes (64 KiB segment minus the 256-byte PSP prefix)                                                         message and action   no                   file_format_rejected     1
raw-no-arch-no-entry       raw-binary format requires architecture (x86, x86_64, arm, or arm64)                                                                        message and action   no                   file_format_rejected     1
raw-arm-unaligned          raw-binary arm entry_point 0x1002 must be 4-byte aligned                                                                                    message and action   no                   file_format_rejected     1
raw-arm64-unaligned        raw-binary arm64 entry_point 0x1001 must be 4-byte aligned                                                                                  message and action   no                   file_format_rejected     1
raw-empty-file             raw-binary requires at least one file byte                                                                                                  message and action   no                   file_format_rejected     1
raw-x86-past-4GiB          raw-binary mapping from 0xfffffff0 must fit in the x86 address width                                                                        message and action   no                   file_format_rejected     1
raw-x86_64-max             raw-binary mapping from 0xffffffffffffffff must fit in the x86_64 address width                                                             message and action   no                   file_format_rejected     1
raw-arch-mips-invalid      VALIDATION_ERROR (invalid architecture)                                                                                                     no                   no                   none                     1
arch-without-format        architecture and entry_point apply only with format=raw-binary                                                                              message and action   message and action   none                     1
dos-com-with-arch          architecture and entry_point apply only with format=raw-binary                                                                              message and action   message and action   none                     1
control-directory          this opening route requires a file or app bundle                                                                                            no                   no                   directory_requires_file  1
control-missing            target does not exist or a path component is not a directory: ENOENT: no such file or directory, access '/tmp/p1987/fx/does-not-exist.exe'  message and action   message and action   none                     1
control-unreadable         permission denied while reading target: EACCES: permission denied, access '/tmp/i1979/fx/unreadable.txt'                                    message only         message only         none                     1
raw-missing-file           target does not exist or a path component is not a directory: ENOENT: no such file or directory, access '/tmp/p1987/fx/no-such-file.bin'    message and action   message and action   none                     1
Every MCP case, base against head

The last column is isError from the tool result.

Case                       details.reason                                                                                                                              Base: path sentence  Head: path sentence  Head details.constraint  isError
-------------------------  ------------------------------------------------------------------------------------------------------------------------------------------  -------------------  -------------------  -----------------------  -------
ne                         unsupported NE executable in MZ image                                                                                                       message and action   no                   file_format_rejected     True
le                         unsupported LE executable in MZ image                                                                                                       message and action   no                   file_format_rejected     True
lx                         unsupported LX executable in MZ image                                                                                                       message and action   no                   file_format_rejected     True
text                       unsupported binary format                                                                                                                   message and action   no                   file_format_rejected     True
four-bytes                 truncated or unsupported binary header                                                                                                      message and action   no                   file_format_rejected     True
elf-machine-243            unsupported ELF architecture                                                                                                                message and action   no                   file_format_rejected     True
elf-riscv64-real           unsupported ELF architecture                                                                                                                message and action   no                   file_format_rejected     True
elf-truncated-40           truncated ELF header: an ELF64 header needs 64 bytes; the file has 40                                                                       message and action   no                   file_format_rejected     True
pe-machine-0x5032          unsupported PE architecture                                                                                                                 message and action   no                   file_format_rejected     True
pe-riscv64-real            unsupported PE architecture                                                                                                                 message and action   no                   file_format_rejected     True
macho-bad-cpu              unsupported Mach-O architecture                                                                                                             message and action   no                   file_format_rejected     True
macho-ppc32-real           unsupported Mach-O architecture                                                                                                             message and action   no                   file_format_rejected     True
macho64-trunc-20           truncated Mach-O header: a 64-bit header needs 32 bytes; the file has 20                                                                    message and action   no                   file_format_rejected     True
fat-ppc-only               FAT binary has no host-compatible x64 architecture                                                                                          message and action   no                   file_format_rejected     True
fat-short-table            truncated or invalid FAT architecture table                                                                                                 message and action   no                   file_format_rejected     True
fat-x86_64-slice-past-eof  truncated FAT slice: the x86_64 slice ends at byte 104096; the file has 28                                                                  message and action   no                   file_format_rejected     True
java-Hello.class           truncated or invalid FAT architecture table                                                                                                 message and action   no                   file_format_rejected     True
java-Big.class             FAT binary has no host-compatible x64 architecture                                                                                          message and action   no                   file_format_rejected     True
dos-com-70000              DOS COM requires 1..65280 file bytes (64 KiB segment minus the 256-byte PSP prefix)                                                         message and action   no                   file_format_rejected     True
dos-com-empty              DOS COM requires 1..65280 file bytes (64 KiB segment minus the 256-byte PSP prefix)                                                         message and action   no                   file_format_rejected     True
raw-arm-unaligned          raw-binary arm entry_point 0x1002 must be 4-byte aligned                                                                                    message and action   no                   file_format_rejected     True
raw-arm64-unaligned        raw-binary arm64 entry_point 0x1001 must be 4-byte aligned                                                                                  message and action   no                   file_format_rejected     True
raw-empty-file             raw-binary requires at least one file byte                                                                                                  message and action   no                   file_format_rejected     True
raw-x86-past-4GiB          raw-binary mapping from 0xfffffff0 must fit in the x86 address width                                                                        message and action   no                   file_format_rejected     True
raw-x86_64-max             raw-binary mapping from 0xffffffffffffffff must fit in the x86_64 address width                                                             message and action   no                   file_format_rejected     True
control-directory          this opening route requires a file or app bundle                                                                                            no                   no                   directory_requires_file  True
control-missing            target does not exist or a path component is not a directory: ENOENT: no such file or directory, access '/tmp/p1987/fx/does-not-exist.exe'  message and action   message and action   none                     True
control-unreadable         permission denied while reading target: EACCES: permission denied, access '/tmp/i1979/fx/unreadable.txt'                                    message only         message only         none                     True
raw-missing-file           target does not exist or a path component is not a directory: ENOENT: no such file or directory, access '/tmp/p1987/fx/no-such-file.bin'    message and action   message and action   none                     True
Commands
# sources (read-only mirror), Node 24 first on PATH
git -C <rea-mirror>/rea.git archive 420e9567f9d52ed1e55b8609ed62db06ecdf9e32 | tar -x -C /tmp/p1987/head
git -C <rea-mirror>/rea.git archive 89f5e489adac69af2937fabc1a5ba283191d630a | tar -x -C /tmp/p1987/base
npm ci --prefix /tmp/p1987/<tree> && npm run build --prefix /tmp/p1987/<tree>    # exit 0, both trees
npm run test:prepare --prefix /tmp/p1987/head                                      # exit 0

# CLI, one run per file, both trees (exit code read each time)
node /tmp/p1987/<tree>/scripts/rea.mjs inspect --provider ghidra --json <file>
node ... inspect --provider ghidra --json --target-format dos-com <file>
node ... inspect --provider ghidra --json --target-format raw-binary --architecture arm --entry-point 0x1002 <file>

# MCP: initialize, then tools/call open_binary over stdio
node /tmp/p1987/<tree>/scripts/rea.mjs mcp
#   {"path": "<file>", "format": "raw-binary", "architecture": "arm", "entry_point": "0x1002"}

# doctor
node /tmp/p1987/<tree>/scripts/rea.mjs doctor --json --target <file>

# the PR's test file, once per Node
env -C /tmp/p1987/head PATH=<node bin>:/usr/local/bin:/bin npm run test:focused -- tests/boundary/filesystem/targetDiagnostics.test.ts

# CI state
gh api repos/morluto/rea/commits/420e9567f9d52ed1e55b8609ed62db06ecdf9e32/check-runs
gh api "repos/morluto/rea/actions/runs?head_sha=420e9567f9d52ed1e55b8609ed62db06ecdf9e32"

Simulated rewrite: a small script imports each tree's built parseBinaryTarget. It patches FileHandle.read so the 52-byte read at offset 0 returns e_type 3 instead of 2. The file is a 128-byte ELF32 little-endian MIPS header I built with Python. On head, the result is file_format_rejected and doctor says unsupported_target. On base, it is the old text and config_drift. The reason string is "MIPS ELF header no longer matches the resolved identity".

All other files are copies of my earlier fixtures or hand-built. I did not recheck the licences this time.

Test setup
  • Box: Nobara 44 (Fedora 44 base), Linux 7.2.9
  • CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads
  • RAM: 32 GB DDR4-3600
  • Node: 22.23.1, 24.18.0, 26.11.1 (tests); 24.18.0 (builds and all other runs)
  • Head: 420e956
  • Base: 89f5e48 (test(native): replay complete dylib-use provider output #1972)
  • Other: Ghidra 12.1.4, JDK 21, the box may have been shared with other test jobs, so I took no timings
  • Other: downloaded files and their licences:
Open Watcom v2 snapshot (NE, LE, LX): Sybase Open Watcom Public License 1.0 (Watcom-1.0)
Debian coreutils true, riscv64: GPL-3.0-or-later
Debian systemd-boot, riscv64: LGPL-2.1-or-later
rizin test file, PowerPC Mach-O: LGPL-3.0-only for the rizin library; the test file's own licence is unverified

🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊

N0zoM1z0 and others added 3 commits October 11, 2026 23:41
Retain the merged WASM static inspection route alongside format refusals.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <[email protected]>
Keep all format, WASM and path checks while separating their test groups.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <[email protected]>
Preserve the source metadata reader and bounded native profile now on main.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Kaoru0822 <[email protected]>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fce03901f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

return err(new BinaryTargetError(path, admitted.error));
return err(
new BinaryTargetError(path, admitted.error, {
constraint: "file_format_rejected",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Separate raw-binary input errors from format rejection

When the public CLI/MCP raw-binary route receives an otherwise schema-valid but invalid load choice such as ARM entry_point=0x1, rawBinaryEntryPointSchema accepts it (src/domain/rawBinary.ts:21-25) while admitRawBinary rejects its alignment (src/domain/rawBinary.ts:85-91). This blanket tag converts that caller-input error into category: unsupported_target / file_format_rejected, and shared remediation tells the caller to select another file even though changing entry_point fixes the same target; split caller-selection failures from file-size/byte failures instead of tagging every admission error as a format refusal.

AGENTS.md reference: AGENTS.md:L23-L23

Useful? React with 👍 / 👎.

@N0zoM1z0
N0zoM1z0 merged commit f28f338 into morluto:main Oct 12, 2026
31 checks passed
@morluto

morluto commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

@Ha1baraA11, thanks for fixing the misleading path advice at the format-refusal boundary and keeping real missing-path and permission errors on their own guidance. The NE/LE/LX cases make that distinction concrete across Doctor and the shared error projection. Welcome aboard REA!

@morluto morluto mentioned this pull request Oct 13, 2026
3 tasks done
@morluto morluto added bug Something isn't working area: providers Provider and capability discovery, including provider proposal triage labels Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: providers Provider and capability discovery, including provider proposal triage bug Something isn't working ci:full

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] NE, LE and LX refusals give misleading "check the path" advice

4 participants