[PR #6150] [CLOSED] fix(diagnostics): attribute input and refusal failures to their source #7165

Closed
opened 2026-11-01 21:45:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6150
Author: @agorevski
Created: 10/21/2026
Status: ❌ Closed

Base: main ← Head: fix/input-diagnostics-b


📝 Commits (1)

  • d1f1f63 fix(diagnostics): attribute input and refusal failures to their source

📊 Changes

28 files changed (+481 additions, -45 deletions)

View changed files

📝 bridge/pwntools/layout_impl.py (+1 -1)
📝 src/adb/AdbConfiguration.ts (+4 -3)
📝 src/adb/AdbProvider.ts (+2 -2)
📝 src/adb/AdbVersionProbe.test.ts (+25 -2)
📝 src/application/DirectAnalysis.ts (+3 -0)
📝 src/application/JsonFiles.ts (+3 -7)
📝 src/application/binary/AnalysisSnapshotFiles.ts (+3 -1)
📝 src/application/binary/BinarySessionRecords.ts (+11 -2)
📝 src/application/javascript/ElectronEvidence.ts (+7 -12)
📝 src/application/native/NativeMatchingAdmission.ts (+17 -1)
📝 src/application/native/NativeMatchingBundleSources.ts (+21 -7)
📝 src/application/native/NativeMatchingSources.ts (+10 -1)
📝 src/artifacts/pyinstaller/MarshalSubset.test.ts (+13 -0)
📝 src/domain/analysisView/environmentStateGate.ts (+1 -1)
📝 src/domain/analysisView/environmentStateRules.ts (+14 -4)
📝 src/domain/analysisView/environmentStateView.test.ts (+33 -0)
📝 src/domain/providerConfigurationRefusal.ts (+1 -0)
📝 src/javascript/analysis/JavaScriptAnalysisWorker.ts (+9 -0)
📝 src/server/registerFunctionComparisonTool.ts (+31 -0)
📝 src/server/registerSessionTools.ts (+1 -0)

...and 8 more files

📄 Description

Summary

Ten input and diagnostic defects where REA reported the wrong cause, operation, or
recovery for a request it refused or recovered from. Each fix moves the attribution
to the boundary that owns the fact:

  • Malformed inline native-matching Evidence now names its request field (left,
    right, or the observation index) on both the MCP and CLI bundle paths. Fixes #5950.
  • compare_functions reports wrong-kind Evidence per side as input issues instead of a
    generic integrity mismatch. Fixes #5932.
  • ADB and Apktool capability refusals keep their version-probe diagnostics (selected
    command, stdout, stderr, probe result). Fixes #6094.
  • ADB version-probe limits are attributed to the requesting operation. Fixes #5981.
  • A cancelled open_binary snapshot read reports open_binary, not read_evidence_file.
    Fixes #5968.
  • JavaScript worker I/O failure frames map to ProviderAdapterError with source path,
    phase, and I/O message instead of unreadable_output. Fixes #6114.
  • Digit-string list totals count as environment-state counters. Fixes #5974.
  • Negative PYZ marshal counts and lengths are format failures, so opaque PYZ recovery
    applies instead of aborting sibling inventory. Fixes #6120.
  • Electron target-list Evidence reports the browser environment and host-platform
    limitation, as inspect already does. Fixes #5917.
  • An overflowing ELF program-header offset in the pwntools bridge is an invalid format,
    not an execution failure. Fixes #5716.

Problem and expected behavior

Each case was reproduced or traced in the current base (01788bac8):

  • Native matching parsed deferred Evidence without a request path, so the catch emitted
    an issue with path: []. The CLI bundle loader had the same gap and emitted no
    details.issues.
  • The compare_functions kind gate constructed EvidenceIntegrityError with no side.
  • providerConfigurationRefusal dropped failure.diagnostics, although the error
    options and projection already support them.
  • inspectAdbClient hard-coded inspect_adb_client; readAnalysisSnapshot and the JSON
    readers hard-coded read_evidence_file.
  • environmentStateGate compared counters with ===, excluding strings that countOf
    accepts.
  • #protocolFailure sent every non-resource worker failure, including io, to
    AnalysisOutputError.
  • MarshalSubset returned limit for negative sizes; PyzArchive recovers only format.
  • list-electron-targets gated the environment on "target" in result, which list
    results lack.
  • layout_impl.py omitted OverflowError from the structural-parse tuple.

Change and scope

Each change is local to the owning boundary, with no new contracts, providers, or
process launches:

  • Shared helper malformedInlineEvidence in NativeMatchingBundleSources.ts is used by
    the loader root loop and the MCP-path resolve.
  • The operation is threaded explicitly through readAnalysisSnapshot (new optional
    parameter defaulting to read_evidence_file) and readJsonObjectMembersFile.
  • renderStateList keeps a string counter as a string, so the gate's
    same(render(...), body) check still accepts digit-string totals.

Not included: no tool schema or Evidence shape change; no change to ADB, Apktool, or
pwntools launch behavior; no unrelated cleanup. One new max-params warning is
introduced in src/application/JsonFiles.ts (warning only; the operation parameter must
reach the cancellation site).

Contribution scope: not applicable. These are fixes within existing boundaries.

Contract and boundary impact

  • Semantic owner and earliest changed stage: each fix is at its producing boundary (the
    native input parser and bundle loader, the function-comparison input gate, the ADB and
    Apktool configuration projection, the snapshot reader, the JavaScript worker protocol
    mapping, the PYZ marshal classifier, the environment-state gate, the Electron evidence
    projection, and the pwntools bridge classifier).
  • Contribution scope fit and linked maintainer decision: not applicable (existing
    boundaries).
  • CLI and MCP/tool-catalog contract: no schema change. Error codes and details change
    as described under Compatibility.
  • Provider, bridge, target-format, or platform compatibility: pwntools bridge (Python,
    Linux x64). Other providers are unchanged apart from the refusal diagnostics above.
  • Evidence, artifact, provenance, or reconstruction contract: Evidence shape unchanged.
    Electron target-list Evidence now carries the same environment and limitation fields
    that inspect Evidence already carries.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable):
    not applicable. Cleanup and ownership paths are untouched.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact:
    none. No generated catalogs, skills, or dependency manifests are edited.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

