[GH-ISSUE #6468] [Bug] doctor recommends an evidence-reply allowance for oversized Ghidra installation metadata #3878

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

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

Before submitting

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

Area

Provider or capability discovery

Observed behavior

node scripts/rea.mjs doctor --provider ghidra --format json rejects an oversized selected Ghidra/application.properties with resource_constraint, then recommends increasing a worker/evidence-reply file-size allowance. The refusal concerns a fixed installation-metadata read budget, so that recovery instruction cannot admit the file.

The size refusal itself is intentional. The incorrect recovery sentence reproduced in both runs (2/2).

Reproduction

From a fresh checkout of morluto/rea:

git checkout 9eb829aca34be36ff112826337996f6139f82eff
npm ci && npm run build:cached
export WORK="$(mktemp -d)"
node --input-type=module <<'JS'
import { mkdir, writeFile, chmod } from 'node:fs/promises';
import { join } from 'node:path';
const root = process.env.WORK;
const install = join(root, 'ghidra');
await mkdir(join(root, 'home'), { recursive: true });
const properties = join(install, 'Ghidra/application.properties');
await mkdir(join(install, 'Ghidra'), { recursive: true });
await writeFile(properties,
  'application.version=12.1.4\napplication.release.name=Ghidra\napplication.java.min=21\n' +
  '#' + 'x'.repeat(1024 * 1024) + '\n');
for (const relative of [
  'support/analyzeHeadless',
  'Ghidra/Features/Decompiler/os/mac_arm_64/decompile',
]) {
  const file = join(install, relative);
  await mkdir(join(file, '..'), { recursive: true });
  await writeFile(file, '#!/bin/sh\nexit 0\n');
  await chmod(file, 0o700);
}
JS
HOME="$WORK/home" GHIDRA_INSTALL_DIR="$WORK/ghidra" \
  JAVA_HOME="$WORK/missing-jdk" REA_LOG_LEVEL=silent \
  node scripts/rea.mjs doctor --provider ghidra --format json

Run without other inherited REA/Ghidra/Java configuration overrides. The fixture is for macOS arm64. Its executables are placeholders; the oversized-properties refusal occurs before Java probing or engine execution. The properties file is 1,048,661 bytes. Exit status is 1.

The CLI runs and equivalent fixture construction were executed against the prepared baseline checkout. The dependency-install/build commands above describe preparation for a fresh checkout; they were not rerun during reproduction.

Expected behavior

Name the installation-properties admission budget and give recovery appropriate to that input. Do not advise changing an evidence-reply write allowance. Preserve the size refusal and its measured limits.

The installation guide defines the 1 MiB cap as REA metadata policy, rather than a Java Properties format limit. The fixed-ceiling recovery rule requires the failure to name the limit, effective value, absence of a runtime override and controls that do not raise it.

Impact and scope

P3: misleading recovery wording for oversized local installation metadata. The error still identifies the selected file, maximum size and actual size, and correctly marks the failure nonretryable. No change to the intentional admission refusal is requested.

As an observed control, replacing the oversized file with only the version/release/Java-minimum entries produced a passed installation check. Removing the file produced a failed installation check. Both controls returned scoped reports; their overall exit status remained 1 because the selected private JDK was deliberately absent. These controls do not establish real-provider readiness. Natural occurrence rates are unknown.

REA version

6.7.0 (source 9eb829aca3)

Runtime and platform

Node.js v26.12.1; macOS 27.0.1; arm64. No real Ghidra release or JVM was used.

Target and artifact context

A synthetic local Ghidra installation tree with an oversized regular Ghidra/application.properties file. No binary target was opened.

Interface

CLI

Earliest failure stage

Setup or provider admission

Relevant output or evidence

Observed from the public doctor command, twice, with empty stderr:

{
  "code": "resource_constraint",
  "retryable": false,
  "remediation": {
    "action": "Review the reported worker file-size limits and write failure. Retry with a sufficient file-size allowance for the evidence reply; REA retains tighter inherited limits."
  }
}

The same replies identify details.resource as file-size, details.diagnostics.stage as installation_properties, and details.reported_limits as {"maximum_bytes":1048576,"observed_bytes":"1048661"}. Their messages identify the fixture's Ghidra/application.properties as the selected oversized file.

Typed outcome or recovery expected

Retain resource_constraint, retryable: false and the file/limit facts. Explain that the affected ceiling is the installation-metadata read budget and that an evidence-reply allowance does not raise it. No new error type or report-envelope shape is required by this report.

Analysis or suspected cause

Source-derived: the properties reader enforces MAX_GHIDRA_INSTALLATION_PROPERTIES_BYTES. Its capacity-error mapping supplies file-size and measured limits without specific recovery or fixed-allowance metadata. The shared presentation fallback therefore selects worker write/evidence-reply advice.

Additional context

#4672 addressed the earlier unbounded installation-properties read and introduced bounded admission. This report concerns recovery wording when that admission refuses a file. No real-engine analysis, Linux/Windows behavior, or agent recovery behavior was tested. No last-known-good version was established.

Originally created by @coygeek on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/6468 ### 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 Provider or capability discovery ### Observed behavior `node scripts/rea.mjs doctor --provider ghidra --format json` rejects an oversized selected `Ghidra/application.properties` with `resource_constraint`, then recommends increasing a worker/evidence-reply file-size allowance. The refusal concerns a fixed installation-metadata read budget, so that recovery instruction cannot admit the file. The size refusal itself is intentional. The incorrect recovery sentence reproduced in both runs (2/2). ### Reproduction From a fresh checkout of `morluto/rea`: ```sh git checkout 9eb829aca34be36ff112826337996f6139f82eff npm ci && npm run build:cached export WORK="$(mktemp -d)" node --input-type=module <<'JS' import { mkdir, writeFile, chmod } from 'node:fs/promises'; import { join } from 'node:path'; const root = process.env.WORK; const install = join(root, 'ghidra'); await mkdir(join(root, 'home'), { recursive: true }); const properties = join(install, 'Ghidra/application.properties'); await mkdir(join(install, 'Ghidra'), { recursive: true }); await writeFile(properties, 'application.version=12.1.4\napplication.release.name=Ghidra\napplication.java.min=21\n' + '#' + 'x'.repeat(1024 * 1024) + '\n'); for (const relative of [ 'support/analyzeHeadless', 'Ghidra/Features/Decompiler/os/mac_arm_64/decompile', ]) { const file = join(install, relative); await mkdir(join(file, '..'), { recursive: true }); await writeFile(file, '#!/bin/sh\nexit 0\n'); await chmod(file, 0o700); } JS HOME="$WORK/home" GHIDRA_INSTALL_DIR="$WORK/ghidra" \ JAVA_HOME="$WORK/missing-jdk" REA_LOG_LEVEL=silent \ node scripts/rea.mjs doctor --provider ghidra --format json ``` Run without other inherited REA/Ghidra/Java configuration overrides. The fixture is for macOS arm64. Its executables are placeholders; the oversized-properties refusal occurs before Java probing or engine execution. The properties file is 1,048,661 bytes. Exit status is 1. The CLI runs and equivalent fixture construction were executed against the prepared baseline checkout. The dependency-install/build commands above describe preparation for a fresh checkout; they were not rerun during reproduction. ### Expected behavior Name the installation-properties admission budget and give recovery appropriate to that input. Do not advise changing an evidence-reply write allowance. Preserve the size refusal and its measured limits. The [installation guide](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/docs/installation.md#L1016) defines the 1 MiB cap as REA metadata policy, rather than a Java Properties format limit. The [fixed-ceiling recovery rule](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/docs/design/limits-and-recovery.md#L56) requires the failure to name the limit, effective value, absence of a runtime override and controls that do not raise it. ### Impact and scope P3: misleading recovery wording for oversized local installation metadata. The error still identifies the selected file, maximum size and actual size, and correctly marks the failure nonretryable. No change to the intentional admission refusal is requested. As an observed control, replacing the oversized file with only the version/release/Java-minimum entries produced a passed installation check. Removing the file produced a failed installation check. Both controls returned scoped reports; their overall exit status remained 1 because the selected private JDK was deliberately absent. These controls do not establish real-provider readiness. Natural occurrence rates are unknown. ### REA version 6.7.0 (source 9eb829aca34be36ff112826337996f6139f82eff) ### Runtime and platform Node.js v26.12.1; macOS 27.0.1; arm64. No real Ghidra release or JVM was used. ### Target and artifact context A synthetic local Ghidra installation tree with an oversized regular `Ghidra/application.properties` file. No binary target was opened. ### Interface CLI ### Earliest failure stage Setup or provider admission ### Relevant output or evidence Observed from the public doctor command, twice, with empty stderr: ```json { "code": "resource_constraint", "retryable": false, "remediation": { "action": "Review the reported worker file-size limits and write failure. Retry with a sufficient file-size allowance for the evidence reply; REA retains tighter inherited limits." } } ``` The same replies identify `details.resource` as `file-size`, `details.diagnostics.stage` as `installation_properties`, and `details.reported_limits` as `{"maximum_bytes":1048576,"observed_bytes":"1048661"}`. Their messages identify the fixture's `Ghidra/application.properties` as the selected oversized file. ### Typed outcome or recovery expected Retain `resource_constraint`, `retryable: false` and the file/limit facts. Explain that the affected ceiling is the installation-metadata read budget and that an evidence-reply allowance does not raise it. No new error type or report-envelope shape is required by this report. ### Analysis or suspected cause Source-derived: the [properties reader](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/ghidra/GhidraInstallationProperties.ts#L41) enforces `MAX_GHIDRA_INSTALLATION_PROPERTIES_BYTES`. Its [capacity-error mapping](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/ghidra/GhidraFileArtifacts.ts#L66) supplies `file-size` and measured limits without specific recovery or fixed-allowance metadata. The [shared presentation fallback](https://github.com/morluto/rea/blob/9eb829aca34be36ff112826337996f6139f82eff/src/domain/analysisErrorPresentation.ts#L85) therefore selects worker write/evidence-reply advice. ### Additional context [#4672](https://github.com/morluto/rea/issues/4672) addressed the earlier unbounded installation-properties read and introduced bounded admission. This report concerns recovery wording when that admission refuses a file. No real-engine analysis, Linux/Windows behavior, or agent recovery behavior was tested. No last-known-good version was established.
Author
Owner

@coygeek commented on GitHub (Oct 24, 2026):

Checked the reported fix on main at d87e73f2db.

Oversized Ghidra properties retain the resource_constraint/file-size failure, measured limits and installation_properties diagnostics, but now attach fixedProducerInputAllowance for the specifically named installation-properties read allowance. The CLI regression checks doctor rejection before Java. Neither was run.

Implementation: GhidraInstallationProperties.ts.

The relevant regression checks in ghidraInstallationProperties.test.ts, ghidraInstallationProperties.test.ts passed in the focused test run on this revision. This closure is based on the current source and those checks; provider fixtures do not establish a real-engine run. Closing as completed on main.

<!-- gh-comment-id:6380725556 --> @coygeek commented on GitHub (Oct 24, 2026): Checked the reported fix on `main` at d87e73f2db50be72d33a4b3c7199af35518b441c. Oversized Ghidra properties retain the resource_constraint/file-size failure, measured limits and installation_properties diagnostics, but now attach fixedProducerInputAllowance for the specifically named installation-properties read allowance. The CLI regression checks doctor rejection before Java. Neither was run. Implementation: [GhidraInstallationProperties.ts](https://github.com/morluto/rea/blob/d87e73f2db50be72d33a4b3c7199af35518b441c/src/ghidra/GhidraInstallationProperties.ts#L92). The relevant regression checks in [ghidraInstallationProperties.test.ts](https://github.com/morluto/rea/blob/d87e73f2db50be72d33a4b3c7199af35518b441c/tests/boundary/filesystem/ghidraInstallationProperties.test.ts), [ghidraInstallationProperties.test.ts](https://github.com/morluto/rea/blob/d87e73f2db50be72d33a4b3c7199af35518b441c/tests/boundary/cli/ghidraInstallationProperties.test.ts) passed in the focused test run on this revision. This closure is based on the current source and those checks; provider fixtures do not establish a real-engine run. Closing as completed on main.
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#3878
No description provided.