mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8168] [Bug] Kuna procedure inventory includes Mach-O data symbols as functions #4695
Closed
opened 2026-10-31 00:52:33 +00:00 by bsakaguchi
·
15 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#4695
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/8168
Originally assigned to: @kaoru0822-kitauji on GitHub.
Before submitting
Area
Native analysis or decompilation
Observed behavior
On a self-built arm64 Mach-O,
list_procedureswith Kuna includesglobal_countandmessageat0x100004000and0x100004008.nm -midentifies both as__DATA,__datasymbols; the target also has three actual functions. Kuna 1.833functions --jsonitself includes those data symbols, so this originates in the upstream inventory and REA currently projects its rows as procedure entries. REAdecompile_allselected six entries, wrote three bodies and reported threeno_pseudocodefailures, including those two data symbols and__mh_execute_header.Reproduction
On macOS arm64 with clang, compile a C program containing
volatile int global_count = 3;,const char *message = "REA audit distinctive message";, a noinline helper readingglobal_count, a noinline function calling the helper, andmainreferencingmessage. In an MCP session callopen_binarywith the compiled binary andprovider_id: "kuna", thenlist_proceduresanddecompile_allwith a newoutput_directory. The observed fixture SHA-256 wasffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2d;nm -mand directkuna functions --jsonindependently showed the classifications and upstream rows. This ran once; a different build may produce different addresses or symbol ordering.Expected behavior
docs/kuna-provider.mddescribes a callable inventory, including import slots. Data symbols should not be represented as known procedure entries or be counted as failed decompilations solely because they have no function body. Preserve uncertain classification and genuine import slots; investigate format-aware evidence at the owning boundary rather than filtering by name or zero size.Impact and scope
On this fixture, inventory and overview counts included data and the bulk decompile manifest reported three failures for non-body entries. The behavior of other binary formats, stripped targets and Kuna versions is unknown. This report does not claim the code produced by Kuna is incorrect.
REA version
Source checkout
47fa6ab3795d547207001ffb01643c0aa39dcad8; running server reported 6.8.0.Runtime and platform
Node 24.22.1; macOS arm64; Kuna 1.833.
Target and artifact context
Self-built arm64 Mach-O with globals, a string and a call chain.
Interface
MCP
Earliest failure stage
Native analysis or reconstruction
Relevant output or evidence
functions --json:_adjustat0x100000410,_evaluateat0x100000430,global_countat0x100004000,messageat0x100004008.nm -m:_global_countand_messagein(__DATA,__data).list_proceduresreturned all of the above;decompile_allselected 6, wrote 3, failed 3 withno_pseudocode.Additional release check
On the same fixture, direct Kuna 1.986
functions --jsonalso returned the two data symbols and header in its six-entry inventory. An REA MCP run with that executable returned the same six procedure rows, and the resumeddecompile_allagain wrote three functions and reported threeno_pseudocodeentries. REA labels 1.986 as an unverified release in its analysis profile; this single fixture does not constitute general version verification.@morluto commented on GitHub (Oct 30, 2026):
Further real MCP reproduction on current
origin/main(d48e472fa) plus the Kuna 1.986 baseline branch, macOS arm64 / Kuna 1.986, using the same source-owned Mach-O (ffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2d):search_procedures({"pattern":"global_count"})returnsglobal_countat0x100004000.procedure_pseudo_code({"procedure":"global_count"})returnedvoid global_count(void)with anUndefinedInstructionExceptionat that data address. The Evidence correctly disclosed that this came from the single-function run and that later export text can differ.decompile_allfiltered byglobal_countsubsequently selected one entry and reportedno_pseudocode; its journal says the export has no body for the entry. A directkuna decompile ... 0x100004000 --jsonindependently produced the same single-function pseudo-code.inspect_machoreported that address as the start of the__DATA,__datasection in a segment withinitprot: 3; the independently compiled source defines it as data. Kuna-backedprocedure_info,inspect_native_instruction, andinspect_native_load_imagewere unavailable.This is one observed cold-to-export sequence, not a claim that every data symbol gets pseudocode. It shows that failure counts are not the only impact: an agent requesting the apparent procedure before export completes can receive a successful reconstruction of bytes that are known data. Any mitigation should consider source-backed mapping/section facts and preserve unknowns, imports, and executable mappings rather than assume a section name or successful decompilation proves function identity.
@morluto commented on GitHub (Oct 30, 2026):
A separate owned arm64 Mach-O importing
_audit_transformfrom an owned dylib produced another inventory ambiguity with REA/Kuna 1.986.list_proceduresreturnedaudit_transformat local stub0x1000004b4and again at0x100004000, the start of its__DATA_CONST,__gotsection as observed byinspect_macho. Exact name lookup rejected the two entries as ambiguous and listed both addresses. Pseudocode at the stub rendered ajump-as-call, while pseudocode for the GOT entry returned null. Ghidra separately classified the stub as a thunk to an external symbol. The fixture was not executed and its digest stayed unchanged. This supports preserving section/ownership evidence and ambiguity, not treating every same-named inventory entry as a function body; #8221 tracks the separate cross-library handoff question.@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):
A deliberately adversarial x86-64 ELF control extends the Mach-O observation, but does not show that ordinary ELF
OBJECTsymbols are misclassified. It was source-owned, analyzed without execution, and its SHA-256 remained unchanged. Independentllvm-readelf -l -sshowed:false_funcis declaredSTT_FUNCat linked address0x34a0, but its bytes were deliberately placed in a read/write, non-executable.datasegment.normal_datais a separateSTT_OBJECTthere.no_type_codeis declaredSTT_NOTYPEat0x1401, but the fixture's entry contains a direct call to it. A separateSTT_OBJECT data_in_textfollows it in executable.text. TwoSTT_FUNCsymbols alias the same real code address.Direct Kuna 1.986
functions --jsonlistedfalse_funcas a zero-size procedure, omitted bothSTT_OBJECTnames, and reported the reachableno_type_codeassub_1401with an upper-bound size spanning the adjacent object bytes. Real REA/Kuna MCPlist_proceduresprojected those same four entries. A coldprocedure_pseudo_code(false_func)returnedreturn 0x2afrom Kuna's single-function route; after a completeddecompile_all, the warm query returned null and the directory export recorded oneno_pseudocodefailure for it. Both runs preserve their respective source/limitations. This reproduces the cold/warm inconsistency on one deliberately misleading ELF symbol, not a prevalence claim.Real REA/Ghidra 12.1.4 also inventoried
false_funcas an imported function and returned pseudocode for it. Its load-image observation reported the containing.datablock as non-executable;inspect_native_instructionreportednot-in-listingthere, stating that it did not attempt to decode. The actual decompiler can still return a reconstruction; neither result establishes runtime execution. Ghidra separately listed and decoded the calledno_type_code. REAinspect_native_exportspreserved the file'sFUNC,OBJECT, andNOTYPEdistinctions; the linked Kuna address and rebased Ghidra address differ, so cross-provider joins require verified mapping.This control argues against treating
STT_FUNCalone, a decoded pseudocode body, or an executable-section check as definitive runtime function identity. Preserve the symbol declaration, static mapping/permissions, observed calls and unresolved cases separately; aNOTYPEentry or code in unusual memory is not automatically absent. It does not change the original ordinary Mach-OOBJECTreproduction.@morluto commented on GitHub (Oct 31, 2026):
A downstream call-path control on the same unexecuted Mach-O, now using REA
b43c329and Kuna 1.986:search_procedures({pattern:"global_count"})returned the writable__DATA,__datasymbol at0x100004000, andprocedure_addressaccepted that name.trace_call_path({start:"0x100000480",goal:"0x100004000"})then returnedgoal_status:"not_reached", three visited procedure nodes,truncated:false, and complete relationship coverage for those nodes. Its limitations do say this is a call-kind graph, excluding data edges. A positive control with goal_evaluatereturnedreached.analyze_functionon the global refused it because the export has no code at that address. Ghidra on the same binary rejected it as not a procedure.The negative is about Kuna's reported call graph, not a claim that the global is unused: the source-owned
_adjustreads it, and REA/Ghidra reports the load reference. REA/Kuna xrefs returned address-forming sites, but these are not necessarily accesses to the named object: independent disassembly shows0x1000004a4forms the same page base and the next instruction loads at offset 8. This strengthens the impact of the inventory classification issue without treating call and data references as equivalent. Target and original project hashes were unchanged; the fixture was not executed.For maintainer visibility: @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0
@morluto commented on GitHub (Oct 31, 2026):
A second minimal, source-owned arm64 Mach-O reproduces a concrete downstream consequence with real REA
b43c329and Kuna 1.986.nm -midentifiesaudit_globalat0x100004000as__DATA,__data; both release Kuna and a source-built upstream main list it as a function. On a fresh REA/Kuna cache,search_proceduresreturned it and the firstprocedure_pseudo_codereturned a reconstructed function containingUndefinedInstructionException(3,0x100004000). Its Evidence correctly said this was a single-function result while project export was building. After querying real code assembly and allowing the project export to complete, the same procedure query returnednullwith the explicit limitation that the inventory entry had no body.Both outputs carry their source limitations; the concern is that the initial text is nevertheless successful pseudocode for a writable data object, while the later result is no body. The result is one controlled example and does not establish prevalence or prove that source format symbols alone classify every entry. Fixture SHA-256
4bbf47cc358081b633e7ad377433e3c26525a862a40d87a7429f1746ca380787was unchanged; it was not executed. Upstream producer reproduction: https://github.com/Noelo-Lab/kuna/issues/1339.For maintainer visibility: @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0
@morluto commented on GitHub (Oct 31, 2026):
Higher-level
batch_decompilecontrol on the minimal fixture from upstream https://github.com/Noelo-Lab/kuna/issues/1339, using real REAb43c329/ Kuna 1.986 with separately created empty caches:0x100004000and actual function0x100000410returned twostatus:"ok"items. The data item's text was theUndefinedInstructionException(3,...)pseudocode. Batch-wide Evidence included the single-function/export-building limitation.unreadable_outputitem for the data address. Evidence carried the producer's no-body limitation; the item itself said onlyprovider returned empty pseudocodeand suggested doctor.This demonstrates a task-level consequence of the inventory classification and makes the export-stage difference visible; it is one controlled call order, not a frequency claim. The separate per-item limitation association question is already tracked in #8226. Source-level data classification or explicit uncertainty is preferable to inferring safety from a generic success count or filtering all zero-sized entries.
@morluto commented on GitHub (Oct 31, 2026):
Real CLI control on the minimal fixture from upstream https://github.com/Noelo-Lab/kuna/issues/1339, with REA
b43c329and a newly created Kuna 1.986 cache:rea decompile <fixture> audit_global --provider kuna --format jsonexited 0 with the integer bytes rendered asUndefinedInstructionExceptionpseudocode. Evidence identifiedsingle-functionoutput while project export was building and warned a later result could differ.rea function <fixture> _audit_read --provider kuna --format jsoncompleted successfully using the project export.rea decompilecommand exited 0 withnormalized_result:null; Evidence identified the project export and said the inventory entry had no body.rea decompile <fixture> 0x100004000 --provider ghidra --format jsonexited 1 with an invalid procedure input.nm -mindependently locates the global in writable__DATA,__data.The target SHA-256 was unchanged and it was not executed. This extends the MCP finding to separate one-shot CLI processes and one shared cache; the observed state transition and source limitations do not imply a general cross-provider classification rule or a frequency estimate.
@morluto commented on GitHub (Oct 31, 2026):
The real-provider verification gap is narrower than “no E2E tests.” At REA
b43c329(the inspected verifier is unchanged on the current localorigin/main),verify:kunabuilds symbolized and stripped fixtures and uses the public MCP workflow to verify known procedures, pseudocode, assembly, references, project export, reuse, and cleanup. It identifies its expected procedures usingnmtext-symbol types and checks that those selected addresses are present inlist_procedures; it does not assert that independently identified writable data is excluded or honestly classified. It also does not invokebatch_decompileordecompile_allin this verifier. The existing provider-boundary inventory tests use a controlled fake Kuna inventory, so they do not establish how the real upstream inventory classifies data.The 1.986 real-provider lane passed earlier on this macOS arm64 host, including both fixture variants. That is consistent with the gap: a presence assertion can pass in an inventory containing extra rows. For a separate check I rebuilt the verifier's exact C source without executing the resulting target.
nm -midentified its two marker arrays as__TEXT,__const; direct Kuna 1.986 did not include those arrays in its eight returned rows. Consequently this observation does not establish that the verifier's current fixture reproduces the writable-global failure. The separate writable-global fixture in the reproduction does.A useful regression after deciding the desired contract would add independently identified writable globals alongside real procedures and exercise real public MCP/CLI with a fresh Kuna cache and again after project export, including mixed batch results. Check that data is not presented as a successful procedure body, and that limitations and unresolved classifications remain truthful; retain positive coverage for real functions and callable import slots. Do not equate zero size with data or assume every format has the same section semantics. Supplement with controlled boundary cases only where real-provider conditions cannot be reproduced reliably.
@morluto commented on GitHub (Oct 31, 2026):
Current-main check: on merged REA
a989c0e458c91af177e097abd7be0fd021b0401dwith Kuna 1.986 and a fresh owned cache,search_procedures("audit_global")still returned the known__DATA,__dataaddress. A coldprocedure_pseudo_code("audit_global")returned theUndefinedInstructionExceptionreconstruction fromsingle-function; after an assembly request completed the project export, the same request returned null with the project-export source and no-body limitation. The real fixture's hash was unchanged and it was not executed.Direct Kuna auto-disassembly provided another useful upstream control: selecting the exact global address returned
kind: code, whereas an explicit range beginning at the same address returnedkind: dataand a non-executable-section note. Details and controls are in upstream #1339. REA does not call that auto-disassembly path in this test; this is not a proposal to add a raw CLI wrapper or assume section membership proves function identity.@morluto commented on GitHub (Oct 31, 2026):
A visibility control and likely upstream producing boundary: on a new owned Mach-O with two globals in the same
__DATA,__datasection,dyld_info -exportsidentified onlyaudit_exportedas exported; the other global had hidden visibility. On current REAa989c0ewith Kuna 1.986,search_procedures("audit_")returned the exported data global and real reader function, but not the hidden data global.inspect_machoindependently returned the exported global in the export inventory; a cold decompile of it returnedUndefinedInstructionExceptionpseudocode. The fixture was not executed or modified.Source inspection suggests why: Kuna's Mach-O loader appends export records to its function-symbol stream without first establishing that each export is callable. The relevant source and a matching direct control on the latest tested upstream build are documented at upstream #1339. This is evidence for fixing classification at its producer; it does not justify treating every export as a function or every symbol in a data section as definitely non-callable.
@morluto commented on GitHub (Oct 31, 2026):
A controlled upstream intervention now supports the suspected producing boundary for this fixture: using two separately built
d85e7ccKuna CLIs, identical except that the diagnostic variant suppresses the Mach-O export append, current REAsearch_procedures("audit_")returned the data global only with the unmodified CLI; both returned the known code function. Both source-built executables reported 0.1.0/unverified to REA, and each caller-owned launcher supplied the same compiled SLEIGH tree. The target was unchanged and not executed. Details and limitations are in upstream #1339.The suppression was an experiment, not a candidate fix: exported function discovery must remain intact, including where other symbol sources are absent. This reinforces fixing or exposing producer-owned classification rather than filtering REA results by names or assuming section membership alone proves callable identity.
@morluto commented on GitHub (Oct 31, 2026):
Real shipped-binary first-use control on REA
60149282fcfc05ac32fbc94434c107710120da6f, Kuna 1.986 and macOS arm64: Homebrew Brotli 1.2.0libbrotlicommon.1.2.0.dylibSHA-2563426742c78df5c3b523071df603f07f2bb8dea6bd8e65c366a2c6adf2bf0a3ad.nm -gmplaces two exported symbols at0x11c4and0x122cin__TEXT,__const; the upstream source declares the first as a range array. Ghidra's load-image observation marks the__constblock non-executable, whileinspect_machoretains both exports (with non-exhaustive export coverage). Export names alone do not establish function type.In a fresh Kuna session,
search_proceduresandprocedure_addresstreated the table entries as procedures. A coldprocedure_pseudo_code(0x11c4)returned a successful single-function reconstruction containinghalt_baddata()and an explicit bad-instruction warning. A cold batch of the two tables plus_BrotliGetDictionaryreported 3/3 successful, with the two warned table bodies. Afterprocedure_assemblywaited for the project export, the same table returned null with an explicit no-body limitation; the same batch then had twocapability_unavailableitems with per-item caveats and the real function succeeded. Separate CLI invocations with an empty cache and the prepared warm cache showed the same respective text/null outcomes, both exit 0. The cold/warm behavior is timing and export state on this sample, not a frequency claim.Ghidra's procedure lookup rejected the data addresses while its
list_namesretained the imported label;read_bytesat0x11c4returned the expected initial table bytes. Both direct Kuna release and upstreamd85e7ccexhibited the inventory issue (Noelo-Lab/kuna#1339). MCP successes were SDK-validated against compact schemas. The file hash was unchanged, and it was not executed. An initialinspect_machocall incorrectly includedpath; the format observation above comes from a corrected separate call.@morluto commented on GitHub (Oct 31, 2026):
Further real-provider check on REA main
60149282, Kuna 1.986, and Homebrew Brotli 1.2.0libbrotlicommon.1.2.0.dylib(SHA-2563426742c78df5c3b523071df603f07f2bb8dea6bd8e65c366a2c6adf2bf0a3ad): in the same Kuna MCP session,search_proceduresreturns_kBrotliPrefixCodeRangesat0x11c4and_kBrotliContextLookupTableat0x122c. The provider-independentinspect_machosucceeds and reports those exports plus__TEXT,__constbeginning at0x11c4and spanning both addresses. The export records do not themselves include symbol type. The enclosing__TEXTsegment has execute permission, so filtering function candidates on segment execute permissions would not catch this example. These facts provide an analyst a way to investigate, but REA does not connect them or warn on the returned procedure entries in this workflow.Separately, a logging-only build of upstream Kuna main
957a1eecidentified both original symbols asData, size zero, then showed both arriving asExportat the function-inventory boundary before their addresses were seen. The same build's JSON exactly matched unmodified upstream main. Source shows the export append and function-symbol insertion. This diagnoses this sample, not every source of dubious procedure entries. Related upstream report: https://github.com/Noelo-Lab/kuna/issues/1339.The target digest remained unchanged. The MCP check exercised REA's published tools with the released Kuna provider; upstream instrumentation was a separate direct Kuna check. Avoid assuming every export is code or that every symbol in an executable segment is a function. Any proposed cross-provider classification needs to preserve uncertain cases and legitimate exported code.
@morluto commented on GitHub (Oct 31, 2026):
Real Kuna validation of proposed PR #8335 is recorded at https://github.com/morluto/rea/pull/8335#issuecomment-6547264405. The change fixes the ordinary data-symbol fixture and a shipped Brotli table control, but a constructed Mach-O with a statically called instruction sequence in an executable segment's unflagged section is omitted and categorically refused as data. The same real Kuna session reports it as a callee. This is one static counterexample, not an estimate of prevalence or runtime reachability; it illustrates why a section declaration and callable evidence need distinct treatment. The PR's existing simulated-provider boundary tests pass but do not cover that combination.