* fix(native)!: resolve name and import selectors through one owner
find_xrefs_to_name matched names exactly against list_names, while
procedure_callers and procedure_references used each provider's own
procedure lookup. One import selector therefore resolved differently per
tool, and each tool failed on a different provider. Hopper also refused
every target outside a procedure, so it could not answer incoming
references to an import.
- NativeSymbolSelection owns name resolution for find_xrefs_to_name, xrefs
and the incoming procedure tools: exact name, then a provider-reported
external import by imported or library-qualified name, then the
provider's procedure lookup. CLI and MCP both run through it.
- When a provider refuses a name for xrefs, procedure_callers or incoming
procedure_references, REA resolves it once and asks again by address.
- The Ghidra and Hopper bridges answer an explicit address outside every
procedure (an import slot, imported name or data label) with its recorded
references and their containing procedures.
- XrefsAddressResolution is removed.
BREAKING CHANGE: procedure_references.procedure may now identify an address
outside every procedure, with classification null and an unavailable body.
find_xrefs_to_name adds resolved_name and candidates, and resolves bare
import names on Ghidra.
Fixes#14160Fixes#14184
* fix(native): order selector candidates by code point
The domain ordering rule forbids localeCompare.
* fix(native): retry only names outside every procedure and keep retry facts
- Answer a refused name by address only when the provider observes that
address outside every procedure. An interior label stays refused instead
of selecting its containing procedure.
- Return a retry's own failure unless it is another lookup miss.
- Retain Hopper's native address-target reply as raw Evidence, with its
target identity and caller completeness.
* fix(native): retry at exact procedure entries and return containment failures
- An import resolved to a procedure's exact entry, such as Ghidra's external
function for kernel32.dll::VirtualAlloc, is answered by that address;
only an address strictly inside a procedure keeps the refusal.
- A containment lookup that fails for any reason other than the provider
lacking it is returned with its facts instead of the name refusal.
* test(ida): answer unknown names as Not found in the verifier fixture
The verifier's fake IDA resolved every lookup_funcs query to main. With
xrefs names now resolved by the shared selector owner, an unknown name
such as not-an-address reaches the provider's procedure lookup, which the
fake answered with main, so xrefs succeeded instead of the expected
invalid_request. Real IDA answers an unknown name with "Not found"; the
fixture now does too, and the verifier's contract is unchanged.
* fix(native): keep provider ambiguity and declare the procedure-lookup fallback
- The Ghidra bridge sends every matching entry of an ambiguous procedure
selector as structured candidates. The projection carries them as the
typed ambiguous-selector refusal, and the shared owner no longer treats
an ambiguous lookup as a missing name, so find_xrefs_to_name returns the
ambiguity with its candidates.
- find_xrefs_to_name requires list_names or procedure_address, plus xrefs,
so providers without a name inventory, such as IDA and Kuna, report it as
available with the effects of the calls it makes.
* fix(native): answer a provider-ambiguous name by its unique exact name
Ghidra's procedure lookup matches leaf names, so a global work and ns::work
make work ambiguous, while the shared owner resolves the exact name work.
When the provider reports an ambiguity, the shared owner now retries only by
a unique exact-name match and otherwise keeps the provider's ambiguity and
candidates.
* fix(native): resolve incoming procedure names through the shared owner first
procedure_callers and incoming procedure_references asked the provider by
name first, so Ghidra's leaf-name lookup could answer "work" with ns::work
while find_xrefs_to_name selected the exact label work. These tools now
resolve the name with the shared owner first and ask the provider by its
address when that address is outside every procedure or a procedure's exact
entry. A name the owner cannot resolve, or one inside a procedure, still goes
to the provider's procedure lookup, which owns alias and thunk spellings.
xrefs keeps provider-first resolution.
* fix(native): retain snapshot replay for resolved symbol selectors
* fix(cli): validate named inputs before target admission
* fix(mcp): preserve valid inputs when advertised schema references widen
* test(inputs): reach session behavior with admitted inputs
One-shot admission now rejects incomplete requests before a session exists. Lifecycle tests supply the required fields, and unknown arguments are rejected before provider issues are retained.
* fix(cli): preserve Electron fuse path spelling
Anchor relative fuse paths without stripping dot segments, and let an empty path reach the operation so it still reports invalid_request.
* fix(cli): reject outline-depth unless detail is summary
The advertised schema already required detail summary whenever outline-depth
was present. The parser still applied the full default and accepted that
combination, so its output failed the same schema. Parsing now rejects it
before the command runs.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Allow the composed one-shot dispatch workflow to open a covered Mach-O
without selecting a deep provider. The registry still owns selector
precedence; explicit request/environment choices remain binding, while
non-Mach-O and unsupported hosts retain deep symbol fallback. Requested
snapshots keep ordinary binding and profile semantics.
Share runtime composition and target admission with the native byte reader.
Keep target parsing, resource ownership and Evidence on the original session.
Validation: 13 focused files, 192 passed and 2 skipped; npm run check passed.
The six previously blocked native property CLI controls now pass. Ten measured
CLI workflows preserved exact metadata facts; warm raw reply token medians
1344/927, elapsed .475/.547s, CPU .691/.745s, sampled family RSS351.2/359.3MiB
baseline/candidate. Baseline used explicit Ghidra workaround; true cold and
full-agent costs unmeasured. No speed/memory improvement or Windows claim.
Refs #4555
Compose native utility sessions for the five existing static CLI questions.
Keep ordinary session routing for native runtime observations, and retain
caller-selected environments, target admission, Evidence and cleanup.
Validation: 17 focused files, 97 passed and 2 skipped; npm run check passed.
The three thin Mach-O CLI regressions now pass with macOS native utilities.
No Windows runtime verification or performance measurements performed.
Refs #4555
Static .app decoding failed under auto selection when multiple deep engines were installed. Compose the existing artifact provider without native candidates and reuse the shared one-shot target, Evidence and cleanup lifecycle. Preserve the selected provider environment.
Validation: real NIB filesystem and built CLI cases, artifact direct workflow and direct-analysis lifecycle tests pass (57 tests with MCP controls).
Deliver complete Evidence directly through MCP with required nullable analysis profiles and immutable per-server delivery settings. Bind selected environments at construction and require typed cleanup outcomes with retained retry ownership.
Remove test-only routing, duplicate session and snapshot metadata, producer-field repairs, and ambiguous provider arguments. Separate artifact byte identity from occurrence classification and retain typed source-map and partial native facts across CLI, MCP, and verifier consumers.
BREAKING CHANGE: obsolete Evidence envelopes, session aliases, incomplete snapshots, and missing normalized producer facts are no longer accepted.