mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8183] [Design] Recover function references when the provider lacks a general name inventory #6467
Open
opened 2026-11-01 21:11:22 +00:00 by bsakaguchi
·
6 comments
No Branch/Tag specified
main
codex/procedure-reference-stacked
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/kuna-independent-retry
codex/byte-search-overlay-coverage
codex/open-failure-target-receipt
codex/kuna-xref-evidence
codex/ghidra-ambiguous-procedure-recovery
codex/function-source-bundle
codex/trace-function-integration-prototype
codex/snapshot-source-closure
codex/recorded-evidence-array-pages
codex/evidence-recovery-redesign
codex/trace-feature-address-scope
codex/call-discovery-scope
codex/ghidra-literal-candidate-evidence
codex/decompile-directory-independent-retry
codex/retry-provenance-base
codex/value-flow-capability-experiment
codex/ghidra-containing-instruction
cursor/readme-discord-button-ef9f
dependabot/github_actions/actions/setup-node-7.1.0
dependabot/github_actions/actions/upload-artifact-7.0.2
dependabot/npm_and_yarn/npm-minor-and-patch-d8d97ce6df
codex/kuna-1989
fix/8559-native-ui-fixture-ownership
fix/8555-go-verifier-mcp-ownership
codex/provider-capability-recovery
fix/8642-rizin-target-stdin
codex/ghidra-memory-effect-scope
codex/ghidra-annotation-entry-selector
codex/ghidra-readonly-recovery
codex/ghidra-regex-verifier-recovery
codex/evidence-discovery-view-guidance
fix/8545-bulk-append-overflow
fix/8428-navigation-refusal-alternatives
codex/address-context-recovery
codex/matching-member-limitations
codex/unknown-scope-contract
codex/evidence-view-guidance
feat/8373-native-trace-views
codex/ghidra-snapshot-verifier-binding
codex/elf-export-visibility
codex/evidence-view-recovery
codex/native-reference-cli-help
codex/provider-candidate-observation-scope
codex/kuna-session-verification
codex/ghidra-switch-lifetime-guidance
codex/pseudocode-paging-discovery
codex/clarify-evidence-view-support
codex/kuna-xrefs-selector-recovery
codex/context-capacity-recovery
codex/evidence-closure-large-links
codex/same-function-evidence-identity
codex/ghidra-verifier-inspected-jdk
codex/audit-guided-workflows
codex/crash-prompt-retained-dossiers
codex/analysis-view-error-recovery
codex/kuna-verifier-target-selection
codex/ghidra-selected-project-call-coverage
codex/docs-native-analysis-scope
codex/ghidra-java-socket-boundary
codex/ghidra-retained-snapshot-verifier
codex/ghidra-search-inventory-facts
fix/8284-zero-argument-parameter-bindings
fix/8198-ui-action-handler-offset
fix/8257-elf-entry-label-identity
fix/8304-deferred-output-schema-projection
fix/8277-call-path-computed-target-uncertainty
fix/pr-8089-conflicts
fix/ci-static-duplicate-export
dependabot/npm_and_yarn/lint-staged-17.6.0
dependabot/github_actions/actions/download-artifact-8.0.2
dependabot/npm_and_yarn/write-file-atomic-8.0.0
dependabot/npm_and_yarn/canonicalize-5.1.0
dependabot/github_actions/actions/cache/restore-6.1.0
dependabot/npm_and_yarn/toon-format/toon-4.4.0
dependabot/github_actions/actions/deploy-pages-5.0.1
codex/review-fixes-pr-2403
codex/review-fixes-pr-2400
codex/process-terminal-width
codex/test-brittleness-cleanup
verify/7167-browser-connect-macos
fix/7167-browser-connect
feat/native-matching-allowance-setting
feat/browser-scenario-dry-run
test/managed-caller-parameters-20261024
codex/parser-fortythird-boundaries
fix/6926-pinvoke-platform-decorations-20261023
fix/6889-har-body-encoding-20261023
fix/6888-sqlite-schema-budget-20261023
fix/dependency-security-gates-6708
cursor/evidence-overwrite-rebase-b4ac
feat/4057-verify-native-exports
fix/windows-acl-observer-overhead-20261022
cursor/erlang-beam-restack-4476
cursor/pe-certificate-review-bf32
fix/6116-javascript-application-fs-errors
fix/6061-unmapped-runtime-script-unknown
feat/browser-scenario-summary
fix/pe-certificates
codex/verify-3407
cursor/rebase-5699
cursor/rebase-5352
cursor/rebase-5600
cursor/fix-cli-schema-omission-10a8
codex/audit-hopper-shutdown-reasons-20261021
fix/demangle-swift-omitted-record
fix/nib-boolean-value-types
cursor/cancellation-partial-observation-a5ac
fix/ib-object-limit-reasons
fix/electron-fuse-limit-advice
fix/kuna-doctor-dangling-cache
fix/fixed-budget-refusal-advice
fix/js-ipc-listener-dedup
fix/js-return-member-provenance
fix/dmg-integrity-retry-advice
fix/ida-doctor-readiness
fix/kuna-version-probe-output-drain
fix/legacy-swift-runtime-name-matching
fix/dylib-lazy-load-commands
fix/browser-scenario-startup-cancel
fix/swift-nested-punycode-classification
fix/compare-unselected-scopes
fix/objc-method-budget-coverage
fix/dmg-mounted-root-observations
audit/ci-tests-20261019-round2
release/6.7.0
fix/wabt-cleanup-retry-resolution
fix/electron-fuse-elf-pe-architecture
fix/native-plist-descriptor-ownership
fix/kuna-caller-cleanup-ownership
experiment/atomic-codemode-20261016
review/first-contributor-3776
fix/call-resolution-full-read-cycles
fix/member-mutation-selection-repeat
experiment/atomic-re-tools-20261015
perf/member-mutation-lazy-origins
perf/static-network-mutation-index
fix/hopper-startup-lifecycle
audit/3050-windows-proof-20261015
feat/windows-window-capture-2183
audit/3049-windows-proof-20261015
audit/3735-macos-fixtures-20261015
fix/batch-decompile-null-pseudocode
fix/kuna-inventory-honors-jobs
experiment/browser-codemode-tool-design-20261015
fix/hopper-clean-runtime-argv
codex/review-2049-27f1b367
review-fixes/pr-2787-routing
fix/3360-scoped-this-emitters
fix/3367-replaced-global-effects
fix/3838-compact-any-value-items
test/hopper-download-probe-20261015
codex/windows-runtime-creation-red-green-20261015
codex/windows-readonly-root-red-green-20261015
codex/windows-root-share-red-green-20261015
codex/exp-1685-win-mcp-startup
codex/bug-sweep-20261015
investigate/2190-windows-package-phases
investigate/3543-macos-cli-deadline
perf/3281-reverse-tools-feedback-quality
fix/3406-hopper-doctor-fixture
fix/3341-wrapper-require-test-context
fix/3301-owned-uninstall-fixtures
fix/3164-compiler-input-ownership
fix/pcap-cleanup-stdout-newline-20261014
perf/interface-builder-summary
codex/review-fixes-pr-1977
fix/ghidra-effective-jvm-platform
fix/docs-turkish-rust-link-20261013
fix/main-maintenance-ci-20261010
fix/recover-binary-session-process-effects
codex/review-fixes-pr-2457
codex/ci-required-cancellation-gate
fix/main-format-baseline-20261013
fix/setup-preserve-entry-fields
cursor/restore-main-checks-1ffc
fix/ghidra-bridge-hashmap-import
codex/shared-ci-jadx-json-default-20261013
codex/shared-ci-ghidra-test-groups-20261013
codex/shared-ci-java-fixture-format-20261013
codex/fix-intrinsic-invocation-boundaries
test/release-preflight-reusable-jobs
test/js-parameter-provenance-expectation
fix/linux-hopper-verification-current
test/2419-ghidra-elf-probe-size
followup/pr-1544-native-ida
codex/fold-pr-2230-contribution
docs/readme-responsible-use
fix/issue-2064
fix/issue-2050
fix/issue-2053
fix/issue-1968
fix/issue-1945
experiment/codemode-bridge-20261011
fix/tool-effects-negative-wording-1904-20261012
fix/1842-electron-interop-provenance
feat/recover-javascript-multi-input
refactor/website-i18n-prep
fix/nativeaot-pe-virtual-extent
fix/browser-verifier-ci-hang
fix/pe-resources-input-selection
docs/beginner-friendly-guides
docs/beginner-setup-guide
fix/javascript-analysis-worker-1563
fix/1649-ghidra-duplicate-names
fix/javascript-export-keys-integration-1369
test/maintenance-boundary-contracts-20261011
review/javascript-export-keys-1369
review/process-live-progress-1483
test/javascript-1495-growth-ratio
fix/ci-escape-timing
docs/normalized-terminal-geometry-1450
release/6.3.0
archive/release-6.3.0-pr1381
release/6.2.0
fix/electron-preload-dynamic-override
fix/javascript-self-referential-bundler-edges
release/6.1.0
cursor/grok-client-cherry-pick-0b56
feat/signature-posture
feat/dyld-shared-cache
feat/artifact-integrity-policy
feat/pkg-inventory
release/6.0.0
chore/sync-release-5.0.0
release/5.0.0
cursor/cloud-agent-node-787e
fix/javascript-xhr-open-endpoints
review/pr-711-realpath-fallback-wording
cleanup/replay-confinement
codex/test-suite-performance
codex/issue-foundations
codex/address-open-issues-2026-07-20
agent/javascript-vite-rollup-esbuild-adapters
agent/process-cleanup
agent/triage-integration
agent/unknown-commands-registry
feat/mcp-identity-metadata
morlvps/issue_cleanup
codex/installer-redesign
morl/roadmap-investigation-core
morl/roadmap-investigation-docs
release-please--branches--main--components--rea
rea-agents-6.8.0
rea-agents-6.7.0
rea-agents-6.6.0
experiment/atomic-codemode-wait-runtime-20261016
rea-agents-6.5.0
rea-agents-6.4.0
rea-agents-6.3.0
rea-agents-6.2.0
rea-agents-6.1.0
rea-agents-6.0.0
rea-agents-5.0.0
rea-agents-4.1.0
rea-agents-4.0.1
rea-agents-4.0.0
rea-agents-3.2.1
rea-agents-3.2.0
rea-agents-3.1.0
rea-agents-3.0.0
rea-agents-2.7.0
rea-agents-2.6.0
rea-agents-2.5.1
rea-agents-2.5.0
rea-agents-2.4.0
rea-agents-2.3.0
rea-agents-2.2.0
rea-agents-2.1.0
rea-agents-2.0.0
rea-agents-1.7.0
rea-agents-1.6.0
rea-agents-1.5.0
rea-agents-1.4.0
rea-agents-1.3.0
rea-agents-1.2.0
rea-agents-1.1.0
rea-agents-1.0.0
rea-agents-0.5.0
rea-agents-0.4.0
rea-agents-0.3.0
rea-0.2.1
rea-0.2.0
Labels
Clear labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
Mirrored from GitHub Pull Request
question
roadmap
triage
No labels
area: bridge
area: bridge
area: build
area: build
area: build
area: cli
area: domain
area: evidence
area: mcp
area: native
area: providers
area: runtime
area: server
area: setup
area: tests
bug
design
documentation
enhancement
enhancement
enhancement
experiment
help wanted
i18n
invalid
P0: critical
P1: high
P2: medium
P2: medium
P2: medium
P3: low
performance
provider-request
pull-request
question
roadmap
triage
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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#6467
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @morluto on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8183
Before submitting
Decision needed
When an analyst knows a selector denotes a function, can REA provide an actionable route to its references on providers without a general name inventory, without claiming that the name is unique among all symbols?
Context and evidence
In a real REA 6.8.0 stdio MCP session on macOS arm64, using Kuna 1.986 and a self-built Mach-O,
find_xrefs_to_name({name:"_audit_base64_character"})returnedcapability_unavailablebecause Kuna does not declarelist_names. Its user-facing remediation was only “Choose another analysis or target.”In the same session,
procedure_address({procedure:"_audit_base64_character"})returned0x100000378;xrefs({address:"0x100000378"})then returned0x1000003b0. Kuna's limitations state that its reference walk can omit edges, so this is one observed reference, not a complete runtime caller set. The fixture's source calls that function frommain. No target code was executed.The existing general
find_xrefs_to_namecontract resolves names across the provider's name inventory; Kuna lacks that inventory. Its behavior therefore follows the present capability declaration. The unresolved question is whether an agent who already knows the name is a procedure can find and use the narrower, working path without a generic dead-end error. This is not evidence that a missing name is absent among all symbols.Expected interaction with targets
Read the selected local binary and run the caller-selected provider; no target execution or mutation.
Boundary details (optional)
Keep function-selector resolution separate from exact-name lookup over all symbols. A function can share a spelling with data or other functions; preserve ambiguity and scope rather than silently falling back to the first match. Existing #5908 describes why the general workflow must not choose the first ambiguous address. Kuna's Mach-O function inventory also has known non-function rows (#8168).
Options and tradeoffs
Compare more specific, conditional recovery guidance using existing
procedure_addressthenxrefswhen the caller knows it is a function, an explicit selector-kind in the existing workflow, or leaving the current contract unchanged. Avoid a Kuna-only duplicate xref tool and do not reinterpret an unavailable name inventory as proof of uniqueness or absence. Any changed composition must update capability projection, provenance and per-provider tests.Verification available so far
I have a prototype or observed results
Success criteria and open questions
Exercise function, data-symbol, missing and ambiguous-name cases across supported providers; preserve partial reference coverage, caller-selected scope, ordered errors and CLI/MCP parity. A real agent-selection trace is still needed to measure whether clearer guidance changes behavior.
References
Existing name-ambiguity issue: https://github.com/morluto/rea/issues/5908
Named global and provider comparison on Kuna 1.989
On REA main
9ebbe67eand a source-owned, unexecuted arm64 Mach-O with global_observed_globalat0x100004000, Ghidra 12.1.4find_xrefs_to_nameresolved the global and returned pointer slot0x100004008among its sources in both MCP profiles. Kuna 1.989 returnedcapability_unavailablefor the samefind_xrefs_to_namecall becauselist_namesis not declared; the recovery remained the generic choice of another analysis or target. Direct Kunaxrefswith this name reported no inventory entry and recommended inspecting the target for an address. Using the independently established address returned an empty list because the separately reported stored-pointer rows are omitted by REA (#8510). Thus an address-only handoff addresses name resolution but does not by itself recover this pointer on Kuna. The Ghidra name workflow follows the existing general contract and is an available alternative for this fixture.The target SHA-256
167f7b743182b707705cc06a5318222c82d69b4dd4f19c32213e078f717d4aecremained unchanged. This is one named data case in compact and full MCP, not a claim that every data name fails in Kuna or that either provider's reference inventory is complete. Compared with the older #8396 reproduction, current main's direct Kuna missing-name error identifies an inventory miss and supplies address-oriented recovery for this case.Missing-name MCP control
On #8753 head
e64b3c54b13e6b68a22e482ce1662527a885dfae, the same owned unexecuted Mach-O used in the preceding global-name control was queried with_not_present_92through real stdio MCP in compact and full profiles. Ghidra 12.1.4find_xrefs_to_namereturned{status: "unresolved", reason: "name_not_found"}rather than the CLI resolver's missing-name error; the result preserves the caller's name. Kuna 1.989 returnedcapability_unavailablebecauselist_namesis not declared, with generic recovery. Direct Kunaxrefsfor the same name reported an inventory miss and address-oriented guidance. The fixture digest stayed167f7b743182b707705cc06a5318222c82d69b4dd4f19c32213e078f717d4aecand was not executed. This confirms separate adapter and provider outcomes for one missing name; it does not establish global symbol absence or agent behavior.@morluto commented on GitHub (Oct 31, 2026):
Looping in @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0 for visibility on the Ghidra, Kuna, and REA tool-design investigation.
@morluto commented on GitHub (Oct 31, 2026):
Ambiguous C++ overload and exact-name controls
On REA
b43c329df779708e43ae297f498a844e45d9c923, I built an unexecuted arm64 Mach-O withaudit_over(int)andaudit_over(long), plus a caller that invokes both.llvm-nmand disassembly independently identify the two entries and calls. Real REA/Ghidra 12.1.4 and REA/Kuna 1.986 stdio MCP both returned twosearch_procedures("audit_over")rows, then rejectedprocedure_address("audit_over")as ambiguous with both exact addresses.xrefson the selected addresses returned their respective call sites (0x100000428and0x100000434); Ghidra additionally returned other reference rows. Kuna retained its limitation that its walk can omit references, so these are observed sites, not a completeness claim.The general
find_xrefs_to_name("audit_over")rejected ambiguity on Ghidra and returned capability unavailable on Kuna. A function-scoped recovery must therefore preserve both candidates and require address selection, rather than silently using one. The exact Mach-O symbol spellings__Z10audit_overiand__Z10audit_overlresolved to their respective addresses in Ghidra but were not found by REA/Kuna; direct Kunafunctions --json --filter audit_overreturned the same short name for both and onlysub_...aliases. This is one observed symbolized C++ case, not proof that every raw symbol is unavailable or that the provider inventories are equivalent.The target SHA-256
bce7eb96e644a202eaa0fb1e709f0e82d2ea6389c52244ae87433c0cf8039d74was unchanged after these probes. No binary was executed. Missing-function and global-data selectors were also refused byprocedure_address; that refusal does not establish absence of a data symbol.@morluto commented on GitHub (Oct 31, 2026):
Existing Mach-O export-to-address recovery
The overloaded fixture above has an existing route that does not require Ghidra. On REA
b43c329df779708e43ae297f498a844e45d9c923,rea inspect-machoreturned the exact__Z10audit_overiand__Z10audit_overlexports at0x1000003f8and0x100000408. In a real REA/Kuna 1.986 MCP session on the same target,inspect_macho({detail:"complete"})returned the same normalized facts, and passing each returned address toxrefsfound its respective call site. The same procedure on the exported_audit_globaladdress returned two address-only references; the export row alone does not establish a function or reference kind.The Mach-O result identifies the selected arm64 image and target digest and explicitly marks the merged
nm/dyld_infoexport inventory non-exhaustive. Kuna's reference results separately warn that references can be omitted. This is an analyst-directed join of exact exported names and addresses for this one symbolized fixture, not an automatic, complete, all-symbol or cross-image lookup. CLI and MCP normalized inspection output matched; their Evidence IDs differ because the CLI recorded an explicit input path while the MCP call used the open target. Target SHA-256 stayed unchanged; it was not executed.This narrows the design question: guide users toward existing exact exported-symbol evidence when it applies, while retaining symbol scope, slice and reference limitations; do not silently equate arbitrary function and data names or treat a missing export as absence.
@morluto commented on GitHub (Oct 31, 2026):
ELF exported-symbol handoff and PLT controls
I compiled an unexecuted x86-64 ELF shared object containing exported C++ overloads and a caller. On REA
b43c329df779708e43ae297f498a844e45d9c923,inspect_native_exportsreturned_Z10audit_overiand_Z10audit_overlwith ELF values0x1430and0x1440, typefunction, and complete dynamic-export coverage for this fixture. It separately identified the exported global as typeobject; its documented scope excludes non-exported symbols.In real Kuna 1.986 MCP, the two implementation entries were at those ELF values, but exact mangled
procedure_addressselectors failed andxrefson the implementations returned empty. Independent LLVM disassembly shows the caller invokes local PLT stubs at0x14a0and0x14b0, rather than directly calling those bodies. Both providers reached the matching stub intrace_call_path; both returnednot_reachedfor the body in the call-only graph. That result does not prove the body is unreachable or establish dynamic binding. Kuna stub pseudocode described an indirectjump-as-call; its call graph excludes jump edges.Ghidra 12.1.4 instead mapped the implementation to
0x101430and stub to0x1014a0.procedure_infoidentified the stub as a thunk with target0x101430, and outgoing references included a computed jump there.address_to_file_offset(0x101430)returned1072, corroborated by the ELF load segment and independent LLVM inspection. Supplying the unrebased export value0x1430to Ghidraxrefssucceeded with an empty list, while a separate file-offset query reported no initialized file-backed memory there. A mapped interior address also returned empty xrefs, whereas the mapped implementation had references. Thus an export value must be joined to the selected provider's coordinate context, not forwarded blindly.The fixture's
R_X86_64_JUMP_SLOTrows name the corresponding exports. That is static relocation evidence, not proof of a runtime binding; interposition and loading remain unknown. The target SHA-256fddfbee55ec830b6d8c79d25655be208473857878f0670a8151f42947b122f07remained unchanged. This one shared object and host do not establish general ELF or provider coverage.@morluto commented on GitHub (Oct 31, 2026):
Ghidra file-offset mapping control
On the same ELF shared object, a real Ghidra 12.1.4 MCP
inspect_native_load_image({detail:"complete"})reported image base0x100000and a.textmapping from source file offset1072to analysis address0x101430. Its independent verification status wasunsupportedfor ELF, so these are Ghidra's load observations, not independently verified mapping claims. The selected artifact SHA-256 matched the export observation.Using the source file offset
1072established from the independently inspected ELF program headers,procedure_pseudo_code({procedure:"file-offset:0x430"})returned the sameaudit_over(int)body as the exact analysis address0x101430and exact mangled selector. Its Evidence explicitly recordedfile_offset: 1072,mapped_address: "0x101430", andprocedure_address: "0x101430". A bare0x430also succeeded by the documented address-then-offset fallback; a bare ELF symbol value0x1430failed after being interpreted as a file offset, with guidance to inspect mappings. These are one image's observations, not a fixed-base mapping rule.I also ran the suggested CLI
inspect-native-load-image <path> --provider ghidra --jsonwith the configured JDK: it succeeded, although command help emphasizes--format json. The target hash remained unchanged and it was not executed. This supports explicit file-offset selection when the caller has independently established that offset; whether REA should provide an integrated ELF-symbol-value conversion remains the design question. Related selector ambiguity: #8178.@morluto commented on GitHub (Oct 31, 2026):
Further real-provider controls on current main
6e9ee97a69cb16c7150d8b550e705cba055ee4f0clarify the existing alternatives:xrefs({address:"_evaluate"})succeeded and returned the same address-only result asxrefs({address:"0x100000430"}). An inventory data nameglobal_countalso succeeded and matchedxrefs({address:"0x100004000"}); the Evidence locations record the resolved addresses. Both named queries also succeeded throughrea xrefs. Kuna's explicit reference-discovery limitation remained present._audit_globalwas absent from Kuna's inventory and namedxrefsfailed; the exact exported address worked. A shared overloaded function name was refused with both candidate addresses, not silently picked. The associated misleading failure/recovery wording is tracked separately in #8396.xrefsaddress parsing, butfind_xrefs_to_nameresolved its exact data symbol and returned references. CLIrea xrefsresolved that Ghidra data name; the ambiguous overload was refused. Thus the provider-specific namedxrefsroute is useful when a Kuna inventory name is already known, but cannot be presented as a provider-independent or globally exhaustive exact-name lookup.All successful MCP replies used the fetched compact output schemas, and each target's SHA-256 remained unchanged. One macOS host and two fixtures were tested; no autonomous agent-selection outcome is claimed. This suggests any recovery guidance should mention its conditional inventory/provider scope and keep the general
find_xrefs_to_namecontract distinct.