mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
[GH-ISSUE #8218] [Design] Find short or encoded markers outside provider string inventories #6495
Open
opened 2026-11-01 21:11:38 +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#6495
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/8218
Before submitting
Decision needed
How should an agent find a known short marker or explicitly encoded literal when it is absent from the selected provider's string inventory, without confusing byte matches with defined strings or forcing an unbounded whole-program scan?
Context and evidence
On macOS arm64 with REA
53a4ab78451a0654e9c3beb3d43a5e371a288fcc, Ghidra 12.1.4 and Kuna 1.986, a self-built, unexecuted Mach-O contained an isolated ASCIIQZ7\0, a longerQZ7_LONG_MARK!\0, and UTF-16LE bytes for日本\0.search_strings({pattern:"QZ7"})returned only the longer string with both providers;search_strings({pattern:"日本"})returned no rows. Both disclosed their different inventory limitations. This is expected given the observed inventories, not a claim that these tools promised exhaustive raw-byte search.strings --encoding all --min-length 3 --no-xrefs --jsonreported the three-character ASCII row; with its five-character minimum it returned only the longer row. Direct Kuna--encoding utf16 --min-length 2did not find the non-Latin wide literal on this fixture.search_byteswith exact ASCII and UTF-16LE byte sequences located both in initialized memory, including file offsets and coverage. REA/Kuna reportedsearch_bytesunavailable. These are byte matches; their text interpretation comes from the known fixture, not from a Ghidra defined-string observation.xrefsfor the short marker returned no sites, while pseudocode for the fixture's indexing function showed address-plus-index expressions. Empty exact references therefore did not establish that the literal is unused. No runtime behavior was observed.The target digest was unchanged and both sessions closed successfully. This is one fixture, not a prevalence, correctness or performance benchmark.
Expected interaction with targets
Read caller-selected static image bytes and, where applicable, query an existing static-analysis provider. No target execution or modification is proposed.
Boundary details (optional)
Separate raw file bytes, initialized provider memory, defined strings, decoded candidates and inferred use. Preserve selected encodings/termination, exact artifact/slice and address mapping, bounded ranges/pagination, completeness and unknown reference coverage. A literal query may be a substring of a longer string; do not replace existing provider inventory semantics or claim a byte match proves a string or a code use. Low minimum lengths can cause very large inventories and different cache/identity costs.
Options and tradeoffs
Improve discovery of the existing Ghidra byte-search fallback; consider a bounded task-oriented literal/encoded-byte search usable with a verified local image mapping; or consider a caller-selected narrower Kuna candidate scan when semantics and resource bounds are established. Compare these against #8170 and existing file-layout evidence. Do not add a provider command wrapper or lower every default inventory threshold solely for parity.
Verification available so far
I have a prototype or observed results
Success criteria and open questions
Exercise three-character, long-substring, encoded, unterminated and false-positive bytes; mapped/file-only/uninitialized boundaries; exact versus interior references and unknown use; both providers and partial/error cases. Measure representative whole-task cost before changing an inventory policy. A controlled agent trace is needed to establish discoverability impact.
References
REA Kuna string policy,
search_bytescontract, #8170 (Kuna byte-reading boundary), #8184 (feature trace coverage), and #8190 (outgoing-reference semantics).Explicit provider recovery for an encoded literal
On macOS arm64, I tested an isolated, manually conflict-resolved combination of #8817's catalog wording and #8567 head
b282fece7. With a source-owned, unexecuted Mach-O and real Kuna 1.990 / Ghidra 12.1.4, both compact and full MCP profiles followed a caller-driven UTF-16LE task: Kunasearch_stringsreturned no match; its unavailablesearch_bytesresponse directed candidate discovery; completebinary_sessionshowed Ghidra available, target-supported, and declaring byte search; explicitly selecting Ghidra found the known byte sequence at0x1000003b0with file offset 944. An exported bundle retained the original empty Kuna search Evidence exactly. Target SHA-256ab0b231c1480722ebbd6d61a020d8f8b39928c94f471ea0ec23b33559d408ee5was unchanged. A byte match is not a defined string or proof of use.This validates one local combination and explicit handoff, not automatic provider switching, a naturally selected agent workflow, unavailable-Ghidra recovery, or an automatic merge. It does not resolve broader mapped-image/encoding questions in this issue.
Termination and non-text candidate control
On #8817 head
50ba6cb22a242a60f7e4bd12fc74c05ec91191ab, real Ghidra 12.1.4 on macOS arm64 and a separate source-owned arm64 Mach-O,search_stringsforQZ7returned no defined-string rows in either compact or full MCP.search_bytesfor51 5a 37returned two initialized-memory matches: one embedded in the deliberately non-text bytes13 51 5a 37 85 c7 fe 42, and a separate51 5a 37 00sequence. Searching for the four bytes including the terminator returned only the latter. A separateread_bytesreturned13515a3785c7fe42515a3700for the 12-byte surrounding region in both profiles. The hit rows preserved addresses, file offsets and searched/skipped coverage; both had no containing procedure. The test's source establishes intended bytes, not runtime use or string classification by Ghidra. Target SHA-256b151ae528adfe2fd8b7a8c9507070275258de02d87eddc10e323dd9456ce6755was unchanged and it was not executed. This supports the wording that byte hits are not defined strings, and shows that caller-selected termination can narrow candidates; one constructed fixture does not establish false-positive rates or general completeness.@morluto commented on GitHub (Oct 30, 2026):
A controlled x86-64 ELF exercises termination, encoding, file-only and alignment boundaries on Kuna 1.986 and REA/Ghidra 12.1.4. Targets were not executed and their digests stayed unchanged.
RAW4bytes occurred once followed byffand once by NUL. Direct Kunastrings --encoding ascii --min-length 3 --termination any --no-xrefsreturned both, marking only the latter NUL-terminated;--termination nulreturned only the latter. Bounded REA/Ghidrasearch_bytesfor52415734returned both addresses; including00returned only the NUL-ended occurrence. These are byte candidates, not proof of text use. The--no-xrefsoutputs intentionally did not examine references.éclairwas returned by direct Kuna's UTF-8 mode at its true start; ASCII mode returnedclairfrom two bytes later. REA/Kuna's default string search returned the UTF-8 value; REA/Ghidra's defined-string search did not, but Ghidra byte search found its known bytes. An unrelated ASCII candidatee,gcame from byte pairs within the UTF-16LE Japanese literal, illustrating that a printable run is not necessarily the intended text interpretation.unallocated_0among skipped blocks. A zero search restricted to.bssexamined zero bytes and listed the block as uninitialized despitecomplete:truefor the initialized-memory search. Independent LLVM headers establish these fixture boundaries; this is not an exhaustive file-search or runtime claim.WIDERat odd address0x20017dor even address0x20017e. With minimum length five, direct Kuna--encoding utf16and--encoding alland real REA/Kunasearch_stringsfound the aligned value and omitted the odd-address value. REA/Ghidra defined-string and exact-byte searches found both. This controls the minimum length, while the different files and surrounding layouts limit causal certainty. Pinned Kuna source and test explicitly keep UTF-16 units on even addresses; the omission is a producer coverage boundary, not evidence of an upstream defect. REA currently notes Latin-range UTF-16LE and that other text can remain undiscovered, but does not name this alignment limitation.These controls reinforce keeping encoding, termination, byte extent, scan domain and unknown coverage visible, with user-selected bounds. They do not establish prevalence or performance. Related #8245 asks separately about loaded versus metadata string provenance.
@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):
Provider-aware recovery control with real REA
b43c329MCP, Ghidra 12.1.4 and Kuna 1.986 on the original source-owned short/encoded-string Mach-O:search_stringsdescription says that at a known addressread_bytesandxrefsinspect bytes and references.binary_session(detail:"complete")reports all three relevant tools (read_bytes,search_bytes,xrefs) available for Ghidra, but reports the first twoprovider_missingfor Kuna whilexrefsremains available.search_strings({pattern:"日本"})returned no rows under either provider with their respective inventory limitations. At known address0x3e4, Ghidraread_bytesreturned the six initialized bytese5652c670000, andsearch_bytesfound that address with file offset 996. The source fixture establishes the intended UTF-16LE interpretation. Kuna returnedcapability_unavailablefor both byte operations; its exactxrefsreturned no rows with its explicit incomplete-reference limitation.The generic catalog guidance is valid only when the selected provider offers the operations; discovery already exposes that distinction, so this is an agent recovery/discoverability question rather than a claim that Kuna promised byte reading. A switch to Ghidra can be useful when explicitly available and selected, but it is not a transparent fallback: it changes the bound provider and can retire live session edits (#8289). Keep byte matches distinct from strings and runtime use. Both sessions closed and the unexecuted target's hash was unchanged.
@morluto commented on GitHub (Oct 31, 2026):
Additional encoding and project-selection control on macOS arm64, with the public MCP tools, Ghidra 12.1.4 and verified Kuna 1.986. The unexecuted Mach-O contains
alpha-ΟΣ-betaas UTF-8 and UTF-16LE; target SHA-25635ece1208b6299e6d4c426da84439c15a88a08caecc088d1f0fda39f33310bd3was unchanged.US-ASCIIstrings with replacement characters, and did not list the non-Latin UTF-16LE text.search_stringsandtrace_featureforΣreturned no matches, while preserving the existing limitation that an empty defined-string search does not establish absence from the artifact. Ghidrasearch_byteswith the independently known full UTF-8 and UTF-16LE sequences found the respective byte locations in initialized memory. Byte observations alone do not prove text interpretation or use.alpha-UTF-16 fragment;search_stringsandtrace_featurematched both UTF-8 rows with case-insensitiveΣ,σ, orς. Case-sensitiveσdid not match the uppercase text. This is consistent with the reported Latin-range UTF-16 scanning limit.alpha-ΟΣ-betainventory rows; both search and trace matched the three insensitive sigma forms, and the sensitive controls behaved as expected. A second UTF-8 occurrence remained US-ASCII with replacement characters. REA reported the selected project provenance; all 10 source-project files were byte-identical before and after the REA session.This suggests that discovery guidance should cover misdecoded defined data as well as absent or undefined strings, while preserving the provider's recorded encoding and the difference between an explicit byte interpretation and an existing project definition. It does not establish the intended source-level encoding for arbitrary binaries. The tested REA build was #8368 head
0ebfcabf; successful MCP outputs were checked against full advertised schemas. One fixture and host are not a prevalence or general encoding-coverage measurement.Follow-up: Ghidra
search_stringsdrops the encoding and length even for correctly defined strings; this distinct producer-boundary defect and itstrace_featureimpact are tracked in #8374.