[GH-ISSUE #5547] [Bug] DMG inspection guidance directs callers to unsupported extraction #3377

Closed
opened 2026-10-31 00:39:42 +00:00 by bsakaguchi · 1 comment
Owner

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

Before submitting

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

Area

Documentation

Observed behavior

For a valid macOS DMG, node scripts/rea.mjs inspect-artifact "$WORK/fixture.dmg" --json exits 0 and inventories its regular file. Following the inspection tool description's instruction to use extract_artifact to materialize the contents, node scripts/rea.mjs extract-artifact "$WORK/fixture.dmg" --json exits 1 with unsupported_target: Artifact format has no extraction reader: dmg.

This report concerns the advertised workflow, rather than a requirement to add DMG extraction. The runtime behavior was independently reproduced once in one inspect/extract sequence. The contradictory descriptions and guide were checked in source; no MCP runtime reproduction is claimed.

Reproduction

From the source checkout at the revision below, with locked dependencies and the compiled runtime prepared, the independent verifier created a synthetic image and ran the public CLI sequence equivalent to:

WORK="$(mktemp -d)"
mkdir -p "$WORK/src" "$WORK/home" "$WORK/config" "$WORK/data" \
  "$WORK/cache" "$WORK/state" "$WORK/temp"
printf 'fixture\n' > "$WORK/src/file.txt"
hdiutil create -quiet -srcfolder "$WORK/src" -volname Fixture \
  -size 20m -format UDZO "$WORK/fixture.dmg"
run_rea() {
  env HOME="$WORK/home" XDG_CONFIG_HOME="$WORK/config" \
    XDG_DATA_HOME="$WORK/data" XDG_CACHE_HOME="$WORK/cache" \
    XDG_STATE_HOME="$WORK/state" TMPDIR="$WORK/temp" \
    node scripts/rea.mjs "$@"
}
run_rea inspect-artifact "$WORK/fixture.dmg" --json
run_rea extract-artifact "$WORK/fixture.dmg" --json

Inspection reports root_format: dmg and regular resource fixture.dmg/Fixture/file.txt; extraction refuses the same image. The verifier confirmed that all fixture images were detached after the checks.

Expected behavior

Source-derived expectation: src/contracts/artifactToolContracts.ts:83-89 describes automatic read-only DMG mounting and directs callers to extraction for regular contents. The authored package guide, .agents/skills/reverse-engineer-anything/references/native-and-artifacts.md:286-319, includes DMG inspection and repeats that direction without a DMG exclusion. Its generated packaged copy gives the same guidance.

The descriptions and guide should either direct callers to a working materialization route or clearly state the DMG extraction limitation and applicable alternative. Correcting the guidance is sufficient; implementing a DMG extraction reader is not required by this report. Preserve successful DMG inspection and existing supported extraction behavior.

Impact and scope

Following the shipped materialization instruction produces a hard failure for the tested valid DMG despite successful inspection. This is a bounded workflow failure, assessed as P2, with a verified workaround: manual read-only hdiutil attachment exposed file.txt with the original eight bytes, and detachment succeeded. A ZIP control containing the same file extracted successfully and preserved its bytes. Other DMG variants and hosts were not tested; no data loss was observed.

REA version

6.7.0; source commit 074768901f3cdc8205b61773fb1faf6f6c7b3ca8.

Runtime and platform

Node.js v26.12.0; macOS 27.0.1; arm64; hdiutil available. No Hopper or Ghidra workflow was involved.

Target and artifact context

Self-created UDZO DMG containing one regular file, file.txt, with bytes fixture\n; volume name Fixture. No third-party target data.

Interface

CLI

Earliest failure stage

Request parsing or validation

Relevant output or evidence

Selected fields from the independently reproduced CLI extraction failure (exit 1):

code: unsupported_target
details.operation: extract_artifact
details.reason: Artifact format has no extraction reader: dmg
retryable: false
remediation.action: Select a target supported by this operation or choose an operation supporting the reported target format.

Inspection of the same image exited 0. Manual read-only mounting succeeded, so this was not an unavailable mounting environment.

The verifier ran npm run test:focused -- tests/boundary/providers/native/artifactProvider.extractionFormat.test.ts: all five tests passed. The DMG refusal case at lines 15-44 establishes that refusal is intentional existing behavior; it does not establish that the materialization guidance is accurate.

Typed outcome or recovery expected

If DMG extraction remains unsupported, explain that limitation before recommending extraction and give applicable read-only mounting guidance. The current generic unsupported-target remediation does not resolve the contradictory instruction.

Analysis or suspected cause

Source-derived: src/server/registerArtifactTools.ts:35 registers the canonical descriptions for MCP. src/cli/artifactCommands.ts:196-227 routes CLI extraction to the artifact operation. src/artifacts/extraction/ArtifactExtraction.ts:65-79,427-457 rejects DMG before inventory or materialization. The supported inspection format and extraction format limits are not reflected consistently in the descriptions and authored guide.

Fetched upstream main was checked through 57e76599c035a420181b665f4f2a3edad71628fb. Since the reproduction baseline, the cited runtime/contract/test files are unchanged and the guide changes concern unrelated native-function matching and IL2CPP metadata; no relevant fix was found. The runtime reproduction remains attributed to the baseline above.

Additional context

Prepared with AI assistance and independently reproduced by a separate verifier.

Related: #3095 requests DMG extraction as a new capability and explicitly does not claim it is promised. This report identifies the inaccurate existing instruction and can be resolved without implementing that feature. It is also separate from failures that classify a busy disk image as unavailable; this fixture inspected and mounted successfully.

Originally created by @coygeek on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5547 ### 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 Documentation ### Observed behavior For a valid macOS DMG, `node scripts/rea.mjs inspect-artifact "$WORK/fixture.dmg" --json` exits 0 and inventories its regular file. Following the inspection tool description's instruction to use `extract_artifact` to materialize the contents, `node scripts/rea.mjs extract-artifact "$WORK/fixture.dmg" --json` exits 1 with `unsupported_target`: `Artifact format has no extraction reader: dmg`. This report concerns the advertised workflow, rather than a requirement to add DMG extraction. The runtime behavior was independently reproduced once in one inspect/extract sequence. The contradictory descriptions and guide were checked in source; no MCP runtime reproduction is claimed. ### Reproduction From the source checkout at the revision below, with locked dependencies and the compiled runtime prepared, the independent verifier created a synthetic image and ran the public CLI sequence equivalent to: ```sh WORK="$(mktemp -d)" mkdir -p "$WORK/src" "$WORK/home" "$WORK/config" "$WORK/data" \ "$WORK/cache" "$WORK/state" "$WORK/temp" printf 'fixture\n' > "$WORK/src/file.txt" hdiutil create -quiet -srcfolder "$WORK/src" -volname Fixture \ -size 20m -format UDZO "$WORK/fixture.dmg" run_rea() { env HOME="$WORK/home" XDG_CONFIG_HOME="$WORK/config" \ XDG_DATA_HOME="$WORK/data" XDG_CACHE_HOME="$WORK/cache" \ XDG_STATE_HOME="$WORK/state" TMPDIR="$WORK/temp" \ node scripts/rea.mjs "$@" } run_rea inspect-artifact "$WORK/fixture.dmg" --json run_rea extract-artifact "$WORK/fixture.dmg" --json ``` Inspection reports `root_format: dmg` and regular resource `fixture.dmg/Fixture/file.txt`; extraction refuses the same image. The verifier confirmed that all fixture images were detached after the checks. ### Expected behavior Source-derived expectation: `src/contracts/artifactToolContracts.ts:83-89` describes automatic read-only DMG mounting and directs callers to extraction for regular contents. The authored package guide, `.agents/skills/reverse-engineer-anything/references/native-and-artifacts.md:286-319`, includes DMG inspection and repeats that direction without a DMG exclusion. Its generated packaged copy gives the same guidance. The descriptions and guide should either direct callers to a working materialization route or clearly state the DMG extraction limitation and applicable alternative. Correcting the guidance is sufficient; implementing a DMG extraction reader is not required by this report. Preserve successful DMG inspection and existing supported extraction behavior. ### Impact and scope Following the shipped materialization instruction produces a hard failure for the tested valid DMG despite successful inspection. This is a bounded workflow failure, assessed as P2, with a verified workaround: manual read-only `hdiutil` attachment exposed `file.txt` with the original eight bytes, and detachment succeeded. A ZIP control containing the same file extracted successfully and preserved its bytes. Other DMG variants and hosts were not tested; no data loss was observed. ### REA version 6.7.0; source commit `074768901f3cdc8205b61773fb1faf6f6c7b3ca8`. ### Runtime and platform Node.js v26.12.0; macOS 27.0.1; arm64; `hdiutil` available. No Hopper or Ghidra workflow was involved. ### Target and artifact context Self-created UDZO DMG containing one regular file, `file.txt`, with bytes `fixture\n`; volume name `Fixture`. No third-party target data. ### Interface CLI ### Earliest failure stage Request parsing or validation ### Relevant output or evidence Selected fields from the independently reproduced CLI extraction failure (exit 1): ```text code: unsupported_target details.operation: extract_artifact details.reason: Artifact format has no extraction reader: dmg retryable: false remediation.action: Select a target supported by this operation or choose an operation supporting the reported target format. ``` Inspection of the same image exited 0. Manual read-only mounting succeeded, so this was not an unavailable mounting environment. The verifier ran `npm run test:focused -- tests/boundary/providers/native/artifactProvider.extractionFormat.test.ts`: all five tests passed. The DMG refusal case at lines 15-44 establishes that refusal is intentional existing behavior; it does not establish that the materialization guidance is accurate. ### Typed outcome or recovery expected If DMG extraction remains unsupported, explain that limitation before recommending extraction and give applicable read-only mounting guidance. The current generic unsupported-target remediation does not resolve the contradictory instruction. ### Analysis or suspected cause Source-derived: `src/server/registerArtifactTools.ts:35` registers the canonical descriptions for MCP. `src/cli/artifactCommands.ts:196-227` routes CLI extraction to the artifact operation. `src/artifacts/extraction/ArtifactExtraction.ts:65-79,427-457` rejects DMG before inventory or materialization. The supported inspection format and extraction format limits are not reflected consistently in the descriptions and authored guide. Fetched upstream `main` was checked through `57e76599c035a420181b665f4f2a3edad71628fb`. Since the reproduction baseline, the cited runtime/contract/test files are unchanged and the guide changes concern unrelated native-function matching and IL2CPP metadata; no relevant fix was found. The runtime reproduction remains attributed to the baseline above. ### Additional context Prepared with AI assistance and independently reproduced by a separate verifier. Related: #3095 requests DMG extraction as a new capability and explicitly does not claim it is promised. This report identifies the inaccurate existing instruction and can be resolved without implementing that feature. It is also separate from failures that classify a busy disk image as unavailable; this fixture inspected and mounted successfully.
Author
Owner

@matbrgz commented on GitHub (Oct 20, 2026):

Cross-referencing with canonical issue #5546 ([Bug] inspect-artifact discards root observations when a DMG is already mounted) and sibling #5549. Both address Apple DMG artifact lifecycle anomalies, extraction guidance, and mount state handling in inspect-artifact. Cataloged under Cluster BB in consolidation tracker #4330.

<!-- gh-comment-id:6295545115 --> @matbrgz commented on GitHub (Oct 20, 2026): Cross-referencing with canonical issue #5546 (`[Bug] inspect-artifact discards root observations when a DMG is already mounted`) and sibling #5549. Both address Apple DMG artifact lifecycle anomalies, extraction guidance, and mount state handling in `inspect-artifact`. Cataloged under Cluster BB in consolidation tracker #4330.
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#3377
No description provided.