Evidence type: executed tests and base-revision reproductions. Source-derived conclusions
are noted where a test was not run.

  • Tests added or updated:
    • tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts (real pwntools bridge; gated on REA_PWNTOOLS_PYTHON)
    • tests/boundary/cli/electronCli.test.ts
    • tests/boundary/mcp/functionComparisonReferenceFactsMcp.test.ts
    • tests/acceptance/tools/nativeFunctionMatching.test.ts (MCP cases plus one CLI case)
    • tests/boundary/filesystem/analysisSnapshotInput.test.ts
    • tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts (real worker process with deterministic input removal)
    • tests/process-global/apktoolEnvironment.test.ts
    • src/adb/AdbVersionProbe.test.ts
    • src/artifacts/pyinstaller/MarshalSubset.test.ts
    • src/domain/analysisView/environmentStateView.test.ts
    • tests/boundary/providers/adb/adbCommandFinalization.test.ts (call-site signature updates only)
  • Base reproduction: each new regression was run with the base source restored (for
    CLI and stdio-MCP cases, dist was rebuilt from base first), then with the fix. All ten
    failed on base and passed with the fix:
    • #5716: execution_failure where invalid_request was expected.
    • #5917: list Evidence without environment or limitation.
    • #5932: no details.issues.
    • #5950: 5 of 5 cases, path: [] or no issues.
    • #5968: cancellation attributed to read_evidence_file.
    • #5974: counters empty for a string total.
    • #5981: resource_constraint attributed to inspect_adb_client.
    • #6094: no diagnostics.
    • #6114: unreadable_output.
    • #6120: limit where format was expected.
  • User-visible CLI/MCP output (if applicable):
    • list-adb-devices --json with an unrecognized version launcher now returns
      capability_unavailable with details.diagnostics containing selected_binary,
      path_source, version_probe: "unrecognized_output", stdout, and stderr.
    • match-native-functions with left: "not-evidence" and --source_bundle returns
      invalid_request with details.issues: [{path: ["left"], reason: "invalid_value", ...}].
  • Remaining proof gaps:
    • Real Ghidra, IDA, Hopper, Frida, and browser providers were not run.
    • No live Electron app (fake CDP endpoint only); no real adb device or Apktool install
      (substitute launchers only).
    • The pwntools case runs only when REA_PWNTOOLS_PYTHON points at pwntools 4.15.0,
      pyelftools 0.33, and Unicorn 2.1.2. The default vitest run skips it, and CI's
      real-binary-layout workflow runs verify:binary:layout, not this file. It was run
      locally against a venv that is not committed.
    • The open_binary cancellation test pre-aborts the signal at the snapshot reader; it
      does not race a live MCP cancellation.
    • Cancellation timeout and other operation-attribution paths of the ADB probe were not
      executed (only the output-limit path).

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.

