[GH-ISSUE #5529] [Bug] Native dispatch metadata --snapshot rejects a successful decode without a deep provider #3365

Closed
opened 2026-10-31 00:39:35 +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/5529

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

On macOS with no available deep-analysis provider, inspect-native-dispatch-metadata successfully decodes a valid Mach-O file. Adding --snapshot to the same request exits 1, creates no snapshot, and reports evidence_integrity_mismatch with advice to recreate valid Evidence. The error retains the successful decode in details.partial_observation.

Reproduction

The independent verifier executed these commands from a built source checkout with dependencies already present. The isolated configuration makes Ghidra, IDA, Kuna and Hopper unavailable while the native macOS dispatch reader remains available.

VERIFY_ROOT="$(mktemp -d)"
mkdir -p "$VERIFY_ROOT/home" "$VERIFY_ROOT/config" "$VERIFY_ROOT/data" "$VERIFY_ROOT/cache" "$VERIFY_ROOT/state"
cat > "$VERIFY_ROOT/category.m" <<'EOF'
#import <Foundation/Foundation.h>
@interface NSString (Verify)
- (int)verifyScore;
@end
@implementation NSString (Verify)
- (int)verifyScore { return 7; }
@end
EOF
clang -dynamiclib -fobjc-arc -framework Foundation -o "$VERIFY_ROOT/category.dylib" "$VERIFY_ROOT/category.m"
run_rea() {
  env -i PATH="$PATH" HOME="$VERIFY_ROOT/home" \
    XDG_CONFIG_HOME="$VERIFY_ROOT/config" XDG_DATA_HOME="$VERIFY_ROOT/data" \
    XDG_CACHE_HOME="$VERIFY_ROOT/cache" XDG_STATE_HOME="$VERIFY_ROOT/state" \
    REA_LOG_LEVEL=silent HOPPER_LAUNCHER_PATH="$VERIFY_ROOT/missing-hopper" \
    node scripts/rea.mjs "$@"
}
run_rea providers --json > "$VERIFY_ROOT/providers.json"
run_rea inspect-native-dispatch-metadata "$VERIFY_ROOT/category.dylib" --json > "$VERIFY_ROOT/plain.json"
printf 'decode exit: %s\n' "$?"
run_rea inspect-native-dispatch-metadata "$VERIFY_ROOT/category.dylib" --snapshot "$VERIFY_ROOT/snap.json" --json > "$VERIFY_ROOT/failure.json"
printf 'snapshot exit: %s\n' "$?"
test ! -e "$VERIFY_ROOT/snap.json"

Observed results: the plain call exits 0 and returns category Verify with method verifyScore; the snapshot call exits 1 and leaves no snapshot. The verifier reproduced this in the initial run and again by executing the draft's shell reproduction. This is CLI verification only.

Expected behavior

--snapshot advertises loading or updating the local analysis snapshot in src/cli/coreNativeCommands.ts:261-290. docs/cli.md:211-246 describes retention of successful analysis results and permits snapshots containing workflow results with zero primitive entries. src/native/NativeMacOSProviderMetadata.ts:27-42 advertises the local dispatch operation on macOS without deep-provider execution.

Requesting retention should preserve the successful local result. If this operation cannot support snapshots without a deep provider, the caller should receive an accurate typed limitation rather than a diagnosis that unchanged Evidence is invalid.

Impact and scope

The documented optional retention path fails in the tested native-only macOS configuration. The caller loses snapshot persistence and receives recovery advice that does not address the missing provider profile. The decode remains available without --snapshot; saving its JSON preserves the observation but does not provide snapshot replay. No corruption, target mutation or security boundary crossing was observed. MCP and other platforms were not tested.

REA version

rea-agents 6.7.0, source commit 074768901f3cdc8205b61773fb1faf6f6c7b3ca8.

Runtime and platform

macOS arm64, Node.js CLI, Apple clang with Foundation. NOT_ENOUGH_INFO: the verifier did not record the exact Node.js or macOS version. No deep-analysis provider was available in the failing configuration.

Target and artifact context

Locally compiled arm64 Mach-O dynamic library containing an NSString category Verify and method verifyScore. The target was read, not executed.

Interface

CLI

Earliest failure stage

Artifact or evidence registration

Relevant output or evidence

The snapshot CLI call returns:

{
  "code": "evidence_integrity_mismatch",
  "message": "Evidence is invalid or has changed. Recreate or re-import it, then try again.",
  "retryable": false,
  "details": {
    "reason": "Analysis snapshots require a concrete provider analysis profile"
  }
}

The verifier compared the plain output with the error's details.partial_observation. Both the Evidence IDs and normalized_result values match. Both observations have outer provider rea-workflow, null analysis profile, and nested decode provider native-macos with version apple-metadata-reader-1.

A separate control with the installed Hopper launcher discoverable saves the same local decode successfully with zero primitive entries and one workflow entry. This demonstrates that provider availability affects retention; it does not establish Hopper engine execution or incorrect provider attribution.

Typed outcome or recovery expected

Save the successful local result for snapshot reuse, or report a specific unsupported snapshot prerequisite with applicable recovery. Do not classify valid unchanged Evidence as an integrity mismatch.

Analysis or suspected cause

Source-derived reasoning at the tested revision: src/application/DirectAnalysis.ts:252-254 selects the native-dispatch session factory only when no snapshot path is supplied. With a snapshot path, the normal factory is used. After the native decode succeeds, snapshot export at src/application/DirectAnalysis.ts:382-393 reaches the concrete-profile rejection in src/application/binary/BinarySessionRecords.ts:160-170.

The relevant changes between the tested revision and current upstream main c374c2fe7290b914d73d9e27af38b498753ec593 leave that session selection and rejection unchanged. This is a source comparison, not a runtime reproduction of the newer revision.

Additional context

Prepared with AI assistance and independently reproduced by a separate verifier through the public CLI. Related #4377 concerns the count returned after importing a retained workflow result; this report concerns failure to create a snapshot at all in native-only configuration.

Originally created by @coygeek on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5529 ### 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 On macOS with no available deep-analysis provider, `inspect-native-dispatch-metadata` successfully decodes a valid Mach-O file. Adding `--snapshot` to the same request exits 1, creates no snapshot, and reports `evidence_integrity_mismatch` with advice to recreate valid Evidence. The error retains the successful decode in `details.partial_observation`. ### Reproduction The independent verifier executed these commands from a built source checkout with dependencies already present. The isolated configuration makes Ghidra, IDA, Kuna and Hopper unavailable while the native macOS dispatch reader remains available. ```sh VERIFY_ROOT="$(mktemp -d)" mkdir -p "$VERIFY_ROOT/home" "$VERIFY_ROOT/config" "$VERIFY_ROOT/data" "$VERIFY_ROOT/cache" "$VERIFY_ROOT/state" cat > "$VERIFY_ROOT/category.m" <<'EOF' #import <Foundation/Foundation.h> @interface NSString (Verify) - (int)verifyScore; @end @implementation NSString (Verify) - (int)verifyScore { return 7; } @end EOF clang -dynamiclib -fobjc-arc -framework Foundation -o "$VERIFY_ROOT/category.dylib" "$VERIFY_ROOT/category.m" run_rea() { env -i PATH="$PATH" HOME="$VERIFY_ROOT/home" \ XDG_CONFIG_HOME="$VERIFY_ROOT/config" XDG_DATA_HOME="$VERIFY_ROOT/data" \ XDG_CACHE_HOME="$VERIFY_ROOT/cache" XDG_STATE_HOME="$VERIFY_ROOT/state" \ REA_LOG_LEVEL=silent HOPPER_LAUNCHER_PATH="$VERIFY_ROOT/missing-hopper" \ node scripts/rea.mjs "$@" } run_rea providers --json > "$VERIFY_ROOT/providers.json" run_rea inspect-native-dispatch-metadata "$VERIFY_ROOT/category.dylib" --json > "$VERIFY_ROOT/plain.json" printf 'decode exit: %s\n' "$?" run_rea inspect-native-dispatch-metadata "$VERIFY_ROOT/category.dylib" --snapshot "$VERIFY_ROOT/snap.json" --json > "$VERIFY_ROOT/failure.json" printf 'snapshot exit: %s\n' "$?" test ! -e "$VERIFY_ROOT/snap.json" ``` Observed results: the plain call exits 0 and returns category `Verify` with method `verifyScore`; the snapshot call exits 1 and leaves no snapshot. The verifier reproduced this in the initial run and again by executing the draft's shell reproduction. This is CLI verification only. ### Expected behavior `--snapshot` advertises loading or updating the local analysis snapshot in `src/cli/coreNativeCommands.ts:261-290`. `docs/cli.md:211-246` describes retention of successful analysis results and permits snapshots containing workflow results with zero primitive entries. `src/native/NativeMacOSProviderMetadata.ts:27-42` advertises the local dispatch operation on macOS without deep-provider execution. Requesting retention should preserve the successful local result. If this operation cannot support snapshots without a deep provider, the caller should receive an accurate typed limitation rather than a diagnosis that unchanged Evidence is invalid. ### Impact and scope The documented optional retention path fails in the tested native-only macOS configuration. The caller loses snapshot persistence and receives recovery advice that does not address the missing provider profile. The decode remains available without `--snapshot`; saving its JSON preserves the observation but does not provide snapshot replay. No corruption, target mutation or security boundary crossing was observed. MCP and other platforms were not tested. ### REA version `rea-agents` 6.7.0, source commit `074768901f3cdc8205b61773fb1faf6f6c7b3ca8`. ### Runtime and platform macOS arm64, Node.js CLI, Apple clang with Foundation. NOT_ENOUGH_INFO: the verifier did not record the exact Node.js or macOS version. No deep-analysis provider was available in the failing configuration. ### Target and artifact context Locally compiled arm64 Mach-O dynamic library containing an NSString category `Verify` and method `verifyScore`. The target was read, not executed. ### Interface CLI ### Earliest failure stage Artifact or evidence registration ### Relevant output or evidence The snapshot CLI call returns: ```json { "code": "evidence_integrity_mismatch", "message": "Evidence is invalid or has changed. Recreate or re-import it, then try again.", "retryable": false, "details": { "reason": "Analysis snapshots require a concrete provider analysis profile" } } ``` The verifier compared the plain output with the error's `details.partial_observation`. Both the Evidence IDs and `normalized_result` values match. Both observations have outer provider `rea-workflow`, null analysis profile, and nested decode provider `native-macos` with version `apple-metadata-reader-1`. A separate control with the installed Hopper launcher discoverable saves the same local decode successfully with zero primitive entries and one workflow entry. This demonstrates that provider availability affects retention; it does not establish Hopper engine execution or incorrect provider attribution. ### Typed outcome or recovery expected Save the successful local result for snapshot reuse, or report a specific unsupported snapshot prerequisite with applicable recovery. Do not classify valid unchanged Evidence as an integrity mismatch. ### Analysis or suspected cause Source-derived reasoning at the tested revision: `src/application/DirectAnalysis.ts:252-254` selects the native-dispatch session factory only when no snapshot path is supplied. With a snapshot path, the normal factory is used. After the native decode succeeds, snapshot export at `src/application/DirectAnalysis.ts:382-393` reaches the concrete-profile rejection in `src/application/binary/BinarySessionRecords.ts:160-170`. The relevant changes between the tested revision and current upstream main `c374c2fe7290b914d73d9e27af38b498753ec593` leave that session selection and rejection unchanged. This is a source comparison, not a runtime reproduction of the newer revision. ### Additional context Prepared with AI assistance and independently reproduced by a separate verifier through the public CLI. Related #4377 concerns the count returned after importing a retained workflow result; this report concerns failure to create a snapshot at all in native-only configuration.
Author
Owner

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

Cross-referencing with canonical issue #4368 and sibling #5424 regarding native dispatch metadata decode requirements and --snapshot verification without deep analysis providers. Cataloged under Cluster AZ in consolidation tracker #4330.

<!-- gh-comment-id:6293054325 --> @matbrgz commented on GitHub (Oct 20, 2026): Cross-referencing with canonical issue #4368 and sibling #5424 regarding native dispatch metadata decode requirements and `--snapshot` verification without deep analysis providers. Cataloged under Cluster AZ 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#3365
No description provided.