[GH-ISSUE #2951] fix(ghidra): retain observed dossier facet and relationship coverage #1040

Closed
opened 2026-10-15 18:30:34 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/2951

Reproduction

Pinned main d4f0c5e664e26fe7ed1566dcc4b85ea9b57d52da and independently the normally built current-main integration 500fd6de88105b0d2e3edece59aca5d5f9f5f03f, Linux x64, real Ghidra12.1.4/JDK21:

  1. Compile an owned non-PIE ELF with a main calling a small leaf function.
  2. Use actual stdio MCP open_binary, analyze_function(main), then compare_functions with that exact Evidence as both sides.
  3. Close the session and verify owned cleanup.

The public result matches the function and reports six unchanged dimensions, zero changed, two unknown:

  • comments: Provider did not declare coverage for this empty facet.
  • calls: Provider did not report relationship coverage. plus the empty-callers facet limitation.

The real native Ghidra and AArch64 verifier lanes stop at native-value-e2e.mjs:238, which expected unchanged. The independent current-main public reproduction completed in18.93s with verified empty descendants; no target binary was executed or modified.

Producing boundary

analyzeFunctionObservation in ReaGhidraBridge.java successfully collects comments, callers/callees, references, blocks and assembly, but emits no facet_availability facts. GhidraProviderCapabilities.relationshipCoverageFor only handles procedure_callers/procedure_callees, leaving the dossier's observed relationship set undeclared. Decompiler absence is also converted to an empty pseudocode string without the corresponding availability reason.

The comparison consumer is correctly conservative about undeclared empty facts. Do not make empty arrays complete or weaken its unknown rules to pass this lane. Carry actual successful-query availability and meaningful unavailable/partial reasons from the producing Ghidra boundary into the existing dossier contract; attach relationship coverage only after establishing returned observed-set coverage. Preserve unresolved indirect-flow caveats and decompiler failures.

Expected verification

Real CLI/MCP dossiers should distinguish collected empty facets from unavailable ones, and complete observed direct relationships from missing/partial coverage. Recheck the exact public self-comparison and complete native/AArch64 lanes, plus malformed/cancelled/partial producers and snapshot replay. Verify directly related historical fixtures independently; a current compareFunctions result is not automatically a legacy fixture.

This report makes no all-runtime-edge completeness claim, cross-provider equivalence claim or native Windows/macOS engine claim. Existing coverage/schema shapes should be reused; avoid extra provider queries, duplicated parsing or cached live absence.

Originally created by @N0zoM1z0 on GitHub (Oct 13, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/2951 ## Reproduction Pinned main `d4f0c5e664e26fe7ed1566dcc4b85ea9b57d52da` and independently the normally built current-main integration `500fd6de88105b0d2e3edece59aca5d5f9f5f03f`, Linux x64, real Ghidra12.1.4/JDK21: 1. Compile an owned non-PIE ELF with a `main` calling a small `leaf` function. 2. Use actual stdio MCP `open_binary`, `analyze_function(main)`, then `compare_functions` with that exact Evidence as both sides. 3. Close the session and verify owned cleanup. The public result matches the function and reports six unchanged dimensions, zero changed, two unknown: - comments: `Provider did not declare coverage for this empty facet.` - calls: `Provider did not report relationship coverage.` plus the empty-callers facet limitation. The real native Ghidra and AArch64 verifier lanes stop at native-value-e2e.mjs:238, which expected unchanged. The independent current-main public reproduction completed in18.93s with verified empty descendants; no target binary was executed or modified. ## Producing boundary `analyzeFunctionObservation` in ReaGhidraBridge.java successfully collects comments, callers/callees, references, blocks and assembly, but emits no facet_availability facts. GhidraProviderCapabilities.relationshipCoverageFor only handles procedure_callers/procedure_callees, leaving the dossier's observed relationship set undeclared. Decompiler absence is also converted to an empty pseudocode string without the corresponding availability reason. The comparison consumer is correctly conservative about undeclared empty facts. Do **not** make empty arrays complete or weaken its unknown rules to pass this lane. Carry actual successful-query availability and meaningful unavailable/partial reasons from the producing Ghidra boundary into the existing dossier contract; attach relationship coverage only after establishing returned observed-set coverage. Preserve unresolved indirect-flow caveats and decompiler failures. ## Expected verification Real CLI/MCP dossiers should distinguish collected empty facets from unavailable ones, and complete observed direct relationships from missing/partial coverage. Recheck the exact public self-comparison and complete native/AArch64 lanes, plus malformed/cancelled/partial producers and snapshot replay. Verify directly related historical fixtures independently; a current compareFunctions result is not automatically a legacy fixture. This report makes no all-runtime-edge completeness claim, cross-provider equivalence claim or native Windows/macOS engine claim. Existing coverage/schema shapes should be reused; avoid extra provider queries, duplicated parsing or cached live absence.
bsakaguchi 2026-10-15 18:30:34 +00:00
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#1040
No description provided.