mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8350] [Bug] Successful batch decompiles lose per-item provider provenance #6557
Open
opened 2026-11-01 21:12:13 +00:00 by bsakaguchi
·
4 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#6557
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/8350
Before submitting
Area
Native analysis or decompilation
Observed behavior
A successful
batch_decompileitem does not retain which provider observation produced its pseudocode or that observation's item-specific limitations. If Kuna's background export becomes ready during a batch, repeated selections can legitimately receive different answers; the batch-level caveat does not identify which occurrence used the single-function result.Reproduction
On REA
60149282fcfc05ac32fbc94434c107710120da6f, macOS arm64, and real Kuna 1.986, I used a self-built, unexecuted Mach-O where0x100004000is the writable data symbolglobal_countbut Kuna includes it in its function inventory (#8168). An owned wrapper synchronized the real provider commands: it helddecompile-projectuntil the first single-functiondecompilefinished and delayed a later single-function call to allow the project export to complete. This is test scheduling instrumentation, not a normal release configuration or evidence of natural frequency.A real MCP call selected
["0x100004000", "0x100000430", "0x100004000"]. It returned orderedok,ok,error; both repeated items had the same resolved address. The first contained single-function pseudocode with anUndefinedInstructionExceptionwarning; the final item returned null-pseudocodecapability_unavailableand an item-level caveat that the completed project had no body for that entry. A subsequent individual call confirmedraw_result.source.kind: project-export,state: ready, and null for the entry. The first item had no source or own limitations. The batch Evidence carried a single-function/whole-program-prototype caveat at the aggregate level, butraw_resultwas null andevidence_linksempty.I observed this sequence in two compact-schema runs and one full-schema run, each with a fresh isolated cache and the scheduling wrapper. Successful responses passed the SDK validator after fetching the advertised catalog. A batch-only Evidence bundle contained just the batch record; export and import into a fresh target-free server preserved that record exactly. The fixture SHA-256
ffad1b70c6a5a7ef3f7c3f59126be516520210777d949b35e97c9067f272aa2dwas unchanged. The wrapper identifies itself as version 1.986; REA'sverified_releaseis a version match and does not authenticate the wrapper bytes.Expected behavior
Retain an actionable association between each successful item occurrence and its producer observation or its relevant limitations, including an explicit unknown when source identity is unavailable. Preserve ordered duplicates and the actual differing observations. Decide whether compact item provenance, retained source Evidence links, or another bounded workflow best supports this task; do not imply all providers use the same source or silently replace results.
Impact and scope
An agent can see the aggregate caveat and both outputs, but cannot determine from the batch alone which successful item came from the single-function path. This is an evidence association gap, not a claim that the repeated outputs must be identical or that the first item was executable code. The first pseudocode's warning is itself present. No autonomous-agent behavior, naturally occurring timing frequency, other provider, or behavior of all mixed batches was measured.
REA version
60149282fcfc05ac32fbc94434c107710120da6fRuntime and platform
Node 24.22.1; macOS arm64; Kuna 1.986 behind an owned scheduling wrapper; TypeScript MCP SDK 2.3.1.
Target and artifact context
Owned arm64 Mach-O; static analysis only; no target execution or mutation.
Interface
MCP
Earliest failure stage
Transport or result projection
Relevant output or evidence
items[0]:status: ok, same resolved address, pseudocode withUndefinedInstructionException, no itemlimitationsor source.items[2]:status: error,provider returned null pseudocode, with its own no-body caveat. Batch limitations separately include the single-function caveat; the successful item and aggregate Evidence have no link to the source observation. Counts:total: 3,succeeded: 2,failed: 1. The later individual null Evidence records a ready project-export source.Typed outcome or recovery expected
Preserve provider source/limitations for each occurrence or an inspectable retained reference, with bounded output and honest unknowns. Keep existing failed-item caveats, input order, duplicates, partial errors and successful pseudocode.
Analysis or suspected cause
Source inspection:
EnhancedTools.#batchPseudocoderetainsobserved.value.limitationson the null-pseudocode branch, but its successful branch returns only selector, procedure, status and pseudocode. The composed workflow aggregates provider limitations and does not retain per-item source Evidence in this case. Any solution should address the observation owner rather than parse the caveat text.Additional context
Related #8226 fixed missing per-item failure caveats; this report concerns successful-item provenance in a batch crossing a provider-state transition. #8168 tracks the separate function-inventory misclassification, #8191 representation changes, and #8260 per-file producer provenance in directory exports. Last known good: NOT_ENOUGH_INFO. Test real single/project paths, duplicate selectors, successful neighbors and failures, offline Evidence, SDK schemas, and cancellation or partial-result boundaries before changing the contract.
Looping in @gensokyo-dev @kaoru0822-kitauji @N0zoM1z0.
File-offset mapping control
A separate real Ghidra 12.1.4 control makes the successful-item provenance gap concrete for coordinates. A
batch_decompileitem forfile-offset:0x430succeeded while its preliminary procedure lookup was unknown; the individual decompile reported file offset 1072 mapped to procedure address0x100000430. The unmodified batch did not retain that producer selection. See #8178 for the selector semantics and the batch-only versus separately requested observation controls.I exercised the earlier unmerged source-Evidence prototype on the same fixture, using its existing isolated checkout based on
60149282fcfc05ac32fbc94434c107710120da6f: the successful item included a source Evidence ID, and a batch-only export contained the linked source record with the exact mapping. It survived import into a fresh target-free MCP server, with source pseudocode equal to the batch item. The source record'sinspect_analysis_viewsummary returnedunsupported_target, so I retrieved it from the complete bundle; the prototype does not yet provide a focused mapping view. The target and bundle hashes were unchanged, and no target was executed. Node 24.22.1, macOS arm64, Ghidra 12.1.4/JDK 21, compact stdio SDK schema validation. One fixture and an older unmerged prototype do not establish current-main behavior or agent usability.This supports retaining the exact producing observation rather than reconstructing a mapping from the failed lookup, but does not make that prototype integration-ready. As noted in the prior prototype evidence, ownership without a recorder, bounded retention/duplication, cancellation, and snapshot source identity need resolution. Do not convert the batch's separate lookup failure into a successful analysis-address lookup or infer broader coordinate equivalence.
On current main
60c0cf977, I repeated the separately requested real Ghidra pseudocode observation and offline bundle import. A summary filtered by its exact Evidence ID returned one complete-record receipt but did not include the offset mapping;inspect_analysis_viewwithnative-observationreturnedunsupported_targetforprocedure_pseudo_code. The complete bundle retained the mapping. This also happened with the older source-Evidence prototype, so source linking and a focused way to inspect that source are separate concerns. The target and bundle hashes were unchanged; compact stdio MCP on one fixture and host, no target execution or agent trial. Documentation clarification: #8480. This is related to #5032; no new runtime capability is claimed.Current public-workflow control
On REA #8485 head
01757d8ec(its changes concern session release guidance), macOS arm64, Ghidra 12.1.4/JDK 21 and real stdio MCP, I repeatedbatch_decompile(["file-offset:0x430"])with the full and compact advertised SDK schemas. In both profiles the item succeeded while its separate procedure lookup was unknown; the batch had no Evidence links and a complete bundle at that point held only the batch record. A subsequent separateprocedure_pseudo_codecall returned the same text and explicitly mapped file offset 1072 to0x100000430; the bundle then held two records. The separately requested observation is not the batch's retained source, and matching text alone does not establish that it was the same provider observation. The source-owned target stayed unexecuted and its SHA-256 was unchanged. This is one selector and target; it does not resolve resource-capacity, snapshot, cancellation or retained-source ownership questions for a fix.Inline observation experiment
An unmerged, disposable prototype based on main
293db94ddplaced each completed provider observation's selector, provider, analysis profile, raw result, locations and limitations alongside its batch pseudocode, without creating a second complete Evidence record. In real Ghidra 12.1.4 stdio MCP, the full and compact advertised schemas accepted the item and its source included the exactfile-offset:0x430to0x100000430mapping. A batch-only bundle contained one record; after import into a target-free server the entire batch, including that mapping, matched exactly. The static target and bundle hashes were unchanged.On real Kuna 1.986, a deliberately gated launcher made the first two pseudocode items come from single-function runs and the third from the completed project export. The inline observations recorded those respective sources and per-item limitations, with compact SDK schema validation and an unchanged, unexecuted fixture. This is controlled scheduling, not an estimate of natural frequency.
This is not a proposed final contract or integration-ready implementation. The prototype's provider-subject shape initially failed SDK output validation; its temporary broad JSON schema is not an acceptable typed contract. Profile and limitation data are repeated per item; payload cost has not been measured. Source-record links, subject normalization, capacity and cancellation behavior, CLI, and snapshot interactions remain to be designed and verified. The experiment shows that retaining the decisive mapping and source inline is a possible alternative to duplicating each entire pseudocode record; it does not establish that either approach is best.
A further real-Ghidra snapshot control saved the experimental batch with one workflow entry and one Evidence record, reopened the same target and snapshot, and repeated the MCP batch. Both observations contained the same inline file-offset mapping, but their nested lookup diagnostics had different Ghidra run IDs and the second result lacked a snapshot-replay limitation: this was a fresh provider observation, not proof of workflow replay. The target and snapshot hashes were unchanged. On this fixture the raw JSON encoding of one inline source object was 3,572 bytes, including 1,660 bytes of profile and 1,037 bytes of limitations, while the selected pseudocode was 203 bytes. Those are serialized sizes for one observation, not a token, time, CPU or memory benchmark. Repeating the whole profile and common caveats per item is a material design concern; consider shared, explicitly associated observations while preserving item-specific facts and avoiding invented source identities. No direct
batch-decompilecommand appeared in the current CLI catalog; no CLI batch parity is claimed.Shared-context experiment
A second unmerged prototype groups equal provider/profile/subject/limitations observations once per batch and associates each completed item with its group index, while retaining its own provider selector, raw result and locations. On the real Kuna 1.986 gated three-item control, the two single-function results used one group and the project-export result a second; the item-level raw results still named their respective source. Compact SDK schema validation succeeded and the target hash was unchanged. On real Ghidra 12.1.4, full and compact schemas accepted the file-offset control; a batch-only bundle retained the exact mapping after target-free import.
For the two separate controlled Kuna runs, JSON encoding of only these prototype source fields was 6,579 bytes with repeated inline contexts versus 4,899 bytes with two shared contexts; each had three items. The launchers used different temporary paths, so the sizes are illustrative, not an equivalent-workflow token, latency, CPU or memory comparison. The indirection also adds an agent-facing lookup and the prototype does not yet validate group-index references, settle source-record closure or cancellation/capacity semantics, or cover arbitrary provider subjects and all failure paths. It is not integration-ready. Compare this with a simpler shared provider profile plus per-item caveats, and evaluate the complete agent task rather than serialized bytes alone.
Source ownership and context-reference controls
Using the shared-context prototype with production MCP registration and a simulated provider, a source-free batch returned its inline mapping without an Evidence recorder and did not invent a retained source ID. When the simulated provider supplied a separate source Evidence record, the existing no-recorder boundary refused the call; with a recorder it retained that source and linked it both to the parent and the associated item. This validates those controlled ownership cases, not a real-provider or capacity/cancellation run. The existing loss of a completed workflow on source-publication refusal is separately tracked in #8425.
A temporary canonical-schema check rejects a batch whose item points past the context array. A negative control without that check accepted the same malformed item. In the tested full and compact MCP profiles, the SDK's advertised JSON Schema still accepted the malformed index because it did not carry the cross-field refinement. Any shared-context design must therefore enforce this relationship at the owning boundary and explain it to consumers; advertised schema validation alone is insufficient. The experimental code and tests remain unmerged.
Capacity and cancellation controls
With production MCP registration, a simulated provider, an artificial zero-byte Evidence ledger, and the shared-context prototype, the provider completed its pseudocode call in both controls. With no upstream source record, recording the completed
batch_decompileEvidence failed; with an upstream source record, recording that source failed first. Both returned a typed capacity error without the completed batch, and neither retained an Evidence record. The same controls passed against unmodified main293db94dd, so this loss is not introduced by the prototype. This extends the scenario discussed in #8425; the zero allowance is fault injection, not a production-frequency claim.A separate gated simulated-provider MCP control cancelled while the second of two pseudocode calls was active, after the first had completed. The client request rejected, the provider observed cancellation, and the ledger contained no batch record. The same control passed on unmodified main. This does not establish real-provider cancellation behavior or a requirement to publish an incomplete batch; #4276 tracks cancellation recovery. Any new item-provenance contract should define whether partial completed items are intentionally recoverable rather than implying they were retained.
A subsequent real-provider control used Kuna 1.986, macOS arm64 and compact stdio MCP on the existing source-owned Rust fixture. A caller-owned scheduling launcher held the project export until the first single-function decompile finished with exit status 0, and signalled when the second single-function process started; the client then cancelled the batch. Against both main
293db94ddand the shared-context experiment, the SDK request rejected, a later complete Evidence bundle contained zero records,binary_sessionremained usable andclose_binarysucceeded. The target digest remained unchanged and the target was not executed. This is controlled process timing and one provider/fixture, not a natural-frequency estimate or a claim that cancelled batches must publish partial results.Integration with source-publication recovery
A disposable, unmerged integration combined the shared-context experiment with #8444 head
e619141b9. Production MCP boundary controls showed that when source retention fails after batch completion, the error contains the unretained source and the completed batch, whose item retains its context association and exact source link; source closure is explicitlynot-established. The existing cleanup-retry and response-limit controls passed on the combination.Real Ghidra 12.1.4 full/compact stdio MCP retained the file-offset mapping; real Kuna 1.986 compact stdio with gated scheduling retained two single-function observations and a project-export observation in their respective contexts. Both static targets were unchanged. These runs do not establish untested providers or agent usability. The combination is not a PR or an integration-ready design: subject/provider-profile cross-validation, reliable advertised context-reference semantics, payload cost, and broader lifecycle/format coverage remain.
Context validation and description control
A later unmerged prototype describes the zero-based item-to-context association, preserves the exact selector passed to the pseudocode operation, and omits the redundant operation name from each item. It reuses Evidence's canonical provider/profile consistency check. With a simulated production MCP registration, the canonical contract rejected both an out-of-range context index and a context with a mismatched provider/profile; the advertised SDK JSON schemas accepted these deliberately corrupted cross-field cases in both full and compact profiles. Correct real Ghidra 12.1.4 full/compact and gated Kuna 1.986 compact outputs still passed the fetched SDK schemas, with the mapping/source distinctions intact and fixture hashes unchanged. This is a prototype and one-host control, not a remedy for other clients or a proof of agent comprehension. Cross-field validation remains the producer's responsibility and the item/context relationship must be explicit in the contract.
Context deduplication controls
The shared-context prototype currently clones and JSON-serializes each context before grouping. A controlled direct-port batch with ten observations alternating two semantically identical valid profiles produced two contexts solely because their parameter keys had different insertion order; their canonical profile digests were equal. This is redundant representation, not a claim about a measured end-to-end performance regression.
An in-memory MCP negative control supplied one valid profile followed by changed parameters with the same claimed digest. The existing whole-context grouping kept the second context visible and canonical output validation rejected its invalid digest. An intentionally unsafe digest-only grouping merged the profiles and the call incorrectly succeeded, hiding the invalid profile. The experimental optimization was reverted. Any more efficient grouping must validate the complete candidate before treating its digest as identity, preserve distinct provider/subject/limitation facts, and account for representation expansion before allocation. These are synthetic provider controls, not a claim about a real provider producing malformed profiles.
Synthetic admission control
On Node 24 with a 128-MiB old-space limit, an in-memory MCP control supplied 48 successful short pseudocode results, each with a distinct synthetic 512-KiB raw provider value. Current main
e5e0dc554returned and retained the batch while discarding those raw values. The unmerged inline-provenance prototype completed all 48 provider calls, then failed ledger authentication with a typed memory-headroom constraint and no completed result; combining it with #8444 did not change that admission stage. At 256 MiB, the prototype retained its result but the full reply exceeded the 10-MiB transport budget. This is deliberately large synthetic metadata, not a measured Kuna/Ghidra behavior or frequency.An immutable-Evidence experiment changed the constrained case to a ledger-capacity refusal with an explicit omitted unretained observation, but still could not deliver the completed batch; that experiment was reverted. A producer design should account for retained raw metadata and representation expansion before allocation, and preserve useful partial results with explicit omissions when complete retention or delivery cannot be established. Item paging is a separate retrieval question in #8498.
Real Ghidra file-offset envelope duplication
On the unmerged batch-source prototype, real Ghidra 12.1.4 returned an 8,992-character pseudocode result for an owned arm64 function selected by file offset. The raw function envelope's
valuewas exactly the same text; its separateselectionpreserved the file offset and mapped/procedure addresses. In the proposed paged item view, requesting raw detail returned that entire pseudocode again even when the pseudocode page limit was 50 UTF-16 units. On this one fixture the JSON raw envelope was 9,203 UTF-8 bytes and itslimitationsandselectionwithoutvaluewere 103 bytes. The target digest was unchanged; these are fixture-specific byte counts, not token or performance measurements.Source inspection shows the Ghidra adapter owns a strict function envelope and supplies it as the raw result when the selection is present. A direct object control reconstructed this specimen's exact envelope from its non-value fields and the identical preserved pseudocode. A producer-owned, explicitly reconstructable representation may avoid duplication, but the shared batch workflow should not guess arbitrary raw schemas, discard evidence, or silently change direct-call raw Evidence. No compact representation has been implemented or validated.
Heap-only admission is insufficient
An unmerged experiment attempted to retain raw source details while live V8 headroom allowed, explicitly marking per-item raw omissions otherwise. Repeating the same synthetic 48-item constrained-heap control five times produced four retained batches with readable omitted-source pages and one separate Evidence-ledger capacity refusal with no retained batch. An earlier repetition also hit authentication headroom. The ledger owns a representation allowance that is separate from the live heap estimate, so this heuristic does not establish a safe reservation or reliable recovery. It was removed; no fixed margin is proposed. Real Kuna/Ghidra small-fixture controls had no omissions, but do not establish safety for larger observations. Consider an owner-authorized accounting/admission contract and explicitly distinguish unavailable raw facts from retained source records.
Naturally mixed parallel batch
On PR #8694 head
96294d70c, real Kuna 1.988 on macOS arm64, a coldbatch_decompileof all 25 inventory entries of an owned 2 MiB arm64 Mach-O (SHA-2568698771cccb98f77e1282b76267c96f6699d86fee548e14c4afef6dd3d571517) withREA_KUNA_JOBS=2returned 22 successful and three failed items in each of compact and full stdio MCP schema profiles. In both runs, the aggregate Evidence contained both the single-function and parallel project-export limitations, indicating both kinds of provider observation occurred during the batch. Successful items carried address, procedure, status and pseudocode, but no per-item source or limitation; a batch-only Evidence export retained one batch record with no source record. No scheduling wrapper was used.In a separate repeat, I called
procedure_pseudo_codefor each successful item after the batch. Each later call identified the completed project export, and all 22 returned text equal to the corresponding batch text on this fixture. Text equality does not establish which source produced an earlier item; the provider observations are source-distinct even where their text happens to match. This is one small synthetic fixture, not a prevalence or behavioral-correctness claim. The target was read, not executed, and its digest was unchanged.This also qualifies PR #8694: aggregate caveats become visible but cannot associate either caveat with a particular successful item when a batch crosses the cold-to-warm transition. Preserve the ordered occurrence and source association without treating a shared cache key as the output's content identity. The compact representation, retention budget and compatibility questions above still apply.
Directory export alternative
On PR #8694 head
96294d70c, real Kuna 1.988 and the same owned arm64 Mach-O, I ran a colddecompile_allwithjobs=2,limit=5, then resumed for five more functions. In both MCP profiles, the resultingdecompile-index.jsonassociated the single-function caveat with three written functions and the parallel-project caveat with seven, with no overlap. Each resumed first-run record matched its earlier parsed JSON and its file's SHA-256 still matched the index; the resume reported five skipped and five newly written. The two runs used separate cache roots and no scheduling wrapper. This is a practical file-writing alternative for preserving per-function caveats when an export directory is appropriate; it does not itself identify the exact producer project (see #8260) or establish general behavior for other targets. Target digest remained unchanged and the target was not executed.Completed standalone batch after project failure
On main
9ebbe67e, real Kuna 1.989 compact and full MCP sessions with the deliberately failed two-function project in #8744 returned two successfulbatch_decompileitems using standalone fallback. The top-level batch Evidence included the single-function and project-failure caveats, but neither successful item carried per-item limitations. A same-session directory export recorded those caveats against each function in its index. The owned target SHA-2560e0ecf82c96e4918ee2ca1287dc25513d8fd13d5ab7fa5b98db00ad342f03930remained unchanged. This tests a uniform fallback batch, not mixed source modes or autonomous-agent use; the fault was deliberately injected.Released 1.989 batch-only retention after project failure
In a fresh main
9ebbe67esession with the controlled all-worker project failure from #8744, I calledbatch_decompiledirectly after the failing assembly request, without separately requesting individual pseudocode. In each compact and full stdio MCP profile, both batch items succeeded through standalone fallback.get_evidence_bundlereturned exactly one retained record, the batch; itsraw_resultwas null, it had no Evidence links, and neither successful item had a source or item-level limitations. The record's overall limitations included the single-function and project-failure caveats. Thus the retained batch offers no source record to inspect for the individual occurrences in this control. The target SHA-256 stayed0e0ecf82c96e4918ee2ca1287dc25513d8fd13d5ab7fa5b98db00ad342f03930. The project failures were deliberately injected; this is a uniform-source example, not a mixed-source frequency claim or an Evidence export/import test.@morluto commented on GitHub (Oct 31, 2026):
Ordinary function with two successful representations in one batch
A separate small, self-built
no_stdRust arm64 Mach-O exercises actual code functions, rather than the data-symbol control above. It contains_audit_compute,_audit_adjust, a Rust-mangled marker function and an explicitly retainedRUST_BACKTRACEstring; the marker and string are part of the test fixture. With real Kuna 1.986 behind the same owned scheduling wrapper,batch_decompile(["_audit_compute", "_audit_adjust", "_audit_compute"])returned threeokitems. Both_audit_computeselections resolved to0x320, but the first body used Rust-likeunsafe fnsyntax and the third used C-likeint ...syntax. Neither successful item had its own source or limitations; the batch's aggregate caveat mentioned the single-function path.Direct unwrapped
kuna decompile ... _audit_compute --jsonreportedrust-languageand its code exactly matched the first item. An individual REA call after the batch recordedproject-export/readyand exactly matched the third. The controlled wrapper logged the first single decompile completing before the project was released, and delayed the middle call; this schedules the transition, so it is not a natural frequency measurement. A second independently created cache reproduced the same Rust-like/C-like sequence, and the complete batch record survived bundle export and fresh target-free import exactly.As a separate provider control, real REA/Ghidra 12.1.4 returned three successes for the same selectors, with equal first and third pseudocode and a real instruction listing for
_audit_compute. Neither provider output establishes runtime behavior or equivalence between representations. SDK compact output schemas were fetched before the calls; the fixture SHA-256cbaf9827225864c7357b0fe74f52eb491aca503abc86af7f863cab0d4bf9cb80and offline bundle digest remained unchanged, and the target was not executed.This illustrates why successful-item source and representation matter without suggesting that duplicates must be deduplicated, that repeated results must always agree, or that a batch should wait for a project automatically. The independently relevant language/extension discussion remains #8191.
@morluto commented on GitHub (Oct 31, 2026):
Isolated generic caveat-association experiments
I tested two unmerged exploratory changes on REA
60149282, in a detached worktree, using the Rust code and mixed-failure fixtures above. Both consume the shared provider observation's limitations; neither parses Kuna prose or adds a Kuna-specific wrapper.This only addresses caveat association. It does not preserve the exact source Evidence, structured representation/language, or provider export identity; it also has no distinct-caveat/byte budget or index-consistency invariant yet. The table representation needs an explicit contract for empty and unknown caveats, deduplication scope, error items, pagination, authenticated Evidence closure, and compatibility with older clients before it could be considered for integration. Existing inputs/outputs and cancellation behavior require further verification.
For scale context only, I tokenized
JSON.stringify(normalized_result)for the same three-item outputs witho200k_base; the underlying item results were identical after removing the extra fields:These are serialized-result token estimates for two tiny fixtures, not whole-task, host-prompt, latency or memory measurements. The indexed form adds a lookup for the agent; its catalog/schema and retrieval costs were not included. Larger batches, distinct caveats and real clients remain unmeasured.
Compatibility control: two existing MCP boundary test files on the indexed experiment had 19 passing tests and 2 failing exact-result assertions because of the newly added fields (
item_caveatsand/or indices). This does not establish that current SDK clients fail—the tested SDK calls validated—but it demonstrates why shape and migration decisions need review. The experiment is not a proposed final patch; no production or user-worktree files were changed.@morluto commented on GitHub (Oct 31, 2026):
Source-Evidence prototype and ownership limits
I tested a second, unmerged experiment in a detached REA
60149282worktree. It creates aprocedure_pseudo_codesource Evidence record for each completed batch observation when one is not already retained, links it from the composed batch, and attaches the source ID to that item. This is generic observation plumbing; it does not interpret Kuna's raw source fields. It is intentionally exploratory, not an integration-ready proposal.On the scheduled real-Kuna Rust fixture, the first and third successful
_audit_computeitems pointed to different retained records: the first recordedsingle-function, the thirdproject-export. Each source's pseudocode exactly matched its item, and all three item source IDs appeared in the batch links. A fresh target-free server imported the batch bundle and recovered all three source records from the complete bundle. A real Ghidra control reused the same source ID for the two equal repeated_audit_computeobservations. The mixed Kuna no-body control retained the failure caveat and linked its null observation. Successful real-Kuna MCP calls passed both advertised full and compact SDK schemas; Ghidra was checked with compact. The target digest was unchanged; the Kuna source bundle digest was unchanged during offline replay.There are substantial unresolved costs and failure modes:
o200k_basetokens), while the exported bundle grew from 4,415 bytes / one record to 13,247 bytes / four records, including 605 pseudocode characters repeated in source records. These are two small serialized examples, not peak-memory, latency, full-task or model-prompt measurements.invalid_request, andinspect_analysis_viewon a pseudocode record returnedunsupported_target. The unfiltered complete bundle did contain the source data. Thus an ID alone is not yet an efficient agent handoff; this extends the selective historical-Evidence question in #8307.capability_unavailablewith the existing “requires an explicit retention owner” explanation. Adding source records unconditionally therefore changes behavior for adapter registrations that cannot retain them; an applicable fallback or explicit contract decision is needed. The suite's two Ghidra routing tests passed. Snapshot replay identity, error/partial-source closure, bounds, full client compatibility and final-cleanup cancellation remain unverified.The evidence points toward designing source retention and retrieval and ownership together, rather than simply adding IDs or retaining every body. The earlier indexed-caveat experiment has a different tradeoff: it preserves a bounded association only if a budget is designed, but cannot establish exact producer identity. No production or user-worktree files were changed.
@morluto commented on GitHub (Oct 31, 2026):
A separate #8352 investigation shows why successful-item attribution affects a possible recovery design. In an isolated unmerged experiment allowing explicitly selected, unclassified addresses, a real Kuna cold batch contained one statically called code address and one known data address. Both items reported success; the batch-level limitations retained two different section/classification caveats, but neither successful item associated itself with its own caveat. Individually querying each address returned its specific caveat. After the project export completed, both batch items instead returned no-body errors with item-level limitations.
The producer delay was deliberately controlled; this does not measure natural frequency. Details, source provenance, offline Evidence checks, and substantial reasons the experiment is not production-ready are at https://github.com/morluto/rea/issues/8352#issuecomment-6547382727. This is an interaction between the existing batch issue and an exploratory route, not a claim that current main allows these rejected data-region addresses.