feat(analysis): make resource budgets recoverable across CLI and MCP (#9706)

* refactor(analysis): centralize resource budgets and recovery facts

* feat(analysis): expose ASAR and Ghidra runtime admission controls

* feat(artifacts): expose reader admission and preserve limited recognition

* feat(javascript): expose recoverable semantic precision budgets

* feat(web): add recoverable source-map budgets and compact retained views

* feat(web): make historical capture decoding budgets recoverable

* fix(desktop): enforce selected view policies across capture and export

* feat(runtime): make Frida and LLDB retention budgets selectable

* feat(native): expose diagnostic budgets and preserve exhaustion causes

* feat(managed): expose recoverable snapshot and representation budgets

* feat(metadata): make Go and Rust inspection budgets recoverable

* feat(wasm): expose representation and producer admissions

* feat(evm): expose per-call worker resource budgets

* feat(android): make resource and string-pool omissions recoverable

* feat(producers): expose command and recorded-capture budgets

* docs(analysis): record recovery contracts and integrated validation

* fix(docs): link calibration oracle from published verification pages

* fix(docs): restore desktop task anchors and receipt links

* test(analysis): align fixtures with selectable budget contracts

* fix(analysis): remove source-location projector dependency cycle

* test(analysis): refresh budget recovery and verifier regressions

* test(analysis): preserve format and publication recovery expectations

* test(windows): align conformance with owned runtime admission

* fix(desktop): preserve selected alias kinds in exported state

* test(analysis): align provider fixtures with recoverable budgets

* test(desktop): validate emitted alias metadata structurally

* fix(ghidra): classify bounded Windows endpoint refusals

* test(cli): assert selectable artifact admission recovery

* fix(cli): preserve capture provenance in environment builds
This commit is contained in:
morluto authored and GitHub committed 2026-11-10 05:11:20 -05:00
1 parent 55b6d2ca20
commit cb4e5cfbff
515 files changed
+21066 -3637

No files matched your search

@@ -763,7 +763,7 @@ These safeguards are not caller-selectable output budgets. Source-map parsing
reports truncation when its format or parser safety boundary is reached. The
application graph has no aggregate node, edge, root, or observation prefix cap.
Semantic evaluation retains at most 256 distinct primitive candidates per
By default, semantic evaluation retains at most 256 distinct primitive candidates per
expression and at most 1 MiB of worst-case JSON string bytes across a normalized
primitive value's string candidates. The byte budget estimates six JSON bytes
per UTF-16 code unit, the expansion bound for escaped strings, and bounds both
@@ -783,13 +783,48 @@ available for endpoint queries, tracing and comparison. Each analysis records en
later projections: a selected healthy sibling can remain exact while whole-file
coverage reports the encountered bound. Projection preserves limiting values
from the shared property-slot owner. Expression
evaluation and provenance walks stop after 256 nested levels. Union products
evaluation and provenance walks default to 256 nested levels. Union products
and string lengths are checked before allocating combinations or concatenated
strings. When a boundary is reached, the value stays unknown, semantic coverage
becomes partial, and graph evidence retains the expression location and typed
limiting reason. The number of unresolved alternatives is unknown; it is not
reported as an exact omission count.
`semantic_precision` selects per-source evaluator budgets independently of
retained graph capacity, worker memory and deadlines. Both
`analyze_javascript_application` and `analyze_web_bundle` accept a partial object:
| Field | Default | Unit |
| ---------------------- | ------: | ------------------------------------------- |
| `primitive_candidates` | 256 | alternatives per normalized primitive value |
| `primitive_bytes` | 1048576 | estimated JSON bytes per primitive value |
| `expression_depth` | 256 | nested expression/provenance levels |
| `getter_expansions` | 512 | scheduled states per precise getter query |
| `alias_selections` | 512 | additional precise selector states |
| `wrapper_visits` | 1000000 | wrapper visits/substitutions per source |
| `wrapper_depth` | 128 | active symbolic wrapper levels |
`primitive_bytes` charges six estimated JSON bytes per UTF-16 code unit plus
quotes before creating concatenated strings. Ordinary ASCII can exhaust that
conservative estimate before its actual JSON encoding reaches the selected
byte count. The [calibration record](../../verification/javascript-precision-calibration.md)
keeps existing defaults for its measured literal-value tasks; it does not
establish optimal candidate, getter or alias budgets for larger applications.
All fields accept positive safe integers; worker memory, execution and JSON
representation bounds remain independently enforced. Omission keeps the defaults;
invalid values fail validation. For example, retry a finite candidate-limit
observation with `semantic_precision: {"primitive_candidates": 512}`. The CLI
accepts `--semantic-precision '{"primitive_candidates":512}'` or a JSON file.
An override applies to that next analysis without restarting REA, remains in
Evidence parameters and effective coverage, and cannot change already retained
facts. Increasing these budgets does not raise graph retention, worker heap,
transfer admission, or parent result memory. Cyclic or unsupported evaluations
remain unknown. Wrapper limitations name visits and depth separately so a
caller can change the resource actually exhausted. Finite inline literal object
spreads use iterative syntax traversal and no longer inherit a duplicate
semantic-depth cut.
Byte, entry, path, and graph-shape bounds are hard limits. The parse deadline is
checked before and between bounded parsing and traversal phases; the synchronous
Babel and JSON parser calls cannot be preempted mid-call, so their input byte