mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 14:05:49 +00:00
docs: remove tracked planning and architecture records (#12856)
This commit is contained in:
1 parent
42b36e200b
commit
a1dec2d2d5
362 files changed
+119
-18521
No files matched your search
@@ -0,0 +1,419 @@
|
||||
# Analysis settings, limits, and recovery
|
||||
|
||||
Use this guide to inspect and change REA analysis budgets, and to recover from
|
||||
a resource limit. See the [MCP contracts](mcp-contracts.md#editable-analysis-settings),
|
||||
the [limit inventory](rea-limit-inventory.md), and the
|
||||
[verification report](../verification/runtime-analysis-settings.md).
|
||||
|
||||
## Runtime settings through MCP
|
||||
|
||||
`inspect_analysis_settings` lists the curated settings, their current and launch
|
||||
values, source, bounds, application point and relevant operation names. Filters
|
||||
by exact setting IDs, provider or operation intersect. Inspection marks active
|
||||
worker values as `not_observed` and distinguishes known server limits from
|
||||
unknown client deadlines and receive buffers.
|
||||
|
||||
`update_analysis_settings` accepts an atomic `changes` array. Each entry names
|
||||
an exact `setting` and either `action: "set"` with a schema-validated `value`, or
|
||||
`action: "reset"`. Reset restores the launch value. `expected_revision` is an
|
||||
optional compare-and-set guard; conflicts and duplicate keys change nothing.
|
||||
An unchanged write does not advance the revision.
|
||||
|
||||
The revision tracks override state, not only effective numeric values. Setting
|
||||
an explicit override equal to the launch value still changes its source to
|
||||
`runtime` and advances the revision. Reset removes that override, even if the
|
||||
effective number stays the same. Validation, revision checks, and duplicate-key
|
||||
checks all happen before publishing the replacement snapshot; a rejected batch
|
||||
cannot partially apply. Clients coordinating writes can supply
|
||||
`expected_revision`; without it, valid updates apply to the current state.
|
||||
|
||||
### Precedence and lifetime
|
||||
|
||||
Where a setting supports an explicit per-call argument, precedence is:
|
||||
|
||||
1. The caller's explicit argument.
|
||||
2. The accepted operation's runtime override.
|
||||
3. Valid launch configuration, where that setting has an environment seed.
|
||||
4. The built-in default when launch configuration is absent.
|
||||
|
||||
An invalid launch value does not fall through to the built-in default. Preserve
|
||||
omitted caller arguments in Evidence: resolving an internal default must not
|
||||
rewrite the request as though the caller supplied it. `null` is the explicit
|
||||
unbounded value for `ghidra.decompile_timeout_seconds`; it is not a substitute
|
||||
for an unknown or omitted value elsewhere.
|
||||
|
||||
A write does not extend active work, relaunch a provider, clear retained
|
||||
cleanup, or invalidate successful Evidence.
|
||||
|
||||
Expanded ASAR listing admission defaults to 64 MiB and has its own launch seed,
|
||||
`REA_ASAR_MAX_LISTING_BYTES`. Raising `asar.max_header_bytes` alone cannot admit
|
||||
expanded paths and entries that exceed this separate budget. The listing bound
|
||||
uses exact safe-integer byte accounting; the host heap and transport constraints
|
||||
remain independent. A lower runtime value is enforced on the next listing even
|
||||
when the archive header was already examined.
|
||||
|
||||
Ghidra value-flow controls default to 3,000 operations, 64 inputs per operation,
|
||||
and 12,000 edges. They accept positive Java integer counts and use the respective
|
||||
`REA_GHIDRA_VALUE_FLOW_MAX_OPERATIONS`,
|
||||
`REA_GHIDRA_VALUE_FLOW_MAX_INPUTS_PER_OPERATION`, and
|
||||
`REA_GHIDRA_VALUE_FLOW_MAX_EDGES` launch seeds. Truncation names the exhausted
|
||||
control. Completed Evidence remains accessible, but a new function dossier is
|
||||
observed with the accepted controls instead of replaying an earlier projection.
|
||||
|
||||
The native decompiler payload control is separate from those projections and
|
||||
from decompile time. Its launch seed is
|
||||
`REA_GHIDRA_DECOMPILE_MAX_PAYLOAD_MIB`. Accepted explicit values are 1..2047 MiB:
|
||||
the supported Ghidra implementation shifts that value into a signed integer byte
|
||||
capacity. Omission or runtime `null` keeps the provider's own default; REA does
|
||||
not guess that default from a different provider version. Changing payload
|
||||
options takes effect before the next native decompile.
|
||||
|
||||
### Per-call resource policies and selection
|
||||
|
||||
An agent can also use controls declared directly by an operation. These do not
|
||||
require a runtime setter or restart. Keep omitted fields omitted in Evidence;
|
||||
report the resolved policy separately where needed. See the owning guides for
|
||||
[Apktool string pages](../guides/android/apktool-resource-analysis.md),
|
||||
[source maps](../guides/web/web-source-location.md),
|
||||
[historical captures](../guides/web/web-network-captures.md),
|
||||
[JavaScript precision](../guides/javascript/javascript-application-graph.md),
|
||||
[managed inspection](../guides/managed/managed-code-analysis.md), and
|
||||
[Frida capture](../guides/runtime/frida-instrumentation.md).
|
||||
|
||||
The same accepted policy must reach acquisition, parsing, worker requests,
|
||||
serialization, cached-result admission and generated consumers where those
|
||||
stages exist. Desktop state views and emitted AgentEnv Python share one policy;
|
||||
delivery pagination never substitutes for producer selection. Capture limits
|
||||
must be selected before an experiment: another experiment cannot recover bytes
|
||||
that were dropped from a previous live observation.
|
||||
|
||||
Overrides belong to one REA runtime, survive target close/open, and disappear
|
||||
when REA exits. Connections sharing that runtime share its overrides. No files,
|
||||
ambient environment, registrations or upstream software are edited. Overrides
|
||||
are runtime-wide, not scoped to a target or an individual connection.
|
||||
|
||||
### Failure and retry
|
||||
|
||||
An ASAR admission error supplies `details.limit` with the exact setting,
|
||||
effective value, units, bounds, scope, application point, `update_mode`,
|
||||
`pending_restart` and, when known, required bytes and value source. The agent can immediately call:
|
||||
|
||||
```json
|
||||
{
|
||||
"changes": [
|
||||
{ "setting": "asar.max_header_bytes", "action": "set", "value": 33554432 }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Then retry the same full-archive request once work and cleanup have settled.
|
||||
No preliminary inspection or source subset is required. The setter does not
|
||||
retry automatically. If an explicit per-call value caused the failure, correct
|
||||
that argument; raising a runtime default cannot override it.
|
||||
|
||||
The resource owner constructs `details.limit` from the registry plus the budget
|
||||
it actually enforced. Metadata includes `agent_editable: true`,
|
||||
`scope: "rea-runtime"`, `update_mode`, and `pending_restart`. `update_mode`
|
||||
is `runtime` when `update_analysis_settings` can change the active value,
|
||||
`restart` when this process keeps the value it started with, and `parameter`
|
||||
when the budget is adjustable through a per-call argument. Its `source` records
|
||||
whether the reported value came from a request or a default. An explicit `analysis_timeout_ms`,
|
||||
`max_heap_mb`, or `command_timeout_ms`, plus artifact reader limits and
|
||||
web-network capture budgets, use `parameter`. `pending_restart` is false when
|
||||
that reported value is the one this process is using. Optional
|
||||
`required_value`, `source`, and `parameter` fields are supplied only where known
|
||||
or applicable. Do not infer a source because a value happens to equal a default.
|
||||
Error copying, attribution, redaction, and delivery must preserve these facts.
|
||||
Human-readable remediation explains the same failure; clients should not need
|
||||
to parse that sentence to identify an editable setting.
|
||||
|
||||
A deadline controlled by something other than a registered setting reports
|
||||
`details.limit` with `control_kind` instead of `setting`.
|
||||
`control_kind: "parameter"` names the per-call contract field in `parameter`
|
||||
(`native_command_timeout_ms`, `native_ui_deadline_ms`,
|
||||
`pwntools_timeout_ms`) and applies on the next call. Services and their
|
||||
remediation text name only that field. A CLI command adds `cli_flag`, the
|
||||
option that sets the field on that command, from its own field-to-flag
|
||||
binding; MCP results do not carry it.
|
||||
A completed or partial result can record the same reference, for example a
|
||||
`limit` in a web bundle `unknowns` entry for a script that reached its
|
||||
`analysis_timeout_ms` deadline. That reference is part of the result and its
|
||||
Evidence identity, so the CLI never adds to it. Instead, the CLI renders the
|
||||
flags in its own `--full-output` envelope as `meta.cli_controls`, a map from
|
||||
each recorded contract field to the option that sets it on that command. The
|
||||
bare result is the record itself and gains no CLI field.
|
||||
`control_kind: "environment"` names the `environment` variable REA reads when
|
||||
it starts (`REA_SWIFTC_COMPILE_TIMEOUT_MS`): `applies_at` is `next_startup`,
|
||||
or `next_invocation` for a one-shot invocation. Both carry `effective_value`,
|
||||
`unit`, `minimum`, `maximum` and `default_value`. `update_analysis_settings`
|
||||
changes neither. A limit without `control_kind` is a registered setting.
|
||||
|
||||
This output is breaking. Results and errors no longer carry the previous
|
||||
restart boolean or a single effect field, and there is no compatibility alias.
|
||||
Read `update_mode` to see whether the setter can change the active value, and
|
||||
`pending_restart` to see whether a configured value is waiting. A configuration
|
||||
error for a Windows ChangeTime setting carries `update_mode` on
|
||||
`details.settings`. Its rejected value does not establish an accepted pending
|
||||
configuration, so `pending_restart` is omitted. The removed field names
|
||||
are listed in the changelog.
|
||||
|
||||
An inspected setting whose launch value is invalid and which has no runtime
|
||||
override likewise omits `pending_restart`: it has no accepted configured value
|
||||
to classify. Setting a valid runtime override reports `pending_restart: false`;
|
||||
resetting it restores the invalid launch state and the omission.
|
||||
|
||||
`scope` and `applies_at` describe a continuing caller, such as an MCP
|
||||
connection. A one-shot invocation, such as a CLI command, has released its
|
||||
provider session and exited its runtime before its caller reads the failure,
|
||||
so its adapter projects with an explicit `"invocation"` caller lifetime.
|
||||
`details.limit` then keeps every other field and reports
|
||||
`scope: "rea-invocation"`, `applies_at: "next_invocation"` and the launch
|
||||
`environment` seed when one exists. `agent_editable: true` still holds, because
|
||||
the caller chooses that environment value or per-call `parameter` for the new
|
||||
invocation; `update_mode: "runtime"` and `pending_restart: false` mean the
|
||||
reported value is active in this process. `update_mode: "restart"` means
|
||||
`update_analysis_settings` does not change it. `update_mode: "parameter"` means
|
||||
the budget is adjustable through a per-call argument; `source` identifies where
|
||||
the reported value came from. A producer keeps guidance that holds only while its caller retains the
|
||||
session, such as "the Ghidra session remains usable" or a same-session runtime
|
||||
update, in `continuingCallerGuidance`; the shared presentation adds it only for
|
||||
a continuing caller. The producer's own message and remediation must stay true
|
||||
after the session is released. A composed error records each embedded child
|
||||
failure through `childFailureDiagnostics`, which snapshots it at composition
|
||||
for both lifetimes when they differ, so cleanup history keeps its state and
|
||||
the final projection selects the caller's form. Failures retained inside
|
||||
Evidence keep the continuing form, so CLI and MCP Evidence stay identical.
|
||||
|
||||
Cache policy is part of enforcement. Successful reusable analysis can survive
|
||||
a budget update. Transient Ghidra decompile failures remain uncached so a raised
|
||||
deadline can recover on the same Program. Admission checks still apply to reused
|
||||
data: lowering an ASAR limit must reject a cached oversized header. Neither
|
||||
raising a limit nor clearing a transient analysis failure authorizes skipping
|
||||
cleanup or changing the identity of the provider session.
|
||||
|
||||
### Invalid launch configuration
|
||||
|
||||
Launch validation has two relevant boundaries. Settings validated by global
|
||||
configuration parsing can prevent REA from starting; an MCP setter cannot
|
||||
repair a server that is not running. Correct the launch environment or
|
||||
registration, use `rea doctor` for its configuration checks, and start REA again.
|
||||
|
||||
Provider-local validation can leave MCP available. For example, an invalid
|
||||
`REA_JADX_OPERATION_TIMEOUT_MS` is inspectable with `source: "invalid"`, a
|
||||
`configuration_error`, and omitted `value` and `launch_value`. A valid runtime
|
||||
override repairs the effective JADX timeout without editing that launch seed.
|
||||
Inspection then reports the runtime value while retaining the launch error.
|
||||
Reset exposes the invalid launch state again; it does not repair or replace it
|
||||
with the built-in default. Provider availability and execution must resolve the
|
||||
same effective setting so readiness changes along with repair and reset.
|
||||
`REA_NATIVE_MATCHING_REPRESENTATION_BYTES` is validated the same way, by
|
||||
`match_native_functions` alone.
|
||||
|
||||
## Keep a fixed ceiling honest
|
||||
|
||||
A fixed ceiling is the exception. Keep one only for a stated format, protocol,
|
||||
or representation reason.
|
||||
|
||||
Inspection's separate
|
||||
[constraints](https://github.com/morluto/rea/blob/main/src/server/analysisSettingsConstraints.ts)
|
||||
describe operator-owned, external, and fixed controls. REA can report its
|
||||
configured response budget and parent heap limit; client deadlines and receive
|
||||
buffers remain explicitly unknown. These are not entries accepted by the
|
||||
runtime setter. Raising a worker heap request cannot raise the parent heap,
|
||||
and raising a provider deadline cannot make the client wait longer.
|
||||
|
||||
The failure names the limit and the effective value. Say this release has no
|
||||
runtime override, and name what does not raise it. Do not invent a setting.
|
||||
|
||||
JSON values stop at `MAX_JSON_DEPTH` (1000) in
|
||||
[`jsonValue.ts`](https://github.com/morluto/rea/blob/main/src/domain/jsonValue.ts):
|
||||
"JSON value exceeds maximum nesting depth of 1000. This release has no runtime
|
||||
override."
|
||||
|
||||
## Typed refusals
|
||||
|
||||
A producer that refuses a request types the refusal instead of leaving
|
||||
recovery to the resource kind. The domain owner is
|
||||
[`analysisRefusal.ts`](https://github.com/morluto/rea/blob/main/src/domain/analysisRefusal.ts).
|
||||
It has three variants. Each one projects under `details.refusal` with the
|
||||
`operation` the error is attributed to:
|
||||
|
||||
| Variant | Producer fact | Projected fields |
|
||||
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
||||
| `fixed_ceiling` | `fixedAllowanceOptions(name, kind, { limit, unit, narrowing })`, or an artifact reader's `artifactFixedLimitFailure(allowance, outcome)` | `allowance`, `allowance_kind`, `limit`, `unit`, `narrowing` |
|
||||
| `adjustable_budget` | an `AnalysisSettingLimit` bound as `limit` | `control`, `setting`, `effective_value`, `unit`, `range`, optional `required_value` |
|
||||
| `ambiguous_selector` | `AnalysisInputError` option `ambiguousSelector: { field, candidates }` | `field`, `candidates` |
|
||||
|
||||
Presentation is total over these variants. Authored remediation still wins.
|
||||
Without it, the variant names the recovery: fixed ceilings and their narrowing
|
||||
step, the budget's control and range for the caller's lifetime, or the selector
|
||||
field and its candidates. A resource refusal never falls back to text about
|
||||
worker limits, the MCP transport, or doctor. An ambiguous selector conforms to
|
||||
the input contract, so it does not ask the caller to inspect the schema.
|
||||
|
||||
A measured exhaustion or occupied admission is not a refusal. It declares
|
||||
`measuredExhaustion: true` and keeps the resource kind's recovery. The
|
||||
`rea/typed-resource-refusal` lint rule rejects a new
|
||||
`AnalysisResourceConstraintError` that names none of these. Older untyped
|
||||
constructions are counted in
|
||||
`scripts/lint/rules/typed-resource-refusal-baseline.json`, and those counts may
|
||||
only shrink.
|
||||
|
||||
## Recovery text
|
||||
|
||||
The string the caller sees includes:
|
||||
|
||||
- the limit or setting name
|
||||
- the effective value and unit
|
||||
- the source when known (`default`, `setting`, `runtime`, or `request`)
|
||||
- the default, the maximum, and the floor when the setting has one
|
||||
- the next action, including where to set it ("in the environment that starts REA")
|
||||
- whether a restart is required
|
||||
- what the change does not raise
|
||||
|
||||
Distinguish an invalid configuration from a valid budget exhausted by work.
|
||||
Preserve the configuration failure and its setting identity; apply the
|
||||
[launch validation boundary](#invalid-launch-configuration) when describing
|
||||
whether live repair is possible.
|
||||
|
||||
## What agents do
|
||||
|
||||
Use `details.limit` for a direct runtime update when it names an editable
|
||||
setting with `scope: "rea-runtime"`. For `scope: "rea-invocation"`, set its
|
||||
`environment` or `parameter` for a new invocation instead.
|
||||
Follow `remediation.action` for per-call, fixed and external controls.
|
||||
Inspect settings only when bounds or application details are missing. Restart only when it says the value is
|
||||
read at startup. A sentence that a control does not raise the limit is not a
|
||||
request to change it.
|
||||
|
||||
- Dropped MCP connection: retry the call once only when it is safe to repeat
|
||||
or known not to have started. If it may already have changed the target, or
|
||||
it fails again, tell the user and ask them to restart the MCP client. Do not
|
||||
start with `rea doctor`
|
||||
([#6353](https://github.com/morluto/rea/pull/6353)).
|
||||
- REA could not start its connection: retry once. If it fails again, tell the
|
||||
user and ask them to restart the MCP client, then run `rea doctor`. Do not
|
||||
retry a startup that returns the same unchanged result: tell the user REA
|
||||
could not start, ask them to restart the MCP client, then run `rea doctor`.
|
||||
- Unexpected process-command failure: do not repeat the command. Tell the user
|
||||
the reported reason and ask them to check the scenario or capture files it
|
||||
read; if they are valid, report the failure with its diagnostics. Doctor does
|
||||
not check process commands.
|
||||
- `cleanup_incomplete`: the operation is not retryable. Retry that exact
|
||||
cleanup owner, named in `details.resources`, and wait until it confirms
|
||||
release before admitting new work on those resources
|
||||
([#6357](https://github.com/morluto/rea/pull/6357)).
|
||||
- `resource_constraint` for capacity, when `retryable` is true: wait for the
|
||||
active admission to finish, then retry within the reported limits. Do not
|
||||
restart REA to free the slot.
|
||||
- `configuration_invalid`: when MCP remains available and the failure belongs
|
||||
to a curated provider-local setting, inspect and set a valid runtime override.
|
||||
Otherwise correct the named setting in the environment that starts REA, then
|
||||
start REA again. Run `rea doctor` for the
|
||||
`runtime-configuration:` check. Re-run `rea setup` for that client when the
|
||||
setting is on the registration allowlist, then reconnect so the new process
|
||||
sees it.
|
||||
- `invalid_request`: follow the specific recovery and reported issue. Inspect
|
||||
the schema or CLI help when the input violates the contract or the response
|
||||
asks for `inspect_input_contract`. A valid selector can instead require a
|
||||
different choice, such as selecting a reported address; an inventory miss
|
||||
does not establish that the target lacks the item. Do not repeat the
|
||||
unchanged call when the response says it cannot succeed unchanged.
|
||||
|
||||
A restart is required to adopt a changed launch environment or registration.
|
||||
The curated runtime settings above require no REA restart. It is not the first step for a transient
|
||||
MCP drop, a capacity wait, or retained cleanup.
|
||||
|
||||
## Adding a runtime setting
|
||||
|
||||
1. Identify the enforcing owner and the real resource constraint. A hardcoded
|
||||
limit becomes an `REA_` runtime setting with a default, a floor, and a
|
||||
maximum. Its errors name the setting, the effective value, the source, and
|
||||
the range. A fixed ceiling is the exception and needs a stated format,
|
||||
protocol, or representation reason; that error names the limit and the
|
||||
effective value. A registry entry must not advertise authority REA lacks.
|
||||
2. Define the value type and named numeric bounds with the domain owner. Add the
|
||||
ID and metadata to `analysisSettings.ts` and `analysisSettingDefinitions.ts`.
|
||||
Reuse those bounds in runtime validation, launch parsing, and error metadata.
|
||||
Choose the application point and provider/operation associations from actual
|
||||
consumers; a shared control need not apply to every provider.
|
||||
3. If there is a launch seed, add its parser and appropriate configuration/doctor
|
||||
validation. Decide whether an invalid value blocks the runtime or only the
|
||||
provider. Add it to setup's `SELECTED_REGISTRATION_SETTINGS` when it should
|
||||
be forwarded; runtime editability does not automatically propagate it.
|
||||
4. Thread the shared reader through every applicable composition path. Resolve
|
||||
the effective value within the accepted operation, honor explicit arguments,
|
||||
and preserve their omission in Evidence. Keep availability checks consistent
|
||||
with execution. A worker heap request must not be described as a measured
|
||||
process memory limit.
|
||||
5. Enforce the value at its resource boundary and construct structured limit
|
||||
facts there. Preserve those facts through shared error projection and copies.
|
||||
Check cache reuse, lowered admission, transient failures, and retained cleanup
|
||||
against the same ownership rules.
|
||||
6. Update the public contracts and affected guides, then regenerate catalogs
|
||||
and packaged skill metadata using the repository commands. Keep externally
|
||||
owned and fixed controls in the separate inspection constraints, not in the
|
||||
editable registry. Validate both store semantics and a public recovery path.
|
||||
|
||||
## Tests and verification
|
||||
|
||||
Cover the unset default, accepted overrides, rejected floor/maximum values,
|
||||
and invalid syntax through the owning parser and configuration boundary.
|
||||
[`regexMatchingDeadline.test.ts`](https://github.com/morluto/rea/blob/main/src/config/regexMatchingDeadline.test.ts)
|
||||
is one example. Assert error codes, setting IDs, values, units, provenance,
|
||||
application points, and resulting behavior. Check that adapters deliver the
|
||||
canonical recovery guidance, with independent assertions for its underlying
|
||||
facts. Avoid freezing prose or deriving all expected values from the same
|
||||
registry used by the implementation; either can hide the wrong failure.
|
||||
See [test design](../development/testing.md#test-design-and-pruning) for the assertion policy.
|
||||
|
||||
Runtime checks cover atomic validation, stale writes, reset, runtime isolation,
|
||||
accepted-operation snapshots, and explicit argument precedence. Public MCP
|
||||
acceptance must reject an oversized ASAR, raise admission, and successfully
|
||||
retry the same complete archive on the same connection. Lowering admission must
|
||||
also refuse previously cached headers. The real Ghidra timeout verifier checks
|
||||
recovery after a live update without replacing its session. Also cover invalid
|
||||
provider-local launch configuration, repair/reset availability, default and
|
||||
custom composition paths, and preservation of structured limits through error
|
||||
copies. Gates used to overlap work and updates need bounded acknowledgements
|
||||
and release/join in `finally`.
|
||||
|
||||
The [verification report](../verification/runtime-analysis-settings.md) separates
|
||||
public MCP checks, simulated provider coverage, real Ghidra execution, and
|
||||
measured task costs. It does not establish real-provider behavior for every
|
||||
editable setting or active worker telemetry.
|
||||
|
||||
## Artifact reader admission
|
||||
|
||||
`inspect_artifact` and `extract_artifact` accept `dotnet_bundle`, `node_sea`
|
||||
and `godot` groups in `artifact_limits`. Their controls apply when recognition
|
||||
or inventory encounters that format; supplying
|
||||
a policy does not assert the format is present. Unsupported keys are rejected.
|
||||
Each group follows one domain-owned default policy. See [.NET bundles](../dotnet-bundles.md),
|
||||
[Node SEA](../node-sea.md), [Godot PCK](../godot-pck.md) and
|
||||
[Bun standalone](../bun-standalone.md) for format semantics.
|
||||
|
||||
`artifact_limits.expanded_bytes` selects aggregate plaintext work for ZIP, Bun,
|
||||
SEA and PCK readers, including repeated readable logical occurrences. Omission
|
||||
retains each archive's encoded-size-derived default. The .NET bundle group's
|
||||
own `expanded_bytes` controls its independently enforced bundle expansion.
|
||||
|
||||
Failures preserve `details.reader_limit` with the exact parameter, effective
|
||||
value, units, supported range, required value when known, next-call scope and
|
||||
`can_increase`. `update_mode` is `parameter`: the caller selects the value on
|
||||
the next call, and `update_analysis_settings` does not accept it.
|
||||
`pending_restart` is false. Web-network capture budgets use the same mode.
|
||||
When `can_increase` is true, raise that field and retry the same
|
||||
complete artifact. At the supported maximum, or when the required representation
|
||||
exceeds it, the failure is not retryable by increasing that budget; inspect the
|
||||
declared dimensions and input validity, or explicitly choose a suitable reader.
|
||||
Summary, pagination and
|
||||
selected extraction do not bypass producing admission. Intrinsic format,
|
||||
safe-integer, path validity and runtime representation constraints remain fixed.
|
||||
|
||||
Evidence parameters retain the exact selected object, including omission or
|
||||
`{}`. When an object was selected, inventory and extraction report the resolved
|
||||
`effective_limits`; summaries preserve those facts. These are accepted policies,
|
||||
not process-memory telemetry or a claim that every format reader ran. Complete
|
||||
source identities and graph manifests remain content-addressed independently
|
||||
of delivery selection. No partial extraction is claimed on admission failure.
|
||||
@@ -1757,11 +1757,8 @@ failing owner supports runtime recovery; `inspect_analysis_settings` is optional
|
||||
when those facts are supplied. Updates are atomic, apply to new work, survive
|
||||
target close/open, and vanish when REA exits. Explicit per-call arguments take
|
||||
precedence. Neither tool changes host deadlines or resolves retained cleanup.
|
||||
See [runtime settings and recovery](../design/limits-and-recovery.md#runtime-settings-through-mcp)
|
||||
for the full setting list, reset/revision semantics and ASAR retry example.
|
||||
For implementation ownership, accepted-operation snapshots, provider wiring,
|
||||
and extension guidance, see the
|
||||
[maintainer design](../design/limits-and-recovery.md#ownership-and-data-flow).
|
||||
See [runtime settings and recovery](limits-and-recovery.md#runtime-settings-through-mcp)
|
||||
for inspection, reset and revision semantics and an ASAR retry example.
|
||||
|
||||
Ghidra and Hopper startup updates apply to the next startup attempt without
|
||||
restarting REA. Ghidra decompile timeout updates apply on the existing Program.
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
# REA limit inventory
|
||||
|
||||
Audit for [#9881](https://github.com/morluto/rea/issues/9881). Counts below are
|
||||
from this revision. The inventory includes numeric `REA_` launch limits and
|
||||
the fixed reconnect control generated into the Hopper bridge.
|
||||
`scripts/verify/rea-numeric-limits.mjs` checks recognized TypeScript source
|
||||
reads (tests excluded) against the environment seeds of
|
||||
[`ANALYSIS_SETTINGS`](https://github.com/morluto/rea/blob/main/src/domain/analysisSettingDefinitions.ts) or an
|
||||
exception in [`numericLimitRegistry.ts`](https://github.com/morluto/rea/blob/main/src/domain/numericLimitRegistry.ts)
|
||||
with a reason. Static syntax recognition cannot prove arbitrary dynamic reads
|
||||
or how often a function executes.
|
||||
|
||||
The Hopper demo-dialog timeout is read by `scripts/hopper-demo-x11.py`, and
|
||||
the reconnect control is generated by `src/hopper/BridgeLauncher.ts` for
|
||||
`bridge/hopper_bridge.py`. Their registry entries identify behavioral witness
|
||||
tests. Node lint checks those paths exist but reports their behavior as
|
||||
unverified; it does not execute Python or prove either reader. Run
|
||||
`npm run test:focused -- tests/boundary/providers/hopper/linuxPrivateDisplay.test.ts tests/boundary/providers/hopper/hopperBridgeReconnect.test.ts`
|
||||
to exercise the witnesses. The reconnect witness exercises the bridge consumer
|
||||
with an injected timeout; `npm run test:local -- src/hopper/bridgeBootstrapLimit.test.ts`
|
||||
verifies the separate launcher output. Neither test is run by Node lint. A
|
||||
skipped Python test leaves its behavior unverified.
|
||||
|
||||
`update_mode` is `runtime` when `update_analysis_settings` can change the active
|
||||
value, `restart` when this process keeps the value it started with, and
|
||||
`parameter` when the budget is adjustable through a per-call argument; `source`
|
||||
separately identifies where the reported value came from.
|
||||
`pending_restart` is true only when an accepted configured value is not the one
|
||||
this process is using. A rejected Windows ChangeTime launch value does not
|
||||
establish an accepted configuration, so that failure omits `pending_restart`.
|
||||
The other values reported here are in force, so `pending_restart` is false. Prose that only says to
|
||||
restart REA is marked `prose`. `mcp_server_restart_required` is a
|
||||
server-identity alignment state in `src/process/ServerIdentity.ts`, not a setting field.
|
||||
|
||||
## Runtime analysis settings
|
||||
|
||||
These tables cover the `ANALYSIS_SETTINGS` entries adjustable with
|
||||
`update_analysis_settings`. Each call reads the snapshot
|
||||
accepted for that operation. Launch source is `default` or `setting`; a runtime
|
||||
override is `source: "runtime"`. The structured field is `update_mode: "runtime"` and `pending_restart: false`.
|
||||
`applies_at` is the finer point
|
||||
(`next_operation`, `next_worker`, or `next_startup`).
|
||||
|
||||
| Setting | Environment seed | Owner | Default | Floor | Maximum | Read |
|
||||
| -------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------- | ----------------------------------------- | ----: | -------------------------------------: | --------------------- |
|
||||
| `asar.max_header_bytes` | `REA_ASAR_MAX_HEADER_BYTES` | `src/domain/analysisResourceLimits.ts` | 16777216 | 1 | 268435456 | per operation |
|
||||
| `asar.max_listing_bytes` | `REA_ASAR_MAX_LISTING_BYTES` | `src/domain/analysisResourceLimits.ts` | 67108864 | 1 | `Number.MAX_SAFE_INTEGER` | per operation |
|
||||
| `ghidra.value_flow_max_operations` | `REA_GHIDRA_VALUE_FLOW_MAX_OPERATIONS` | `src/domain/analysisResourceLimits.ts` | 3000 | 1 | 2147483647 | per operation |
|
||||
| `ghidra.value_flow_max_inputs_per_operation` | `REA_GHIDRA_VALUE_FLOW_MAX_INPUTS_PER_OPERATION` | `src/domain/analysisResourceLimits.ts` | 64 | 1 | 2147483647 | per operation |
|
||||
| `ghidra.value_flow_max_edges` | `REA_GHIDRA_VALUE_FLOW_MAX_EDGES` | `src/domain/analysisResourceLimits.ts` | 12000 | 1 | 2147483647 | per operation |
|
||||
| `ghidra.decompile_max_payload_mib` | `REA_GHIDRA_DECOMPILE_MAX_PAYLOAD_MIB` | `src/domain/analysisResourceLimits.ts` | unset (`null`, unbounded payload policy) | 1 | 2047 | per operation |
|
||||
| `ghidra.startup_timeout_ms` | `REA_GHIDRA_STARTUP_TIMEOUT_MS` | `src/domain/analysisResourceLimits.ts` | 330000 | 1 | 2147483647 | next provider startup |
|
||||
| `hopper.startup_timeout_ms` | `REA_HOPPER_STARTUP_TIMEOUT_MS` | `src/domain/analysisResourceLimits.ts` | 120000 | 1 | 2147483647 | next provider startup |
|
||||
| `ghidra.decompile_timeout_seconds` | `REA_GHIDRA_DECOMPILE_TIMEOUT_SECONDS` | `src/domain/analysisResourceLimits.ts` | unset (`null`, decompile stays unbounded) | 1 | `MAX_GHIDRA_DECOMPILE_TIMEOUT_SECONDS` | per operation |
|
||||
| `jadx.operation_timeout_ms` | `REA_JADX_OPERATION_TIMEOUT_MS` | `src/domain/analysisResourceLimits.ts` | 120000 | 1 | 2147483647 | per operation |
|
||||
| `regex.matching_deadline_ms` | `REA_REGEX_MATCHING_DEADLINE_MS` | `src/domain/analysisResourceLimits.ts` | 5000 | 1 | 2147483647 | per operation |
|
||||
| `regex.worker_heap_request_mib` | `REA_REGEX_WORKER_HEAP_REQUEST_MIB` | `src/domain/analysisResourceLimits.ts` | 128 | 7 | 16384 | next worker |
|
||||
| `capture.decoder_old_generation_mib` | `REA_CAPTURE_DECODER_OLD_GENERATION_MIB` | `src/domain/analysisResourceLimits.ts` | 192 | 8 | 16384 | next worker |
|
||||
| `javascript.analysis_timeout_ms` | none (`analysis_timeout_ms`) | `src/domain/javascript/javascriptAnalysisResourceControls.ts` | 300000 | 1 | 2147483647 | per operation |
|
||||
| `javascript.max_heap_mb` | none (`max_heap_mb`) | `src/domain/javascript/javascriptAnalysisResourceControls.ts` | 1024 | 128 | 16384 | next worker |
|
||||
| `wasm.command_timeout_ms` | none (`command_timeout_ms`) | `src/domain/wasm/wasmArtifact.ts` | 30000 | 1 | 2147483647 | per operation |
|
||||
| `native.matching_representation_bytes` | `REA_NATIVE_MATCHING_REPRESENTATION_BYTES` | `src/domain/analysisResourceLimits.ts` | 100663296 | 1 | 1073741824 | per operation |
|
||||
|
||||
An out-of-range `update_analysis_settings` value is rejected by the setting's
|
||||
schema. Invalid launch seeds that the global environment parser accepts as
|
||||
provider-local stay inspectable with `source: "invalid"`.
|
||||
|
||||
## Per-call limits in the runtime system
|
||||
|
||||
These are checked when the work runs. Each keeps its `REA_` seed, default,
|
||||
floor, and maximum. The accepted operation snapshot supplies the value.
|
||||
`update_mode` is `runtime` and `pending_restart` is false for the value in
|
||||
force. An update outside the range is rejected. A hit names the setting and
|
||||
reports the current value, source, and range. A rejected Windows ChangeTime launch value omits `pending_restart`.
|
||||
|
||||
| Environment | Owner | Default | Floor | Maximum | Applies | Fields |
|
||||
| --------------------------------------------- | --------------------------------------------------- | ----------------------: | ------: | -----------: | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------- |
|
||||
| `REA_BRIDGE_MAX_REQUEST_BYTES` | `src/config/bridgeMaxRequestBytes.ts` | 16777216 | 7464 | 536870887 | each bridge request, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_BRIDGE_MAX_REPLY_BYTES` | `src/config/bridgeMaxReplyBytes.ts` | 268435456 | 1048576 | 536870888 | each Hopper or Ghidra request, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_CAPTURE_PACKET_JSON_EXPANSION_BYTES` | `src/config/capturePacketJsonExpansion.ts` | 137438953472 | 1048576 | 137438953472 | each packet-capture reply before parsing, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_DEBUGGER_COMMAND_DEADLINE_MS` | `src/domain/analysisResourceLimits.ts` | 120000 | 1 | 2147483647 | each command, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_DEBUGGER_MAX_COMMAND_OUTPUT_BYTES` | `src/domain/analysisResourceLimits.ts` | 16777216 | 1 | 89303718 | each command, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_HOPPER_CALLER_SCAN_BUDGET_MS` | `src/domain/analysisResourceLimits.ts` | 2000 | 1 | 2147483647 | each caller scan, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_JAVASCRIPT_MEMBER_MUTATION_ALIAS_STATES` | `src/domain/analysisResourceLimits.ts` | 524288 | 1 | 8388608 | each JavaScript source's member-mutation phase, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_JEB_MCP_TIMEOUT_MS` | `src/jeb/JebMcpConnection.ts` | 60000 (MCP SDK default) | 1 | 2147483647 | discovery and each tools/call, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_KUNA_PROJECT_TIMEOUT_MS` | `src/kuna/KunaConfiguration.ts` | 1800000 | 1 | 2147483647 | each project export and whole-program scan, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_KUNA_TIMEOUT_MS` | `src/kuna/KunaConfiguration.ts` | 120000 | 1 | 2147483647 | each function decompile, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_PWNTOOLS_MAX_INPUT_BYTES` | `src/config/pwntoolsInputLimit.ts` | 33554432 | 1 | 1073741824 | each pwntools decode, unless the call passes `producer_limits.input_bytes`; otherwise the operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
| `REA_WINDOWS_CHANGE_TIME_DRIFT_MS` | `src/config/windowsChangeTimeSettle.ts` | 2000 | 1 | 60000 | each ChangeTime observation, from the accepted operation snapshot | `update_mode: "runtime"`; invalid launch omits `pending_restart` |
|
||||
| `REA_WINDOWS_CHANGE_TIME_SETTLE_POLL_MS` | `src/config/windowsChangeTimeSettle.ts` | 25 | 1 | 1000 | each ChangeTime observation, from the accepted operation snapshot | `update_mode: "runtime"`; invalid launch omits `pending_restart` |
|
||||
| `REA_WINDOWS_CHANGE_TIME_SETTLE_MAX_POLLS` | `src/config/windowsChangeTimeSettle.ts` | 40 | 1 | 1000 | each ChangeTime observation, from the accepted operation snapshot | `update_mode: "runtime"`; invalid launch omits `pending_restart` |
|
||||
| `REA_ZSTD_MAX_FRAMES` | `src/domain/compression/zstandardFrameAllowance.ts` | 4096 | 1 | 65536 | each exact Zstandard buffer, from the accepted operation snapshot | `update_mode: "runtime"`, `pending_restart: false` |
|
||||
|
||||
## Restart-only numeric limits
|
||||
|
||||
These stay out of `update_analysis_settings`.
|
||||
|
||||
| Environment | Owner | Default | Floor | Maximum | Read | Why restart-only |
|
||||
| ----------------------------------- | -------------------------------------- | ------------------: | -------: | ------------------------: | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `REA_DEBUGGER_MAX_PENDING_COMMANDS` | `src/domain/analysisResourceLimits.ts` | 16 | 1 | 256 | debugger manager construction | Queue capacity of the manager created at startup. `update_mode: "restart"` and `pending_restart: false`. |
|
||||
| `REA_DEBUGGER_MAX_SESSIONS` | `src/domain/analysisResourceLimits.ts` | 8 | 1 | 64 | debugger manager construction | Session-pool size of the manager created at startup. `update_mode: "restart"` and `pending_restart: false`. |
|
||||
| `REA_HOPPER_DEMO_DIALOG_TIMEOUT_MS` | `src/hopper/HopperStartupFailure.ts` | 10000 | 1 | 2147483647 | Linux private-display adapter start | The helper reads the process environment. Prose restart. |
|
||||
| `REA_JADX_ACTIVE_PROCESSOR_COUNT` | `src/android/JadxConfiguration.ts` | unset (JVM default) | 1 | 2147483647 | JADX JVM launch | `-XX:ActiveProcessorCount` is fixed for that JVM. Prose on invalid values. |
|
||||
| `REA_JADX_HEAP_MIB` | `src/android/JadxConfiguration.ts` | unset (JVM default) | 1 | `Number.MAX_SAFE_INTEGER` | JADX JVM launch | `-Xmx` is fixed for that JVM. Prose on invalid values. |
|
||||
| `REA_KUNA_CACHE_MAX_BYTES` | `src/kuna/KunaConfiguration.ts` | 4294967296 | 1048576 | `Number.MAX_SAFE_INTEGER` | Kuna cache construction | The cache is sized once for the provider. Prose restart. |
|
||||
| `REA_KUNA_JOBS` | `src/kuna/KunaConfiguration.ts` | 1 | 1 | 32 | Kuna run-slot construction | Worker-pool width for the provider. Prose restart. |
|
||||
| `REA_MCP_DOCTOR_DEADLINE_MS` | `src/config/mcpStartupBudgets.ts` | 30000 | 1 | 2147483647 | MCP server startup | Startup phase of the MCP server itself. Prose. |
|
||||
| `REA_MCP_FIRST_CATALOG_BUDGET_MS` | `src/config/mcpStartupBudgets.ts` | 20000 | 1 | 2147483647 | MCP server startup | Startup phase of the MCP server itself. Prose. |
|
||||
| `REA_MCP_INITIALIZE_BUDGET_MS` | `src/config/mcpStartupBudgets.ts` | 15000 | 1 | 2147483647 | MCP server startup | Startup phase of the MCP server itself. Prose. |
|
||||
| `REA_MCP_MAX_INPUT_ELEMENTS` | `src/config/mcpInputBudget.ts` | 1024 | 1 | `Number.MAX_SAFE_INTEGER` | MCP server creation | Argument admission for the server process. Prose restart. |
|
||||
| `REA_MCP_MAX_RESPONSE_BYTES` | `src/config/mcpResponseBudget.ts` | 10485760 when unset | 10485760 | `Number.MAX_SAFE_INTEGER` | MCP server creation | Stdio receive buffer and the paired client buffer. Prose restart. |
|
||||
| `REA_MCP_TOOLS_LIST_BUDGET_MS` | `src/config/mcpStartupBudgets.ts` | 5000 | 1 | 2147483647 | MCP server startup | Startup phase of the MCP server itself. Prose. |
|
||||
| `REA_RECONNECT_TIMEOUT_SECONDS` | `src/hopper/BridgeLauncher.ts` | 30 | 30 | 30 | written into the Hopper bridge helper | Not a caller setting. It is `HOPPER_SHUTDOWN_TIMEOUT_MS / 1000`. |
|
||||
| `REA_SWIFTC_COMPILE_TIMEOUT_MS` | `src/config/providerStartupTimeout.ts` | 120000 | 1 | 2147483647 | Darwin ownership-helper reader construction | Captured at process start for that helper compile. Prose restart. |
|
||||
|
||||
## Restart-only non-numeric settings
|
||||
|
||||
No floor or maximum. They are read from the launch environment at startup.
|
||||
Recovery text tells the caller to change the launch environment, which takes
|
||||
effect on the next process. They stay
|
||||
restart-only because they choose a command, a binary, a filesystem root, the
|
||||
browser sandbox, secret patterns, the provider, or the shape of the MCP server
|
||||
or logger.
|
||||
|
||||
| Name | Owner | Why |
|
||||
| ------------------------------------ | -------------------------------------------------- | ------------------------------------------- |
|
||||
| `REA_ADB_PATH` | `src/adb/AdbConfiguration.ts` | Caller-selected executable path. |
|
||||
| `REA_AGENT_ENV_COMMAND` | `src/application/DesktopBuildDoctor.ts` | Caller-selected command. |
|
||||
| `REA_ANALYSIS_PROVIDER` | `src/config/environment.ts` | Provider choice for the process. |
|
||||
| `REA_APKTOOL_COMMAND` | `src/apktool/ApktoolConfiguration.ts` | Caller-selected command. |
|
||||
| `REA_BINWALK_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_BROWSER_EXECUTABLE` | `src/application/CapabilityInventory.ts` | Caller-selected browser binary. |
|
||||
| `REA_BROWSER_NO_SANDBOX` | `src/application/SetupRegistrationEnvironment.ts` | Browser sandbox policy. |
|
||||
| `REA_CAPINFOS_COMMAND` | `src/pcap/PcapConfiguration.ts` | Caller-selected command. |
|
||||
| `REA_CUTTER_BRIDGE_DIR` | `src/application/SetupRegistrationEnvironment.ts` | Filesystem root for the Cutter bridge. |
|
||||
| `REA_DARWIN_MODULE_CACHE_PATH` | `src/application/SetupRegistrationEnvironment.ts` | Filesystem path for the Swift module cache. |
|
||||
| `REA_DARWIN_SWIFTC_PATH` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected compiler path. |
|
||||
| `REA_DCONF_COMMAND` | `src/desktop/DconfDatabaseReader.ts` | Caller-selected command. |
|
||||
| `REA_DOCKER_COMMAND` | `src/application/DesktopBuildDoctor.ts` | Caller-selected command. |
|
||||
| `REA_EVM_PRLIMIT_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_FIRMWARE_PRLIMIT_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_GDB_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected debugger binary. |
|
||||
| `REA_GHIDRA_CHECKPOINT_DIR` | `src/config/environment.ts` | Filesystem root. |
|
||||
| `REA_GHIDRA_COMPILER_SPEC_ID` | `src/config/environment.ts` | Provider analysis choice. |
|
||||
| `REA_GHIDRA_DISABLED_ANALYZERS` | `src/config/environment.ts` | Provider analysis choice. |
|
||||
| `REA_GHIDRA_LANGUAGE_ID` | `src/config/environment.ts` | Provider analysis choice. |
|
||||
| `REA_GHIDRA_NATIVEAOT_JAR` | `src/config/environment.ts` | Caller-selected binary path. |
|
||||
| `REA_GHIDRA_PROGRAM_NAME` | `src/config/environment.ts` | Provider project selection. |
|
||||
| `REA_GHIDRA_PROJECT_PATH` | `src/config/environment.ts` | Filesystem root. |
|
||||
| `REA_GHIDRA_SEED_FILE` | `src/config/environment.ts` | Filesystem path. |
|
||||
| `REA_IDA_MCP_CONFIG` | `src/config/environment.ts` | Filesystem path of the IDA MCP config. |
|
||||
| `REA_ILSPY_CMD_PATH` | `src/config/environment.ts` | Caller-selected executable path. |
|
||||
| `REA_JADX_MCP_JAR` | `src/android/JadxConfiguration.ts` | Caller-selected binary path. |
|
||||
| `REA_JAVASCRIPT_PRLIMIT_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_JEB_MCP_URL` | `src/config/environment.ts` | Provider endpoint. |
|
||||
| `REA_KUNA_CACHE_DIR` | `src/kuna/KunaConfiguration.ts` | Filesystem root. |
|
||||
| `REA_KUNA_COMMAND` | `src/kuna/KunaConfiguration.ts` | Caller-selected executable path. |
|
||||
| `REA_LOG_LEVEL` | `src/config/environment.ts` | Logger configuration for the process. |
|
||||
| `REA_MCP_INPUT_SCHEMA_PROFILE` | `src/config/environment.ts` | MCP server schema shape. |
|
||||
| `REA_MCP_OUTPUT_SCHEMA_PROFILE` | `src/config/environment.ts` | MCP server schema shape. |
|
||||
| `REA_MCP_TOOL_CATALOG_PROFILE` | `src/config/environment.ts` | MCP server catalog shape. |
|
||||
| `REA_MCP_TOOL_FAMILIES` | `src/config/environment.ts` | Which tools the MCP server registers. |
|
||||
| `REA_MITMDUMP_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_OBJDUMP_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_PWNDBG_GDB` | `src/native/pwndbg/PwndbgCoreContext.ts` | Caller-selected debugger binary. |
|
||||
| `REA_PWNDBG_GDBINIT` | `src/native/pwndbg/PwndbgCoreContext.ts` | Caller-selected file path. |
|
||||
| `REA_PWNDBG_VENV_PATH` | `src/native/pwndbg/PwndbgCoreContext.ts` | Filesystem root. |
|
||||
| `REA_PWNTOOLS_PYTHON` | `src/native/pwntools/PwntoolsDecoder.ts` | Caller-selected interpreter path. |
|
||||
| `REA_REFERENCE_SECRET_PATTERNS_JSON` | `src/config/environment.ts` | Secret-pattern policy. |
|
||||
| `REA_RIZIN_COMMAND` | `src/rizin/RizinDebugSessionManager.ts` | Caller-selected debugger binary. |
|
||||
| `REA_SIGROK_COMMAND` | `src/signals/SigrokRecordingProvider.ts` | Caller-selected command. |
|
||||
| `REA_SIGROK_PRLIMIT_COMMAND` | `src/signals/SigrokRecordingProvider.ts` | Caller-selected command. |
|
||||
| `REA_TSHARK_COMMAND` | `src/pcap/PcapConfiguration.ts` | Caller-selected command. |
|
||||
| `REA_TSHARK_PRLIMIT_COMMAND` | `src/pcap/PcapNativeBound.ts` | Caller-selected command. |
|
||||
| `REA_UNBLOB_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_WABT_BIN_DIRECTORY` | `src/wasm/WabtArtifactProvider.ts` | Filesystem root of the WABT tools. |
|
||||
| `REA_WAKARU_COMMAND` | `src/application/SetupRegistrationEnvironment.ts` | Caller-selected command. |
|
||||
| `REA_XPROP_COMMAND` | `src/application/desktop/DesktopCaptureFailure.ts` | Caller-selected command. |
|
||||
|
||||
`REA_MANAGED_LINUX_HOPPER_LAUNCHER` is a fixed path constant, and
|
||||
`REA_WORKFLOW_PROVIDER` is a provider identity object. Neither is an
|
||||
environment setting. Names that look like `REA_` but are process protocol, not
|
||||
caller settings:
|
||||
`REA_ELECTRON_CAPTURE_ARGV`, `REA_BUILD_COMMIT`, `REA_BUILD_COMPUTER_REA_ARCHIVE`, `REA_INSTALL_SCRIPT`,
|
||||
`REA_OWNS_PROCESS_LIFETIME`, `REA_PAYLOAD`, `REA_PROCESS_RUN_ID`, `REA_RUN_ID`,
|
||||
`REA_SOCKET`, `REA_STATE_FORMAT`, `REA_TARGET_PATH`, `REA_TOKEN`, bridge markers
|
||||
such as `REA_COMMAND_COMPLETE_`, and the `ERR_REA_WINDOWS_NATIVE` code.
|
||||
`GHIDRA_INSTALL_DIR`, `JAVA_HOME`, `HOPPER_LAUNCHER_PATH`, `HOPPER_TARGET_PATH`,
|
||||
`HOPPER_TARGET_KIND`, and `HOPPER_LOADER_ARGS_JSON` are launch configuration
|
||||
without the `REA_` prefix. Paths and the provider choice among them stay
|
||||
restart-only for the same reason as the table above.
|
||||
|
||||
## Static check
|
||||
|
||||
`npm run lint` owns this check: it runs
|
||||
`scripts/verify/rea-numeric-limits.mjs` after dependencies are installed, so
|
||||
`npm run check:fast`, the pre-push hook and CI's static checks all include it.
|
||||
`scripts/verify/architecture-guards.mjs` does not run it. The check scans `src`
|
||||
excluding tests,
|
||||
keeps names that are numeric limits, and requires each name to be an
|
||||
`environment` on an analysis setting or a registry entry with a reason.
|
||||
The registry accepts only `restart-only`. A limit checked on each call has to
|
||||
be an analysis setting. The check rejects a `per-call` registry entry.
|
||||
The same script reads every default, floor, and maximum in the three numeric
|
||||
tables above and compares them with `ANALYSIS_SETTINGS` or the owner constant
|
||||
the parser enforces. A mismatch names the limit and both values. A cell that
|
||||
is only `Number.MAX_SAFE_INTEGER` or `MAX_GHIDRA_DECOMPILE_TIMEOUT_SECONDS`
|
||||
means that export. `unset` means the code default is null.
|
||||
Reference in new issue
Block a user