mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 07:47:29 +00:00
[GH-ISSUE #8283] [Bug] Native value trace conflates page omission with traversal truncation #6522
Closed
opened 2026-11-01 21:11:53 +00:00 by bsakaguchi
·
8 comments
No Branch/Tag specified
main
release-please--branches--main--components--rea-agents
release-please--branches--main--components--rea-agents--release-notes
codex/procedure-reference-stacked
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#6522
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 31, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8283
Originally assigned to: @kaoru0822-kitauji on GitHub.
Before submitting
Area
MCP or agent integration
Observed behavior
trace_native_valuesconflates node-page omission with traversal truncation intruncated. Its last page hastruncated: truewhether the whole graph was explored or a node/edge budget stopped traversal. In the tested node- and edge-cap casesnext_offsetwasnull,unknownswas empty, and the only budget limitation was a generic list of possible limits. The caller cannot tell from the final page whether the assembled pages exhaust the explored graph or a traversal budget stopped collection early.Reproduction
Using real Ghidra 12.1.4 over stdio MCP on a source-owned arm64 Mach-O, open the target and trace
_evaluatewithmax_depth: 1,max_functions: 4,max_call_sites: 20:max_nodes: 100,max_edges: 200,limit: 100, the result has 19 nodes, 17 edges,truncated: false,next_offset: null, and no unknowns.limit: 3andoffset: 18, the last page has one node,total_nodes: 19,truncated: true,next_offset: null, and no unknowns. Walking all seven pages recovered all 19 node IDs and 17 edges for this fixture.max_nodes: 5,max_edges: 200,limit: 3,offset: 3, the last page has two nodes,total_nodes: 5,truncated: true,next_offset: null, and no unknowns. Withmax_edges: 1,max_nodes: 100,limit: 3,offset: 12, the last page similarly reportstruncated: true, no next page and no unknowns; the trace has 14 nodes and one edge.max_depth: 0andmax_functions: 1reported explicit call-depth and decompilation-budget unknowns respectively. Unpaged node- and edge-capped requests also returnedtruncated: truewithout a specific unknown.These are one fixture and host. The default output is not claimed to be truncated on arbitrary targets. Pagination re-runs analysis; no cross-mutation snapshot consistency is claimed here.
Expected behavior
Expose separately whether the returned page omits retained graph rows and whether the underlying traversal was incomplete, with specific observed truncation reasons where available. An agent should be able to decide whether to follow
next_offset, increase a particular budget, or treat the examined graph as exhausted. Keep explicit unknowns, bounded allocation, existing usable rows and per-page provenance. This is a proposed contract improvement; the current single boolean is what was observed.Impact and scope
Without a distinct traversal-completeness result, a consumer assembling pages cannot reliably decide whether the assembled graph is complete under the requested depth and other limits. Node and edge
total_*fields count retained rows, not an independently known total beyond a cap. CLI behavior, other providers, output-byte limits and interruption are untested.REA version
b43c329df779708e43ae297f498a844e45d9c923(source build). The relevantNativeValueTrace.tsis unchanged atorigin/main23de10bb2849cdce8ddbe70504aa7cc57de75a98; that later revision was not runtime tested.Runtime and platform
Node 24.22.1, macOS 26.3 arm64, Ghidra 12.1.4, JDK 21, MCP compact output schema profile.
Target and artifact context
Self-built arm64 Mach-O executable, SHA-256
ffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2d, unchanged after analysis. The binary was not executed.Interface
MCP
Earliest failure stage
Transport or result projection
Relevant output or evidence
On the normal last page and the two capped last pages, the common structured fields were
truncated: true,next_offset: null,unknowns: []. Source:NativeValueTrace.tssetstruncatedfor traversal caps and also sets the returned boolean when a page is shorter than the collected nodes. The caller-visibletotal_nodesandtotal_edgesare lengths of the collected arrays.Additional context
The fixture's
evaluateconditionally calls a noinlineadjustfunction that reads a volatile global. Related but separate Evidence-source issue: #8282.@morluto commented on GitHub (Oct 31, 2026):
Looping in @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0 for visibility on the REA tool-design investigation.
@morluto commented on GitHub (Oct 31, 2026):
Existing test coverage
The real Ghidra
verifyNativeValueE2edoes test the real CLI and stdio MCP graph and binding semantics, but requests a singlelimit: 5000trace; it does not assemble multiple pages or compare page omission against traversal caps.There are separate simulated-port tests in
NativeValueTrace.test.tsfor a paged parameter node and a node-cap omission. Both currently expecttruncated: true, matching the existing overloaded field. They cover graph/budget behavior, but cannot establish the distinction proposed here. If the result contract changes, update those assertions rather than keeping conflicting semantics. A real-provider regression can walk the small fixture's pages, compare against a larger-limit trace, and separately exercise node and edge caps; do not require a large production binary.@morluto commented on GitHub (Oct 31, 2026):
TypeScript MCP SDK schema controls
At REA
b43c329df779708e43ae297f498a844e45d9c923, the installed TypeScript MCP SDK 2.3.1 connected to four real stdio sessions: Ghidra 12.1.4 and Kuna 1.986, each under the full and compact advertised output-schema profiles. Each session listed 100 tools in the selectedsession,direct,enhanced,applicationfamilies. Calls supplied the server-advertisedtoolDefinitionto the SDK.Across those sessions, 22 successful open/close, full/paged/node-capped value-trace, and Ghidra byte-search responses passed SDK output-schema validation. Ghidra returned 19, 3 and 5 nodes for full/page/capped controls; Kuna returned zero nodes with its explicit missing-def-use unknown. Six malformed or unsupported requests returned normal tool errors. The SDK skips output-schema validation for
isErrorresponses; these are not error-schema validation passes.As a separate control, an intentionally incompatible client-side output schema caused the SDK to reject a successful
binary_sessionresponse, while the same kind of incompatible schema did not validate a tool-error response. The target SHA-256 remained unchanged and the binary was not executed. This demonstrates schema compatibility for these particular responses, not semantic completeness or all clients/tools; in particular, a schema-valid trace can still have the completeness issue above or the cached-source issue #8282.@morluto commented on GitHub (Oct 31, 2026):
Paging/session-change control on the same unexecuted Mach-O, real REA
b43c329/ Ghidra 12.1.4 MCP: trace_evaluateatlimit:3, offset:0, then obtain offset 3 and an unpaged graph. Rename its callee_adjusttoaudit_mutated_calleein the active ephemeral Ghidra database, then repeat offset 3 and the unpaged graph. All calls succeeded and the target hash remained unchanged.The pre/post full traces each had 19 nodes and 17 edges. Their node IDs and graph payloads matched when per-item Evidence IDs were excluded; the source IDs changed after the metadata edit. Thus this particular rename did not demonstrate mixed graph contents or missing rows. Results already state that pagination reruns analysis; they do not promise a pinned graph across session edits. Also, #8282 independently causes source IDs to differ between cold and warm requests, so an ID difference alone cannot reliably establish that the underlying graph changed.
A future paging-completeness design should state which analysis state pages describe and avoid implying that arbitrary pages from different mutable sessions are one snapshot. A stronger regression would need a permitted operation/fixture that actually changes graph facts and an explicit consistency contract; this control does not establish such behavior.
@morluto commented on GitHub (Oct 31, 2026):
Real CLI adapter control on the same source-owned, unexecuted arm64 Mach-O and Ghidra 12.1.4 (
rea trace-native-values, REAb43c329): four independent CLI invocations all exited 0.truncatednext_offsetunknownsThe summarized values match the earlier MCP controls for these same requests. Each CLI invocation started independently; this comparison does not establish page consistency across mutable sessions. The target hash stayed unchanged and the binary was not executed. The CLI currently lacks the trace snapshot/closure options discussed separately in #8285.
@morluto commented on GitHub (Oct 31, 2026):
Small-graph diagnostic using one page
A bounded recovery control on real REA
b43c329/ Ghidra 12.1.4 MCP used the same unexecuted fixture and session. For each last page, I preserved the original traversal budgets and requested a second trace atoffset:0,limit:<reported total_nodes>:All three last pages had
next_offset:nulland no per-item unknowns. This is a useful diagnostic for these small, stable requests: when every retained node fits in one response, the one-page result removes page omission from the same Boolean and reveals whether the implementation observed a traversal cap. It is not proof that static analysis discovered every possible dependency; provider limitations and unknowns still matter. Totals count retained nodes, which may already have been capped.Limits: it reruns analysis, so an edited or otherwise changing session is not pinned; it transfers the whole retained graph; output-size limits may still prevent a response. The input schema caps
limitat 5,000: a real request withlimit:5001was rejected with an explicit maximum, so this technique cannot cover larger retained graphs in one call. It does not solve the general API ambiguity or the separate missing source-Evidence IDs in #8282. The target hash remained unchanged and no target ran.@morluto commented on GitHub (Oct 31, 2026):
Real-provider follow-up for merged #8309 on REA
2d5dec26c31662764c9adfe3ff996174901b8d49, macOS arm64, Node 24.22.1 and Ghidra 12.1.4. Through the real stdio MCP client, an uncapped_evaluatetrace returned 19 nodes and 17 edges withpage_truncated:false,traversal.status:complete. Walking seven three-node pages in the same unchanged session reassembled the same ordered node IDs and the same edge topology. Each page correctly reported page omission and a complete traversal, including the last page. Withmax_nodes:5, both pages reported traversal truncated formax_nodesand a located node-budget unknown; withmax_edges:1, all five pages reportedmax_edgesand an edge-budget unknown. Advertised compact output schemas were validated by the TypeScript MCP SDK for successful calls.Four independent real CLI processes also returned the expected distinctions for full, final page, node cap, and edge cap. Fixture SHA-256 was unchanged and the target was not executed. This covers the named caps on one fixture/host; it does not establish all truncation reasons or page consistency under edits. The separate warm source-Evidence closure issue #8282 was still observed and is not resolved by the pagination fix.
@morluto commented on GitHub (Oct 31, 2026):
A potential reintroduction is under review in PR #8297's new CLI summary view: https://github.com/morluto/rea/pull/8297#issuecomment-6547543524. On real Ghidra, the complete retained trace correctly distinguishes page-only omission from a
max_nodestraversal cap, but the new projected summary exposes only the combinedtruncatedboolean, notpage_truncatedortraversal. The full bundle retains the fields and the node-cap unknown remains visible; this is a summary-projection gap, not a regression in current main's complete trace. The PR's synthetic fixture also needs the now-required fields when combined with current main.