rea/tests
Matt Van Horn 2a78763e20
feat(native): search analyzed memory for masked byte patterns (#2341)
* feat(native): search analyzed memory for masked byte patterns

The diff adds search_bytes to the CLI, the shared MCP contract, Ghidra
inventory, and the headless bridge, and advertises the same operation on
Hopper as unavailable until that provider is verified. Patterns are
hexadecimal byte pairs with optional ?? wildcards and an optional
equal-length bit mask; the TypeScript boundary and the bridge both
require a nonempty pattern, equal lengths, and at least one constrained
bit. Ghidra walks initialized blocks in address order within inclusive
bounds, keeps overlapping matches inside a single block, and returns
each hit with its segment, unique source file offset, and containing
procedure, continuing through a cursor bound to the target, profile,
pattern, mask, and bounds. Each page reports the inclusive ranges
examined and the skipped uninitialized blocks; cancellation returns a
typed error and discards the active Ghidra database.
address_to_file_offset now uses the same unique-offset helper, which
rejects a mapping that is missing, ambiguous, or larger than a safe
integer.

* fix(native): limit unbounded byte search to loaded memory

Without start or end, search_bytes walked every Ghidra block, including
non-loaded file parts such as .symtab and overlay blocks, which the docs
call out of scope. Unbounded searches now skip those blocks and list them
in searched.skipped_not_loaded; explicit bounds in their address space
still search them. Document that a match must end at or before end.

* fix(native): preserve implicit address spaces in range consumers

* fix(native): reject present malformed byte search state

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-13 23:41:45 +08:00
..
acceptance fix(javascript): keep spread child argv counts unknown (#2748) 2026-10-13 23:36:35 +08:00
boundary feat(native): search analyzed memory for masked byte patterns (#2341) 2026-10-13 23:41:45 +08:00
composition fix(tests): clear lint and typecheck errors on main 2026-10-13 22:32:01 +08:00
conformance docs: move translated READMEs under docs/readme (#2165) 2026-10-13 22:25:32 +08:00
evaluation test(evaluation): grade managed agent fixture facts (#1924) 2026-10-13 23:34:17 +08:00
fixtures feat(native): search analyzed memory for masked byte patterns (#2341) 2026-10-13 23:41:45 +08:00
process-global test(adb): isolate cross-platform activity launch regressions (#2226) 2026-10-13 23:30:18 +08:00
support test(cli): preserve Windows runtime paths and failure diagnostics 2026-10-12 15:46:42 +08:00
ciTestSequencer.ts ci: finish main validation and balance complete test costs 2026-10-13 18:54:05 +08:00
processOwnershipRunner.ts test(process): retire native caches at worker teardown 2026-10-09 04:12:49 +08:00