Skip to content

feat(evidence): discover retained records without full payloads - #1682

Merged
morluto merged 3 commits into
mainfrom
feat/evidence-record-discovery-1247
Oct 11, 2026
Merged

morluto merged 3 commits into
mainfrom
feat/evidence-record-discovery-1247

Conversation

@N0zoM1z0

@N0zoM1z0 N0zoM1z0 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Large retained function dossiers can make get_evidence_bundle itself exceed ordinary MCP framing, leaving analysts without a lightweight way to discover an existing parent before requesting a view. Add detail: "summary" to that existing tool and a shared inspect-evidence-bundle CLI workflow for portable files. Complete canonical bundle delivery remains the default.

Summary metadata returns every matching Evidence ID, subject/provider identity, analysis-profile digest and recorded native procedure identity. Exact filters select operation, target digest, profile digest, parent ID or procedure address. Complete-record retention is separate from observed native pcode truncation, unavailable analysis and missing/incompatible metadata. Payloads are neither copied nor transferred by the metadata projection. An invalid complete-delivery/filter combination returns a typed correction from the shared application layer. Transport-constraint recovery now points directly to metadata discovery and the following retained view.

{
  "name": "get_evidence_bundle",
  "arguments": {
    "detail": "summary",
    "filters": {
      "operation": "analyze_function",
      "procedure_address": "0x401136"
    }
  }
}

Use the returned result.records[].evidence_id with inspect_analysis_view. Portable CLI input uses the same detail/filters alongside an absolute bundle path; local file validation still materializes the complete file under the existing memory budget. This does not fix oversized snapshot import (#1680), the upstream SDK's catalog preparation cost, or Windows cold-start deadlines.

Verification:

  • npm run check:fast.
  • npm run test:focused -- src/domain/evidenceRecordSummary.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/boundary/cli/analysisViewCli.test.ts (16 passed), including ordinary framing recovery, exact metadata selection, the following native page, typed semantic failure, portable CLI/default-complete behavior and partial legacy metadata.
  • npm run test:focused -- tests/boundary/mcp/toolSchemaValidity.test.ts tests/boundary/mcp/outputSchemaSemanticConstraints.test.ts tests/boundary/mcp/toolErrorSchemaDelivery.test.ts (9 passed): full advertised catalog, converted JSON Schemas and pinned SDK error delivery.
  • npm run docs:check.
  • Actual public CLI/stdio MCP with real Ghidra 12.1.4/Java 21 on a source-owned Linux ELF: 4,543,224-byte normalized dossier, default framing constraint, all 15 native collection first/last checks, real nonempty parameters/uses, unchanged nonempty observed analysis-run identity, snapshot save/close/reconnect, exact original view reuse and owned cleanup. High-pcode truncation and unrecorded unresolved calls stay explicit. Full first/last CLI parity was independently verified; this is not exhaustive pagination of the large fixture.
  • Fresh production MCP import of the real snapshot: complete bundle delivery is constrained, then discover without a parent ID, filter by all exact identities, inspect parameters, mismatch/invalid/close checks, and CLI/MCP metadata parity pass. Discovery responses were 2,458/2,820 bytes at 14.5/3.4 ms in one run; portable CLI includes complete 9 MB file validation (~5.1 s). Family RSS peaked at 1,426,448,384 bytes. No provider runtime was allocated during replay/discovery. These are single-run observations, not token savings or percentiles.

Real Hopper was not verified. Separate Windows main-package verification at f88c9902 passed real procedure/assembly views and exact cross-session snapshot replay with no provider runtime allocation. Its cold overview took 262.1 seconds under a 360-second SDK request; default 60-second and separate 240-second attempts timed out. That tiny-PE control does not verify the new discovery API on Windows or general cold-start recovery. See #1247 for the original/current native result distinction and #1680 for the larger saved-snapshot admission control.

Closes #1247. Refs #1065, #1345, #1680.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@morluto
morluto merged commit 17f7040 into main Oct 11, 2026
29 checks passed
@morluto
morluto deleted the feat/evidence-record-discovery-1247 branch October 11, 2026 03:18
@morluto morluto added enhancement New feature or request area: evidence Evidence, artifacts, and reconstruction labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: evidence Evidence, artifacts, and reconstruction enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(native): inspect selected facets of retained function dossiers

2 participants