Validation performed

Merge follow-up: main was merged into the branch (f2a0da223) to resolve conflicts in src/application/JsonFiles.ts and src/javascript/analysis/JavaScriptAnalysisWorker.ts. After the merge:

  • node scripts/run-typescript.mjs --noEmit — exit 0.
  • npm run test:focused -- <12 files covering the changed boundaries> — 12 files, 164 passed, 2 skipped.
  • npx oxlint on the two conflicted files — 0 errors; warnings only.
  • npx oxfmt --check on the two conflicted files — formatted.
  • Not run: the full suite.

Earlier validation (before the merge):

Each entry lists a command that ran and its observed result. Run in the worktree on Node
v22.23.1 (within engines).

  • npm run build:cached — exit 0 (rebuilt several times, including from base source for
    the CLI and stdio-MCP base runs; final dist is from the fixed tree).
  • npx vitest run src/artifacts/pyinstaller/MarshalSubset.test.ts src/domain/analysisView/environmentStateView.test.ts src/adb/AdbVersionProbe.test.ts tests/boundary/providers/adb/adbCommandFinalization.test.ts tests/boundary/filesystem/analysisSnapshotInput.test.ts tests/process-global/apktoolEnvironment.test.ts tests/boundary/mcp/functionComparisonReferenceFactsMcp.test.ts tests/boundary/cli/electronCli.test.ts tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts tests/acceptance/tools/nativeFunctionMatching.test.ts --maxWorkers 2 — 10 files, 115 tests passed.
  • REA_PWNTOOLS_PYTHON=<local pwntools 4.15.0 venv>/bin/python npx vitest run tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts — 35 passed, 1 skipped (unsupported-host case).
  • npx vitest run tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts (no runtime configured) — 34 passed, 2 skipped.
  • Base-reproduction runs (each failed on base, as listed above) — 10 of 10 failed on base.
  • npm run typecheck — exit 0.
  • npx oxlint <27 changed files> — exit 0, 0 errors; pre-existing warnings plus one new max-params warning in src/application/JsonFiles.ts.
  • npx oxfmt --check <27 changed files> — exit 0.
  • Commit pre-commit hook (lint-staged) — exit 0.
  • Manual CLI spot checks with the built runtime: list-adb-devices --json (unrecognized launcher) and match-native-functions with malformed left both returned the expected details shown above.

Not run: the full test suite, npm run check:pr, and any real-provider workflow.

Compatibility, safety, and release

  • Breaking changes or migration steps: none to tool schemas or Evidence shape. Caller-visible
    error changes:
    • compare_functions wrong-kind Evidence: invalid_request with per-side issues
      (previously evidence_integrity_mismatch).
    • JavaScript worker I/O failure: execution_failure (previously unreadable_output).
    • PYZ with negative counts or lengths: left opaque, so sibling inventory is delivered
      (previously the whole artifact failed with truncated/limit).
    • Electron target-list Evidence: now includes environment and limitation fields.
    • Capability refusals for ADB and Apktool: now include details.diagnostics.
    • Environment-state list views: digit-string totals now count as counters.
      Internal signatures changed: inspectAdbClient (adds operation), readAnalysisSnapshot
      (optional trailing operation), readJsonObjectMembersFile (adds operation).
  • Real Hopper/Ghidra, browser, or OS coverage: not run. Linux x64 only for the pwntools
    gated case.
  • Package or release metadata impact: none.
  • Security, privacy, process, or containment review: no new process launches, target
    access, or network access. The JavaScript worker I/O diagnostic carries the source path and
    the worker's I/O message, text that was previously embedded in the output error message.
    Other redaction is unchanged.

Author readiness

