mirror of
https://github.com/morluto/rea.git
synced 2026-11-05 06:45:22 +00:00
Open
opened 2026-10-15 18:26:54 +00:00 by bsakaguchi
·
7 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#647
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 @pablodiazjorge on GitHub (Oct 11, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/1947
Before submitting
Decision needed
Should
compare_functionsadd a separately labelled, address-normalized view of the pseudocode and assembly text, keeping the exact dimensions as they are, so that two builds which only shift addresses stop reporting every function aschanged? If so, which masking rules should it declare, and should provider-specific name forms be defined at the provider boundary or in the domain normalization?Context and evidence
Observed (rea 6.4.0, Ghidra 12.1.4, native Windows 11 x64): on Ghidra's own version-tracking exercise,
WallaceSrc.exeagainstWallaceVersion2.exe,compare_functionswith theanalyze_functionEvidence of both sides reports every textual dimension aschangedfor all three compared functions, includingaddPeople, whose source did not change:addPeople(unchanged in source)initializePeople(changed)changed, 639 → 639 characterschanged, 583 → 493changed, 1,174 → 1,216changed, 2 → 2changed, 2 → 0changed, 5 → 5unchangedchangedchanged, 9 → 10 blocksDerived: only the control flow graph, which
normalizeCfgmaps to local block indices, separates the real changes from the noise. The textual dimensions differ because address-derived names (FUN_…,DAT_…,LAB_…) and absolute addresses shift between the two builds; identical lengths and counts on both sides of the control function point to that.From the source:
compareTextcomparesdossier.pseudocodeand the joineddossier.assemblyas exact strings. The assembly dimension declares "Assembly is opaque provider text; relocation normalization is unavailable."; the pseudocode dimension declares no limitation, although the same shift affects it.isAutoNamealready recognizes address-derived procedure names, andnormalizeCfgalready relativizes addresses for the graph.Inference: an agent that reads
changedwith identical counts can easily report a behaviour change that is only a relocation, which is the opposite of what a diff is for.Boundary and invariants
functionComparisonDimensions.ts,functionComparisonNormalization.ts); it works on provider text that is already in each dossier, so no provider or bridge change is needed.% 3must stay visible.Options and tradeoffs
changedfor relocation-only differences, and agents must know to rely on the graph.pseudocode_normalizedandassembly_normalizeddimensions: rename address-derived identifiers to per-function ordinal placeholders (consistently on both sides) and replace absolute addresses inside the image with offsets relative to the function start, then diff. Additive and explicit, at the cost of two more dimensions and new goldens.Option 2 looks like the best fit for REA's additive, evidence-preserving style, but the choice is yours.
Success criteria and open questions
Success: on a pair of builds that differ only in layout (for example, the same source with one extra function linked first), the normalized dimensions report
unchangedfor every function while the exact ones keep reporting the shift; on the Wallace pair,addPeopleisunchangedin the normalized view and the two edited functions staychanged.Open questions:
FUN_,DAT_,LAB_,PTR_, string labels; IDAsub_,loc_,off_; Hopper), and whether that list belongs to the provider boundary.References
src/domain/functionComparisonDimensions.ts(compareTextand the assembly limitation)src/domain/functionComparisonNormalization.ts(normalizeCfg,isAutoName)I can provide reproducible x86 and x64 PE pairs built with llvm-mingw (relocation-only and real-change cases) and run them against real Ghidra 12.1.4 on Windows for whichever option you prefer.
@Zburgers commented on GitHub (Oct 11, 2026):
I'd like to take this on and prepare a focused PR for #1947.
I reviewed the current comparison pipeline (
functionComparisonDimensions.ts,functionComparisonNormalization.ts,functionComparisonSchemas.ts,functionComparisonResults.ts, and the comparison/MCP tests). I agree with option 2: add explicitly labelled normalized pseudocode/assembly dimensions, while preserving the existing exact dimensions and their meanings.Proposed approach:
unknown, with explicit limitations; make masking rules discoverable in the Evidence.check:fast/check, and report any real-Ghidra verification that is unavailable.One contract question before I implement that surface: would you prefer adding
pseudocode_normalizedandassembly_normalizedas two dimensions (expanding the current fixed-length eight-dimension array), or exposing them as separate, optional normalized views to avoid affecting existing summary/overall statuses? My inclination is additive and opt-in/clearly labelled, never redefiningchangedfor exact text.If this boundary and direction look good, I'll proceed with the PR. Happy to adjust the representation or provider-specific masking policy first.
@pablodiazjorge commented on GitHub (Oct 12, 2026):
Thanks for picking this up. On the contract question, my preference would be separate, optional normalized views: they keep the existing eight dimensions and the summary statuses exactly as they are, so nothing that reads
changedtoday changes meaning, and an agent opts into the normalized view explicitly. Once your PR is up, I can build relocation-only and real-change PE pairs (x86 and x64, llvm-mingw, reproducible) and run them against real Ghidra 12.1.4 on Windows, including the Wallace pair from the issue, and post the results there.@pablodiazjorge commented on GitHub (Oct 12, 2026):
@Zburgers, thanks for taking this on. I ran your branch against real Ghidra on Windows, as offered in #1947. @Jax367, part of this bears on #2088 too (see the end).
Setup. Head
ad7327ac1, built on Windows 11 26H2 x64 (non-elevated), Node 22.22.3, Ghidra 12.1.4, Temurin 21. Each binary gets its own MCP session foranalyze_function; the second session runscompare_functionswithinclude_normalized_views: true.Wallace, real run of your fixture. It matches your table:
addPeopleisunchangedin both normalized views (7 address-derived identifiers masked, 2 visible addresses on each side), andinitializePeopleand the gadget function staychangedin every view.Reproducible pairs.
fixtures/compare-pairsbuilds one C file in three variants with llvm-mingw 20261006, stripped, for x64 and x86 at -O0 and -O2.reloconly shifts the layout.changeadds two real edits:changed_constanttests% 4instead of% 3, andchanged_callcallsother_helper(value * 9 + 1) instead ofhelper(value * 7 + 3). The function addresses come from an unstripped rebuild whose code for the three functions is byte-identical to the stripped binaries.Relocation only (
baseagainstreloc): exact pseudocode and assembly arechanged, and both normalized views areunchanged, for all three functions in all four builds (12 of 12).Real changes (
baseagainstchange), normalized pseudocode / normalized assembly:unchangedchanged_constantchanged_callIn every pair comparison
callsisunknown("Address-derived callee or caller names cannot be matched safely."), andcfgisunchangedforchanged_callexcept at x86 -O2.The gap: a changed call target reads as no change. At -O0,
FUN_140001490(param_1)andFUN_140001510(param_1)both becomeFUN_#1(param_1), andCALL 0x140001490andCALL 0x140001510become the same placeholder. The normalized views sayunchanged,callsisunknownandcfgisunchanged, so no dimension reports that the function now calls different code. It only shows when the decompiler happens to print the callee's body: at x64 -O2 the function is a tail-call thunk and Ghidra decompiles the target (* 7 + 3against* 9 + 1), while the assembly view (JMP 0x…) still readsunchanged; at x86 -O2 Ghidra folded the callee into the body.This is the limitation the views already declare (ordinal placeholders do not keep which address-derived symbol a site referenced). On stripped binaries, though, calling a different function is one of the most common behavior changes between builds, and here it is the case no dimension catches.
@Zburgers, how to handle it is your call. Two additive directions, in case either fits:
helperandother_helperwould then mask to different tokens, while a relocatedhelperkeeps its token.unknowninstead ofunchangedwhen it masked a call target andcallscould not resolve it, so an agent does not read equality where the tool cannot know.@Jax367, for #2088: the same data backs your note that equal CFGs establish only equal block sizes and successors.
changed_callkeeps anunchangedCFG in three of the four builds while it calls different code, so that wording holds up on real Ghidra.Happy to rerun either branch on a revised head; the pairs rebuild with the same hashes on any machine.
@batteryshark commented on GitHub (Oct 13, 2026):
@Zburgers @pablodiazjorge , my rekit Diaphora adapter uses an approach that may help with the changed-callee case reported above(https://github.com/morluto/rea/issues/1947#issuecomment-6122664833).
The distinction is that a replacement token identifies a cross-build function match, rather than a call’s position within the caller.
build_token_map consumes Diaphora’s matched function pairs and builds separate address→token maps for each binary. Both addresses in a pair receive the same token, using the primary function’s name or a synthetic
FN_<match-index>when it is anonymous.normalize_pseudocode replaces an address-derived identifier only when that address appears in the map. Otherwise, it preserves the original identifier.
That gives two useful behaviors:
helper→helpermatch normalizes identically despite relocation.helpertoother_helperretains distinct tokens when those targets have distinct matches. Unmatched addresses remain visible instead of becoming the same “first callee” placeholder.The relevant regression tests are:
This depends on the quality and ambiguity of the supplied matches; normalization does not establish callee identity itself. Preserving unmatched addresses also leaves relocation noise unresolved, which is preferable to hiding a possible target change.
For REA, I’d suggest sharing a callee token only when correspondence is supported by evidence. Where correspondence is unresolved, preserve the reference or mark that aspect of the normalized view
unknown.I mostly focus on Hex-Rays pseudocode, not Ghidra assembly, so your stuff might need some tweaking.
@pablodiazjorge commented on GitHub (Oct 13, 2026):
Thanks @batteryshark, that's a useful distinction. In the pairs I ran on #2124, the current rule (the normalized view becomes
unknownwhencallsis unknown and a callee was masked) traded falseunchangedresults for coverage: 7 of the 12 relocation-only comparisons that were correctlyunchangedbecameunknown, because Ghidra reportscallsas unknown for every function in these stripped binaries. A match-based token map would keep those 7 comparable where the callees can be paired, and keepchanged_calldistinct, since its new callee is a different function.The open question for rea is what pairs callees when there are no names. In these binaries the only evidence is the callees' own bodies, so a pairing would have to come from something like an address-normalized digest of each callee, and it has to see through thunks: at x64 -O2 the changed call goes through a
JMPthunk whose target only appears inthunk_target. Unpaired callees would then stay as addresses or mark the view unknown, as you suggest.The pairs build reproducibly from rea-lab's
fixtures/compare-pairs(one command, the same hashes on any machine), so anyone can rerun them. @Zburgers, if you try this, I can rerun them on Windows with real Ghidra.@Zburgers commented on GitHub (Oct 14, 2026):
@pablodiazjorge @batteryshark I agree with the distinction: shared tokens should represent supported cross-build matches, not independently assigned callee positions.
I’ve now run PR #2124 at
8cde66673through real Ghidra 12.1.4 on Windows. Full results are on the PR.The conservative guard eliminates false
unchangedresults in all eight changed-call views, including the x64 -O2 thunk assembly case. Three views reportchanged; five remainunknown. Constant edits are detected in all eight views, and Wallace matches expectations.The cost is substantial: only 4/12 relocation-only comparisons remain
unchanged; 8/12 areunknown. So this addresses the correctness gap but does not fully meet the issue’s original relocation-coverage goal.I haven’t implemented or tested matched-callee tokens. I think a separate experiment should consume explicit callee Evidence, handle thunk targets and ambiguous matches, and use these same fixtures to measure recovered coverage alongside false equality results. An address-normalized body digest could be a matching signal; it should not establish identity by itself.
Would you prefer landing the conservative opt-in views with this limitation documented, then evaluating matching separately, or treating matching as necessary before landing?
@pablodiazjorge commented on GitHub (Oct 14, 2026):
@Zburgers thanks for running it on real Ghidra with the rea-lab compare pairs. I'd land the conservative opt-in views now: they never report a false
unchanged, which is the property this issue cares about most, andunknownis an honest answer. Please state the limitation where the views are described (on relocation-only pairs, 4 of 12 comparisons stayunchangedand the rest areunknown), so callers don't readunknownas a change. Matching can then be its own issue that consumes callee Evidence and is measured on the same fixtures, reporting recovered coverage and false equality side by side; @batteryshark's distinction fits there.