mirror of
https://github.com/morluto/rea.git
synced 2026-11-25 13:48:44 +00:00
* fix(ghidra)!: scope defect notes and state session limitations once Ghidra known-defect records filtered by version only, so every result on an x86-64 PE carried the AArch64 ghidra-10154 record and the clang ghidra-9996 record, including byte reads and string searches. Each record now declares the target architectures it can apply to. ghidraKnownProviderDefectLimitations keeps a record only when the target's architecture can match (an unknown architecture keeps it) and the operation can depend on jump-table or function-body recovery. Every native result also repeated the session's shared limitations: the analysis and checkpoint caveats, the address convention, the native decompiler note, the PDB state, and the build and defect records. Over nine MCP calls on a public x64 DLL they were about 54% of the bytes. The provider now names those entries in a new AnalysisExecution sessionLimitations field. It still keeps them in limitations, so a consumer that ignores the field loses nothing. The session owner decides delivery. The persistent MCP runtime selects reference mode: each result replaces the shared entries with one limitation naming a retained session-context Evidence, records it, and links it in evidence_links. Equal session facts link the same record, so repeated observations keep their Evidence. One-shot CLI sessions keep the entries inline. BREAKING CHANGE: in MCP sessions, Ghidra result Evidence no longer lists session-scoped limitations inline. It carries one reference limitation and links a retained session-limitations Evidence (operation health, parameters.facet session-limitations) in evidence_links. Read it with get_evidence_bundle. Defect records no longer appear on operations or architectures outside their declared scope. Fixes #14183 Fixes #14158 * test(ghidra): spread readonly defect limitations into the matcher * fix(ghidra): keep defect notes on byte searches and reuse sourced session Evidence search_bytes names the function containing each match, so a body truncated by a switch defect can leave that procedure null. It now keeps the applicable defect records. Reference mode links a session-context record from every result, and bindSessionEvidenceExecution refused to reuse any execution with sources, so the adapter rebuilt and rehashed the Evidence the session had already retained. Reuse now accepts an execution whose sources match the record's authenticated evidence_links, in order. A regression checks that an exported snapshot's bundle carries the linked context record, so a replay in another process can resolve the reference. * fix(decompile-all): write the full session limitations into exported directories In reference mode a result carries one reference to the session-context Evidence instead of the session limitations. decompile_all copied execution limitations into its function files, journal and index, but the directory writer never saves the linked record, so after the MCP process ended the known-defect, PDB and checkpoint caveats could not be recovered. decompile_all now reads through inlineLinkedSessionLimitations, which restores the referenced text from the linked context record owned by SessionLimitationContext, so the directory stays self-describing.