Human owner: @agorevski

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • 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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6150 **Author:** [@agorevski](https://github.com/agorevski) **Created:** 10/21/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/input-diagnostics-b` --- ### 📝 Commits (1) - [`d1f1f63`](https://github.com/morluto/rea/commit/d1f1f63118418187481cd4f56ecf7608e80bcb82) fix(diagnostics): attribute input and refusal failures to their source ### 📊 Changes **28 files changed** (+481 additions, -45 deletions) <details> <summary>View changed files</summary> 📝 `bridge/pwntools/layout_impl.py` (+1 -1) 📝 `src/adb/AdbConfiguration.ts` (+4 -3) 📝 `src/adb/AdbProvider.ts` (+2 -2) 📝 `src/adb/AdbVersionProbe.test.ts` (+25 -2) 📝 `src/application/DirectAnalysis.ts` (+3 -0) 📝 `src/application/JsonFiles.ts` (+3 -7) 📝 `src/application/binary/AnalysisSnapshotFiles.ts` (+3 -1) 📝 `src/application/binary/BinarySessionRecords.ts` (+11 -2) 📝 `src/application/javascript/ElectronEvidence.ts` (+7 -12) 📝 `src/application/native/NativeMatchingAdmission.ts` (+17 -1) 📝 `src/application/native/NativeMatchingBundleSources.ts` (+21 -7) 📝 `src/application/native/NativeMatchingSources.ts` (+10 -1) 📝 `src/artifacts/pyinstaller/MarshalSubset.test.ts` (+13 -0) 📝 `src/domain/analysisView/environmentStateGate.ts` (+1 -1) 📝 `src/domain/analysisView/environmentStateRules.ts` (+14 -4) 📝 `src/domain/analysisView/environmentStateView.test.ts` (+33 -0) 📝 `src/domain/providerConfigurationRefusal.ts` (+1 -0) 📝 `src/javascript/analysis/JavaScriptAnalysisWorker.ts` (+9 -0) 📝 `src/server/registerFunctionComparisonTool.ts` (+31 -0) 📝 `src/server/registerSessionTools.ts` (+1 -0) _...and 8 more files_ </details> ### 📄 Description <!-- PR title: type(optional-scope): imperative outcome The title becomes the squash-merge commit subject and generated changelog entry. --> ## Summary Ten input and diagnostic defects where REA reported the wrong cause, operation, or recovery for a request it refused or recovered from. Each fix moves the attribution to the boundary that owns the fact: - Malformed inline native-matching Evidence now names its request field (`left`, `right`, or the observation index) on both the MCP and CLI bundle paths. Fixes #5950. - `compare_functions` reports wrong-kind Evidence per side as input issues instead of a generic integrity mismatch. Fixes #5932. - ADB and Apktool capability refusals keep their version-probe diagnostics (selected command, stdout, stderr, probe result). Fixes #6094. - ADB version-probe limits are attributed to the requesting operation. Fixes #5981. - A cancelled `open_binary` snapshot read reports `open_binary`, not `read_evidence_file`. Fixes #5968. - JavaScript worker I/O failure frames map to `ProviderAdapterError` with source path, phase, and I/O message instead of `unreadable_output`. Fixes #6114. - Digit-string list totals count as environment-state counters. Fixes #5974. - Negative PYZ marshal counts and lengths are format failures, so opaque PYZ recovery applies instead of aborting sibling inventory. Fixes #6120. - Electron target-list Evidence reports the browser environment and host-platform limitation, as inspect already does. Fixes #5917. - An overflowing ELF program-header offset in the pwntools bridge is an invalid format, not an execution failure. Fixes #5716. ## Problem and expected behavior Each case was reproduced or traced in the current base (`01788bac8`): - Native matching parsed deferred Evidence without a request path, so the catch emitted an issue with `path: []`. The CLI bundle loader had the same gap and emitted no `details.issues`. - The `compare_functions` kind gate constructed `EvidenceIntegrityError` with no side. - `providerConfigurationRefusal` dropped `failure.diagnostics`, although the error options and projection already support them. - `inspectAdbClient` hard-coded `inspect_adb_client`; `readAnalysisSnapshot` and the JSON readers hard-coded `read_evidence_file`. - `environmentStateGate` compared counters with `===`, excluding strings that `countOf` accepts. - `#protocolFailure` sent every non-resource worker failure, including `io`, to `AnalysisOutputError`. - `MarshalSubset` returned `limit` for negative sizes; `PyzArchive` recovers only `format`. - `list-electron-targets` gated the environment on `"target" in result`, which list results lack. - `layout_impl.py` omitted `OverflowError` from the structural-parse tuple. ## Change and scope Each change is local to the owning boundary, with no new contracts, providers, or process launches: - Shared helper `malformedInlineEvidence` in `NativeMatchingBundleSources.ts` is used by the loader root loop and the MCP-path `resolve`. - The operation is threaded explicitly through `readAnalysisSnapshot` (new optional parameter defaulting to `read_evidence_file`) and `readJsonObjectMembersFile`. - `renderStateList` keeps a string counter as a string, so the gate's `same(render(...), body)` check still accepts digit-string totals. Not included: no tool schema or Evidence shape change; no change to ADB, Apktool, or pwntools launch behavior; no unrelated cleanup. One new `max-params` warning is introduced in `src/application/JsonFiles.ts` (warning only; the operation parameter must reach the cancellation site). Contribution scope: not applicable. These are fixes within existing boundaries. ## Contract and boundary impact - Semantic owner and earliest changed stage: each fix is at its producing boundary (the native input parser and bundle loader, the function-comparison input gate, the ADB and Apktool configuration projection, the snapshot reader, the JavaScript worker protocol mapping, the PYZ marshal classifier, the environment-state gate, the Electron evidence projection, and the pwntools bridge classifier). - Contribution scope fit and linked maintainer decision: not applicable (existing boundaries). - CLI and MCP/tool-catalog contract: no schema change. Error codes and details change as described under Compatibility. - Provider, bridge, target-format, or platform compatibility: pwntools bridge (Python, Linux x64). Other providers are unchanged apart from the refusal diagnostics above. - Evidence, artifact, provenance, or reconstruction contract: Evidence shape unchanged. Electron target-list Evidence now carries the same environment and limitation fields that inspect Evidence already carries. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. Cleanup and ownership paths are untouched. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none. No generated catalogs, skills, or dependency manifests are edited. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [x] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [ ] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage Evidence type: executed tests and base-revision reproductions. Source-derived conclusions are noted where a test was not run. - Tests added or updated: - `tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts` (real pwntools bridge; gated on `REA_PWNTOOLS_PYTHON`) - `tests/boundary/cli/electronCli.test.ts` - `tests/boundary/mcp/functionComparisonReferenceFactsMcp.test.ts` - `tests/acceptance/tools/nativeFunctionMatching.test.ts` (MCP cases plus one CLI case) - `tests/boundary/filesystem/analysisSnapshotInput.test.ts` - `tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts` (real worker process with deterministic input removal) - `tests/process-global/apktoolEnvironment.test.ts` - `src/adb/AdbVersionProbe.test.ts` - `src/artifacts/pyinstaller/MarshalSubset.test.ts` - `src/domain/analysisView/environmentStateView.test.ts` - `tests/boundary/providers/adb/adbCommandFinalization.test.ts` (call-site signature updates only) - Base reproduction: each new regression was run with the base source restored (for CLI and stdio-MCP cases, `dist` was rebuilt from base first), then with the fix. All ten failed on base and passed with the fix: - #5716: `execution_failure` where `invalid_request` was expected. - #5917: list Evidence without `environment` or limitation. - #5932: no `details.issues`. - #5950: 5 of 5 cases, `path: []` or no issues. - #5968: cancellation attributed to `read_evidence_file`. - #5974: `counters` empty for a string total. - #5981: `resource_constraint` attributed to `inspect_adb_client`. - #6094: no `diagnostics`. - #6114: `unreadable_output`. - #6120: `limit` where `format` was expected. - User-visible CLI/MCP output (if applicable): - `list-adb-devices --json` with an unrecognized version launcher now returns `capability_unavailable` with `details.diagnostics` containing `selected_binary`, `path_source`, `version_probe: "unrecognized_output"`, `stdout`, and `stderr`. - `match-native-functions` with `left: "not-evidence"` and `--source_bundle` returns `invalid_request` with `details.issues: [{path: ["left"], reason: "invalid_value", ...}]`. - Remaining proof gaps: - Real Ghidra, IDA, Hopper, Frida, and browser providers were not run. - No live Electron app (fake CDP endpoint only); no real adb device or Apktool install (substitute launchers only). - The pwntools case runs only when `REA_PWNTOOLS_PYTHON` points at pwntools 4.15.0, pyelftools 0.33, and Unicorn 2.1.2. The default vitest run skips it, and CI's `real-binary-layout` workflow runs `verify:binary:layout`, not this file. It was run locally against a venv that is not committed. - The `open_binary` cancellation test pre-aborts the signal at the snapshot reader; it does not race a live MCP cancellation. - Cancellation timeout and other operation-attribution paths of the ADB probe were not executed (only the output-limit path). For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed Merge follow-up: `main` was merged into the branch (`f2a0da223`) to resolve conflicts in `src/application/JsonFiles.ts` and `src/javascript/analysis/JavaScriptAnalysisWorker.ts`. After the merge: - `node scripts/run-typescript.mjs --noEmit` — exit 0. - `npm run test:focused -- <12 files covering the changed boundaries>` — 12 files, 164 passed, 2 skipped. - `npx oxlint` on the two conflicted files — 0 errors; warnings only. - `npx oxfmt --check` on the two conflicted files — formatted. - Not run: the full suite. Earlier validation (before the merge): Each entry lists a command that ran and its observed result. Run in the worktree on Node v22.23.1 (within `engines`). - `npm run build:cached` — exit 0 (rebuilt several times, including from base source for the CLI and stdio-MCP base runs; final `dist` is from the fixed tree). - `npx vitest run src/artifacts/pyinstaller/MarshalSubset.test.ts src/domain/analysisView/environmentStateView.test.ts src/adb/AdbVersionProbe.test.ts tests/boundary/providers/adb/adbCommandFinalization.test.ts tests/boundary/filesystem/analysisSnapshotInput.test.ts tests/process-global/apktoolEnvironment.test.ts tests/boundary/mcp/functionComparisonReferenceFactsMcp.test.ts tests/boundary/cli/electronCli.test.ts tests/boundary/javascript/javascriptSourceAnalysisWorker.test.ts tests/acceptance/tools/nativeFunctionMatching.test.ts --maxWorkers 2` — 10 files, 115 tests passed. - `REA_PWNTOOLS_PYTHON=<local pwntools 4.15.0 venv>/bin/python npx vitest run tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts` — 35 passed, 1 skipped (unsupported-host case). - `npx vitest run tests/boundary/binaryDiagnostics/pwntoolsLayoutProvider.test.ts` (no runtime configured) — 34 passed, 2 skipped. - Base-reproduction runs (each failed on base, as listed above) — 10 of 10 failed on base. - `npm run typecheck` — exit 0. - `npx oxlint <27 changed files>` — exit 0, 0 errors; pre-existing warnings plus one new `max-params` warning in `src/application/JsonFiles.ts`. - `npx oxfmt --check <27 changed files>` — exit 0. - Commit pre-commit hook (`lint-staged`) — exit 0. - Manual CLI spot checks with the built runtime: `list-adb-devices --json` (unrecognized launcher) and `match-native-functions` with malformed `left` both returned the expected `details` shown above. Not run: the full test suite, `npm run check:pr`, and any real-provider workflow. ## Compatibility, safety, and release - Breaking changes or migration steps: none to tool schemas or Evidence shape. Caller-visible error changes: - `compare_functions` wrong-kind Evidence: `invalid_request` with per-side issues (previously `evidence_integrity_mismatch`). - JavaScript worker I/O failure: `execution_failure` (previously `unreadable_output`). - PYZ with negative counts or lengths: left opaque, so sibling inventory is delivered (previously the whole artifact failed with `truncated`/`limit`). - Electron target-list Evidence: now includes environment and limitation fields. - Capability refusals for ADB and Apktool: now include `details.diagnostics`. - Environment-state list views: digit-string totals now count as counters. Internal signatures changed: `inspectAdbClient` (adds `operation`), `readAnalysisSnapshot` (optional trailing `operation`), `readJsonObjectMembersFile` (adds `operation`). - Real Hopper/Ghidra, browser, or OS coverage: not run. Linux x64 only for the pwntools gated case. - Package or release metadata impact: none. - Security, privacy, process, or containment review: no new process launches, target access, or network access. The JavaScript worker I/O diagnostic carries the source path and the worker's I/O message, text that was previously embedded in the output error message. Other redaction is unchanged. ## Author readiness <!-- The human owner completes these declarations before requesting review. The PR author is the owner by default. A different owner must explicitly accept ownership on this PR. AI agents must leave these declarations to a human to dictate to them or there could be catastrophic consequences for many users of REA. Draft PRs may leave them unchecked. These declarations record initial readiness when opening the PR for review; later pushes do not require a new human sign-off. Keep the description and validation evidence current as the work changes. See CONTRIBUTING.md#pull-request-ownership-and-readiness. --> Human owner: @agorevski <!-- @GitHub-handle --> - [x] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge <!-- Draft PRs may leave pending items unchecked. Resolve material scope and authority questions before integration. --> - [x] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:45:52 +00:00
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#7165
No description provided.