Commit Graph
38 Commits
Author SHA1 Message Date
Entrpi 7ce99121bb fix(rizin): bound the version banner as printed before trimming it
The probe trimmed the first line before applying its 2,048-byte budget,
so a line with more than 2,048 bytes of leading whitespace before a
valid banner lost that prefix unrecorded and was identified, with
provider_version_banner_truncated false, although the documented budget
covers the banner line. The budget and the recorded banner now cover
the line as printed; only identification reads a trimmed copy.
2026-11-01 16:07:20 +11:00
Entrpi 4e1a46b63b fix(rizin): run the found executable when it cannot be read for hashing
When the lookup found an executable that the hash could not read, such
as a native binary with mode 0111, identification fell back to the bare
command name. The command then searched PATH again instead of running
the file the lookup selected, so another executable could answer, and
Evidence lost the path that was observed. The fallback now keeps the
found path for the launch and as provider_executable_path, without a
SHA-256 or probe. The flag that keeps these facts on a launch failure
is renamed from probed to observed, since it now also covers a lookup
whose hash failed.
2026-11-01 15:44:53 +11:00
Entrpi a6cb0974fc fix(rizin): keep the probe's identification when the command fails to start
After a successful -v probe, a command that failed to start, such as an
oversized command the host refused with E2BIG, returned its typed error
without the tool, version, path, SHA-256 or banner the probe had
observed: only Evidence carried the identification, and these failures
build none.

The identification now records whether a probe ran. When one did, the
launch failure keeps `provider` and the provider_* parameters in its
diagnostics; the Evidence limitations, which describe command output,
stay out. A probe that is cancelled or whose cleanup is incomplete
keeps the executable path and SHA-256 it ran from. An executable that
was not located or could not be read adds nothing, since nothing about
it was observed.

A real-process MCP test probes a fake rizin, then fails the launch with
a real E2BIG (a 2 MiB command) and with ENOENT (the probe removes the
executable after a banner that identifies no tool). The probe
cancellation test checks the path and SHA-256. The guide says where the
facts appear.
2026-10-31 10:31:00 +11:00
Entrpi 3badf82d43 fix(rizin): accept only the -v banner Rizin and radare2 print
The banner pattern ^(\S+) (\d\S*) read any first line with a digit token
as an identity, so `Warning: 123 …` became tool "Warning:", version 123.

identifyRizinTool now accepts only the first-line form Rizin and
radare2 print: a plain tool token, a version, any build tokens, then
`@ <os>-<arch>-<bits>` and an optional `, <package>` suffix. The real
banners on this Mac fix the form: Rizin 0.9.1 (Homebrew) prints
`rizin 0.9.1 @ darwin-arm-64, package: 0.9.1_2 (Homebrew)`, and radare2
6.1.8 prints `radare2 6.1.8 +0 abi:110 @ darwin-arm_64`. Anything else
is unrecognized, with the assumed identity and the probe's diagnostics;
a well-formed radare2 banner keeps its non-Rizin limitation. The guide
gives the form.

Tests cover `Warning: 123 …`, a status line before the banner, a banner
without the @ suffix, and the real Rizin and radare2 banners. Two
fixtures that printed `@ test` as the platform now print a real form.
2026-10-29 05:52:27 +11:00
Entrpi b2bb11050a fix(rizin): identify nothing from a banner cut at its byte limit
identify ran on the banner even when boundedUtf8Text had cut it, so a
version token running past the 2,048-byte cut was published as an exact
provider.version.

A real banner is about 40 characters, so one guard is enough: a cut
banner identifies nothing. It becomes the unrecognized outcome, with the
probe's diagnostics and the assumed identity; no separate token parser
is added. The guide says so.

A test cuts a first line inside its version token; the banner-cap test
now expects no version from a cut banner.
2026-10-29 05:30:45 +11:00
Entrpi 0d04c16042 fix(rizin): cut probe banners and diagnostics between code points
The banner and a failed probe's two diagnostic streams were cut at
2,048 UTF-16 code units, so a cut could leave a lone surrogate. REA
already owns this cut: boundedUtf8Text keeps text within a UTF-8 byte
budget without splitting a code point, as other providers' probes use
it.

The banner and both streams now go through it with a 2,048-byte budget,
and provider_version_banner_truncated and output_truncated come from
its truncated flag. The guide states the limits in UTF-8 bytes.

Tests cut an astral banner and astral diagnostic streams at the
boundary; an ASCII banner keeps its 2,048 bytes.
2026-10-29 05:09:45 +11:00
Entrpi dd06ad27ca fix(rizin): probe the executable before every command
A launcher such as a version-manager shim keeps its path and SHA-256
while the tool it delegates to changes, so a reading kept for that path
and digest could name a tool the command no longer runs. A shim's
delegate cannot be observed, so no kept reading can be checked for
freshness.

Every call now probes in its own environment and under its own deadline
before the command, and nothing is reused. The cache, its keep and
replace rules and the outcome scopes that existed only for it are
removed; without a cache, an unfinished probe is reported as failed, and
its diagnostics still give no exit status when output was not fully
collected. The per-call digest stays in Evidence. The guide and the
tool description say each call probes.

On this Mac (Homebrew rizin 0.9.1) a probe costs about 180 ms through
REA's owned-process runner, of which rizin -v itself takes about 15 ms
warm: the price of identifying the answering tool on every call.

A test runs a launcher whose bytes stay the same while the tool it runs
changes, and checks that each call reports the tool that answered.
Tests that only covered the cache are removed; the rest now expect a
probe per call.
2026-10-29 04:33:17 +11:00
Entrpi 9668237460 fix(rizin): keep invalid UTF-8 flags in typed errors' captured output
A cancelled or cleanup-incomplete version probe carried captured output
from execFileFailureCapturedOutput, which dropped the runner's
invalid-UTF-8 flags, so its replacement characters looked like provider
output. The command path's own captured output had the same gap when
cancellation ended a run or a failure was captured.

AnalysisCapturedOutput gains stdout_invalid_utf8 and
stderr_invalid_utf8, set to true only when the runner reported invalid
UTF-8, as command observations mark output_invalid_utf8. The shared
projection fills them through capturedInvalidUtf8, and the command
path's two captured outputs use the same helper, so every consumer of
a runner's failure report keeps them. The guide mentions the markers.

Tests cover a cancelled and a cleanup-incomplete probe, and a command
cancelled during and after its run, each with invalid UTF-8 output.
2026-10-29 04:24:18 +11:00
Entrpi 6cc6a5f9ca fix(rizin): mark the provider as assumed when no banner identifies it
When the -v banner did not match, identifyRizinTool returned Rizin's
identity with no limitation, so Evidence named Rizin although nothing
identified the tool; the limitation qualified only the version and
formats. Failed, timed-out and undecodable probes, and an executable
that could not be located or read, named Rizin the same way.

The Evidence provider schema requires a name, so the tool cannot be
recorded as unknown. The parser now returns no identification for a
banner it does not recognise. Wherever no banner identified the tool,
the service keeps the configured identity, sets provider_identity to
"assumed" and adds the probe's assumed-identity limitation, which the
Rizin probe owns; an identified tool gets provider_identity "banner".
The guide and the tool description say so.

Tests cover an empty first line and a Usage: banner; two composition
tests now count the added limitation.
2026-10-29 04:22:21 +11:00
Entrpi c7053da1d9 fix(rizin): flag invalid UTF-8 in version-probe diagnostics
When -v exited nonzero or timed out with output that was not valid
UTF-8, provider_version_probe kept the decoded text, replacement
characters included, with no flag. Undecodable output's stderr had the
same gap.

The failure capture (execFileOutputFailure) now reads the runner's
stdoutInvalidUtf8 and stderrInvalidUtf8, as it already reads
collectionFailure. The probe diagnostics record them for every outcome
that keeps output, as stdout_invalid_utf8 and stderr_invalid_utf8,
following gdb Evidence's stderr_invalid_utf8. The command path takes its
flags from the same capture instead of reading the owned failure
directly. The guide names the two fields.

Tests cover failed and timed-out probes with invalid stdout or stderr,
undecodable output on both streams, and a failed command whose stdout
is not valid UTF-8, which pins the command path's flags to the capture.
2026-10-29 02:53:34 +11:00
Entrpi 74974b5057 fix(rizin): keep only probe outcomes that describe the executable
A timed-out version probe was kept for its launch path and digest, so a
later call with a longer command_timeout_ms reused it without probing:
its Evidence said the probe reached the command deadline, and the
version stayed unknown until the executable changed. A timeout is a fact
about one call's deadline, not about the file.

Each probe outcome now carries its scope in its type: a reading, a
failed exit and undecodable output describe the executable and are
kept; a timeout and unfinished output describe the call and are not.
The cache accepts only executable-scoped outcomes, so the call site no
longer filters. Both runners report a deadline as ETIMEDOUT, which the
probe checks before any signal, so a stopped probe is always timed-out.

A test times out a probe through the owned runner's deadline failure,
then checks that a call with a longer deadline probes again and reads
the version.
2026-10-29 02:48:49 +11:00
Entrpi dcb9d61611 fix(rizin): bound kept version probes and keep only complete readings
The probe cache kept one entry per launch path and digest and never
evicted one, and a kept banner could be as long as the 16 MiB capture.
It now keeps the latest completed probe per launch path with the digest
it read; a new digest replaces it, and a later failure still never
replaces a successful reading of the same digest. The service reads the
banner (the first stdout line, trimmed), keeps at most 2,048 characters
of it and records provider_version_banner_truncated; the provider's
parser now reads that bounded banner, so everything a probe keeps is
bounded.

A -v output that was not valid UTF-8 was parsed anyway, so replacement
characters could become provider.version. It now leaves the version
unknown, with a limitation saying the output is not valid UTF-8.

An owned probe whose output was not fully collected was labelled failed
when it carried a numeric exit status, and cached. A collection failure
is now checked first: the probe is unfinished, is not kept, and its
diagnostics report no exit status.

Tests cover a digest change replacing the kept probe, a capped banner,
undecodable output and a collection failure that is probed again.
2026-10-29 02:10:52 +11:00
Entrpi ddaecd3c7f fix(rizin): end the call when hashing the executable reaches the deadline
When hashing the resolved executable reached command_timeout_ms,
digestFile rejected with ETIMEDOUT and the service recorded an unknown
identity, then launched the caller's command with a fresh deadline. A
caller-selected, possibly side-effecting command ran after its
preflight deadline had passed.

The hash deadline now returns AnalysisTimeoutError with phase
executable_digest, as the lookup's deadline already did, and the timeout
guidance names executable identification among the phases. A test
stalls the executable's stat past a 50 ms deadline and checks that
nothing runs.
2026-10-29 02:10:39 +11:00
Entrpi c73a0be9c3 docs(rizin): state what the executable digest and version observe
The guide said the command "runs the same file" as the version probe.
REA runs the same resolved path; the recorded SHA-256, tool and version
describe the file there when REA checked it. Say so, with the limit the
guide already states for artifact digests: they cannot prove the exact
bytes executed if the file changes before the launch.
2026-10-28 14:13:46 +11:00
Entrpi 6e8c13edf1 fix(rizin): never let a later probe failure replace a successful reading
Concurrent first calls can each probe the same launch path and digest.
When one probe printed a banner and another later timed out or exited
non-zero, the failure overwrote the cached reading, so every later call
reported an unknown version for the life of the server. Route the cache
write through one rule: a failure never replaces a successful reading,
and a success replaces an earlier failure. Each call still reports its
own probe's outcome.
2026-10-27 23:08:26 +11:00
Entrpi d78bf4357c fix(rizin): probe per call and reuse only completed probes
Sharing an in-flight version probe between callers let a joining call
outlive its own command_timeout_ms and inherit another caller's
cancellation, and the cache was keyed by digest alone, so byte-identical
launchers in different directories shared one reading. Remove the
sharing: each call runs its own probe under its own deadline and
cancellation. Reuse only completed probes (a banner, a non-zero exit or
a timeout), keyed by the resolved launch path and its SHA-256.

The executable lookup now honours the call's deadline and cancellation,
so a stalled PATH entry cannot hang a call or close(). A failed probe
records its exit status and bounded stdout and stderr in
provider_version_probe, and a cancelled probe keeps its captured output
on the error.
2026-10-27 22:49:53 +11:00
Entrpi 512e80e4cb feat(rizin): record which tool and version answered execute_rizin_command
execute_rizin_command recorded version null and labelled any executable
selected by REA_RIZIN_COMMAND as Rizin, although radare2 also accepts
REA's argument list. Before the first command for each executable
digest, resolve the selected executable through PATH, hash it, run it
with -v and read its banner; the command then runs the same file. The
Evidence provider records the tool name and version, and the parameters
record the resolved executable path, its SHA-256 and the banner line.

A tool other than Rizin still runs, with a limitation; a failed, timed
out or unrecognized probe leaves the version unknown. Each digest's
reading, including a failure, is reused for the life of the process, and
concurrent first calls share one probe within the caller's
command_timeout_ms budget. A caller that stops waiting cancels the
probe only when no other caller needs it. A probe whose process cleanup
is incomplete stays retained for retry.
2026-10-27 21:35:52 +11:00
morluto df5c48ffda docs(cutter): explain bridge descriptor discovery configuration 2026-10-24 17:21:08 +08:00
morluto 8328a9559f fix(gdb): keep console recovery available for multiple inferiors 2026-10-24 16:08:26 +08:00
morluto b9212b5979 fix(gdb): preserve configured executable launch recovery 2026-10-24 04:47:45 +08:00
morluto 76381b29d4 fix(objdump): preserve input issues and provider launch failures 2026-10-24 04:06:57 +08:00
morluto cab6527125 fix(rizin): preserve primary outcomes across final cleanup 2026-10-24 04:06:57 +08:00
morluto 60a0acb396 fix(cutter): retain completion-read failures during cleanup retry 2026-10-24 04:05:23 +08:00
morluto f3df653d9b fix(gdb): correlate raw-output completion and retain read-only TTY proof 2026-10-24 03:16:30 +08:00
morluto 57aa21af26 fix(rizin): retain cancellation and recover cleanup correlation 2026-10-24 03:11:07 +08:00
morluto 5bb01ca9a3 fix(gdb): wait for the outer console command to finish
After a running result, queue a tokenized read-only MI query to establish that GDB has returned to its command loop. Keep collecting through intermediate inferior stops and retain the query reply as protocol Evidence.

Fixes #6660
2026-10-23 19:18:47 +08:00
47353e494d feat(config): make the bridge request ceiling configurable (#6376)
* fix(reconstruction): dedupe residual unknown ids with uniqueSorted

Current main calls uniqueBy, which is not defined, so typecheck fails.
Residual unknown ids are strings, and the adjacent lists already use
uniqueSorted.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* feat(config): make the bridge request ceiling configurable

REA_BRIDGE_MAX_REQUEST_BYTES replaces the hard-coded 16 MiB Hopper and
Cutter request payload ceiling. The default stays 16777216 bytes. Values
outside 7464 to 268435456 bytes are configuration_invalid.

Part of #6176.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): keep cleanup ownership when a sent command's reply is oversized

An authenticated command may already have changed the Cutter document
when its reply exceeds the frame ceiling. Return the existing unknown
execution, with the ceiling diagnostic in the message, so receipt
cleanup still waits. A frame that overflows before the command is sent
remains a resource constraint.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* style: format the bridge request ceiling sources

oxfmt --check failed on the five files that set and test
REA_BRIDGE_MAX_REQUEST_BYTES. Formatting only; an oversized Cutter
reply still stays an unknown execution.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): exclude the LF from the response frame budget

REA_BRIDGE_MAX_REQUEST_BYTES counts payload bytes. The Cutter response
reader and authenticated encoder were reserving one byte for the
terminating LF, so an exact-limit response was rejected. A reply that
exceeds the ceiling after the command was sent still stays an unknown
execution.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(bridge): measure escaped JSON before allocating the request

A command of U+0001 characters can expand sixfold. JSON.stringify of
that expansion can throw past Node's string ceiling before the payload
check. Count the escaped size within REA_BRIDGE_MAX_REQUEST_BYTES
first and refuse it as a resource constraint.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(config): derive the bridge request maximum from JSON expansion

A 256 MiB ceiling still lets a shorter U+0001 command expand past Node's
536870888-character string limit. The maximum is now
floor((536870888 - 296) / 7) = 76695798, the longest such command whose
authenticated frame fits in one string. Requests are still measured
before JSON.stringify.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(bridge): size the Cutter frame deadline and send the measured Hopper payload

The authenticated Cutter command is encoded after the challenge, so a
one-second read rejected an in-budget frame. That read now allows one
second per mebibyte of the ceiling and never waits longer than 25
seconds. Hello stays at one second. Hopper writes the payload it already
measured instead of serializing the same request again.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(config): bound the bridge request maximum by the serialized string

The ceiling already measures escaped JSON, so dividing Node's string limit by the seven-byte expansion rejected encoded payloads that still fit. The maximum is 536870887, one byte under that string ceiling, leaving room for the framing LF.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(hopper): serialize a bridge request when it reaches the wire

The queue kept each encoded frame, plus the caller's params, until Hopper finished the active request. A raised ceiling made a few waiting calls enough to exhaust the heap. The FIFO now keeps the params, and the frame is encoded only for the request being written.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): hash the bridge proof prefix and payload separately

An exact-limit Cutter frame plus the HMAC prefix exceeds Node's single-string ceiling, so the client threw before sending an admitted command. The prefix and payload are now separate HMAC updates, including the response proof.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): keep recovery fields when a status path exceeds the frame

A long current_file made the status reply miss the ceiling, and the fallback then dropped session_id and the completion receipts. The status now omits the path and version and still returns the session, connection proof, and up to 64 receipts. That required recovery frame is smaller than the 7464 floor.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): report an unknown path when status identity does not fit

A bounded status kept the new document generation and omitted the path, so the client filled in the descriptor's older path. The observed path is sent when it fits. When it does not, current_file is null and is not replaced with that stale path.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): count structured replies by their encoded JSON size

The response guard charged 16 bytes per primitive and two bytes per list slot, so a dense array under the configured ceiling was replaced with output_truncated. Numbers, booleans, null, and container punctuation now use their JSON lengths.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): stream authenticated responses in bounded chunks

A fitting reply was signed from retained raw bytes, escaped bytes, and a
joined frame, so a ceiling near 512 MiB could exhaust Cutter before send.
Measure and sign JSON pieces, then write the same frame in 64 KiB chunks.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(bridge): keep Cutter admission from stalling or hiding sessions

Read an unauthenticated frame off the accept loop. A command reply that
does not fit keeps completion and generation and reports an oversized path
as null. Discovery reports a ceiling mismatch instead of an absent session.
The maximum HMAC proof is opt-in, and both bridges reject non-ASCII digits.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): bound frame scans and client response copies

Search only newly read bytes for the framing LF. Unescape each socket
chunk into one response string, check the proof, and then parse it.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): keep completion, admission, and dense replies bounded

Report completed_connection only through connections that have
terminated. Cap connection threads and keep the listener up if one
fails to start. Batch scalar JSON and fail discovery when any ceiling
mismatches.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): hash requests in parts and scan escapes once

Update the client-proof prefix and request separately. Stop the response
decoder at the first quote or backslash instead of rescanning the tail.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(cutter): confirm live ceiling mismatches and omitted output

A stale descriptor from a previous ceiling is not a discovery mismatch
until its hello proves a live authenticated bridge. A response discarded
for the frame ceiling after dispatch reports output_truncated.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* test(cutter): close the unauthenticated ceiling-mismatch fixture

The listener that fails the hello proof is destroyed after its challenge
so discovery cleanup does not wait on that socket.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-10-23 06:11:21 +08:00
Dery Ferdikaandmorluto 26573c3aa4 fix(hopper): bound bridge request frames like the Cutter bridge (#5262)
* fix(hopper): bound bridge request frames like the Cutter bridge

The Hopper bridge read each request with an unbounded readline, so a peer
that never wrote a newline kept Hopper allocating for as long as it kept
writing. The Cutter bridge already refuses a frame above MAX_FRAME_BYTES;
the Hopper bridge had no request ceiling at all.

Read the request line with a 16 MiB bound and refuse a line that fills the
limit without a terminator, using the existing invalid_request diagnostic
before closing the connection. Such a line cannot be answered or
resynchronized, because its remainder would be read as the next request.
The response direction is unchanged, so large decompilation results still
flow, and every dispatchable method carries small bounded parameters.

The stalled-line case keeps its connection open instead of half-closing
it, so the test pins the exact ceiling: a bound one byte larger waits for
a byte the peer never sends and fails instead of passing quietly.

Validation: npm run check:fast (typecheck, lint) passed uncached, and the
new boundary test passed against the real bridge over socket pairs at the
frame limit and above it. Removing only the read bound makes the same test
fail, and widening the bound to one byte past the limit fails it too. The
Hopper boundary and bridge-packaging suites report the same 17 failing
files and 126 failing tests before and after this change on this Windows
host; those failures are POSIX-only probes (Unix socket directories,
os.statvfs) unrelated to this diff. Native macOS Hopper and real-client
traffic were not run.

* fix(bridges): exclude line delimiter from payload limit

* test(hopper): cover partial request at EOF

---------

Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
2026-10-23 02:25:24 +08:00
morluto e780148305 fix(cutter): preserve producer failure and cancellation facts 2026-10-22 22:07:11 +08:00
dbd556043c fix(providers): name JEB, IDA, and one-shot command deadlines (#6014)
* fix(providers): name JEB, IDA, and one-shot command deadlines

Wire JEB catalog discovery to REA_JEB_MCP_TIMEOUT_MS, name the IDA
registration timeoutMs, and add command_timeout_ms for one-shot objdump
and rizin. Debugger, Frida, and Cutter caps stay fixed and say so.

Refs #5910

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(providers): pass remaining deadlines and name the cap that fired

Catalog discovery now sends the JEB budget still remaining to the SDK on
connect and every tools/list page. Objdump and rizin preflight share one
command_timeout_ms across stat and digest; the command still receives that
budget again. Architecture Evidence keeps a selected timeout, and Frida and
Rizin name the capture limit that actually stopped output.

Co-authored-by: morluto <morluto@users.noreply.github.com>

* fix(frida): preserve non-timeout device lookup failures

getDeviceById is a lookup deadline only when Frida rejects with
"Device not found" after the wait. A device-manager or backend failure
stays a capability error. Align the assertions that still expected the
previous capacity and capture sentences.

Co-authored-by: morluto <morluto@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: morluto <morluto@users.noreply.github.com>
2026-10-22 04:01:02 +08:00
gensokyo-devandKaoru0822 e84e17e30f fix(rizin): accept proven inferior exit after detach (#5281)
Reuse the common Linux identity reader and retain the original PID/start-time pair throughout detach. After Rizin confirms no active descriptor, accept a proven end of that original process while preserving refusals for unresolved or live mismatched targets. Remove the duplicate proc parser and cover deterministic exit/live-redirect transitions with owned fixtures.

Fixes #5277

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-20 02:29:04 +08:00
NoThingandKaoru0822 1b3ac94242 fix(rizin): bound recent history frames by UTF-8 byte budget (#5246)
Bound recent decoded history to complete UTF-8 prefixes and reuse the bounded capture implementation without changing command Evidence or wire queue accounting. Add deterministic Unicode and invalid-byte coverage, and document history retention.

Fixes #5091
Fixes #5242

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-20 01:41:46 +08:00
gensokyo-devandKaoru0822 2dd5effe2a fix(rizin): default one-shot output to plain presentation (#5269)
Default native one-shot Rizin presentation to plain text before collection while preserving caller colour overrides, literal output, recorded argv and shared CLI/MCP Evidence.

Fixes #4488

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-20 01:12:35 +08:00
gensokyo-devandKaoru0822 3ea0d9489e feat(objdump): select native disassembly by symbol (#5171)
Push optional native symbol selection into GNU objdump before collecting Evidence. Preserve native matching, raw output, artifact identity, scoped limitations and the existing full-disassembly default through the shared CLI/MCP workflow.

Fixes #5159

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
2026-10-19 20:15:20 +08:00
morluto 71929ed37c fix(cutter): normalize command checkpoint cancellation
Produce typed cancellation at each command checkpoint while retaining the exact opaque reason as cause. Preserve independent typed physical failures without downstream equality guesses.

Validated 72 focused tests across nine files, static checks, docs and five conformance controls, including real client/service admission races and matching physical-error controls. No native Cutter engine or new public-transport reproduction claimed.

Refs: #4635
2026-10-17 09:24:43 +08:00
morluto 5c0472c571 fix(cutter): attribute status proof failures to command
Parse command status and validate session identity at one bridge boundary. Keep the preflight watermark requirement separate from exact completion receipt proof, and retain status as a compact auxiliary diagnostic.

Reuse authenticated protocol and descriptor fixtures. Validate 66 focused tests across eight files, static checks, docs and five conformance controls. CLI refusal controls use an authenticated loopback fixture; native Cutter was not verified.

Refs: #4607
2026-10-17 09:19:02 +08:00
Kaoru0822andClaude Opus 5.5 cb18d4c9c4 docs(objdump): show debug-link flag forms that keep their meaning (#4068)
The DWARF example passed `--follow-debug-links false`. The CLI parses
the option as a Boolean flag and drops the separate `false` word, so the
documented command enabled debug-link following (`-WK`). Show the
default and the bare flag, and name `--no-follow-debug-links` and
`--follow-debug-links=false` as the forms that keep it disabled.

Fixes #3893

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 18:07:09 +08:00
4aa51bfe19 fix(reverse): reconcile cleanup ownership and mutation diagnostics (#2799)
* feat(process): add owned debugger shutdown lifecycle

* feat(reverse): add local inspection commands

* feat(gdb): add persistent debugger integration

* feat(cutter): add Cutter bridge integration

* test(reverse): enforce complete integration coverage

* fix(process): preserve debugger shutdown ownership

* fix(reverse): retain evidence across interrupted commands

* fix(gdb): honor captured provider environment

* test(process): cover debugger shutdown retries

* fix(reverse): retain evidence for interrupted providers

* test(process): cover debugger shutdown retries

* fix(reverse): retain evidence for interrupted providers

* fix(server): snapshot provider environment at creation

* fix(reverse): close review gaps with complete coverage

* fix(reverse): address inspection review findings

* fix(gdb): bound sessions and retain cleanup ownership

* fix(ci): require reverse-tools quality lane

* fix(process): unref inherited debugger output pipes

* fix(reverse): address remaining PR 1960 findings

* fix(gdb): address remaining PR 1961 findings

* fix(reverse): account for unrestricted provider execution

* fix(process): retain debugger ownership until safe shutdown

* fix(process): preserve replacement debugger sessions

* fix(reverse): preserve admission and output provenance

* fix(process): retain exited debugger until output settles

* fix(mcp): bound provider admission and debugger cleanup

* fix(reverse): preserve failure provenance and classify E2BIG

* fix(gdb): preserve startup cleanup and detach safety

* fix(process): retain debugger ownership after detach failure

* fix(reverse): preserve mutation and failure provenance

* fix(gdb): address debugger review findings

* fix(reverse): rebind sessions after external mutation

* fix(process): cap debugger output after exit

* fix(gdb): protect one-shot detach verification

* feat(debugger): add reverse tool coverage gate

* test(debugger): cover integrated failure paths

* fix(gdb): bound and preserve session observations

* fix(gdb): address review regressions

* style: format merged integration files

* fix(reverse): preserve session and output evidence

* refactor(gdb): share repeated test and partial result setup

* fix(gdb): invalidate TTY proof for Python aliases

* fix(reverse): retain failure output byte counts

* test(process): synchronize late debugger output

* fix(gdb): invalidate TTY proof for wrapped commands

* fix(gdb): recognize wit command abbreviation

* test(reverse): wait for cancelled descendant readiness

* test(reverse): bound descendant cancellation cleanup

* style(reverse): format integration tests and adapters

* style: format reverse engineering integration files

* test(reverse): remove duplicate environment harness

* test(gdb): share session startup assertions

* fix(gdb): invalidate output proof for command abbreviations

* test(reverse): share composition edge case scenarios

* fix(ci): recognize verification and mutation tool entries

* test(rizin): cover successful fake inferior detach

* test(cli): align full output failure envelope

* test(cli): isolate reverse command lifecycle service

* test(process): share debugger output fixture setup

* fix(binary): preserve high-bit Windows signature bytes

* style(binary): format Windows signature parser

* test(mcp): preserve call coverage in unchanged comparison

* fix(ci): include reverse tools Vitest configs in lint cache

* fix(mcp): preserve target content on delivery errors

* ci: align duplication ceiling with expanded suite

* test(reverse): allow signal admission mutants

* fix(reverse): bound retained cleanup failures to process owners

* fix(test): replace drifting mutation ranges with owned selectors

* fix(reverse): admit persistent commands and retain cleanup ownership

* fix(cutter): recover timed-out commands from exact receipts

* fix(cutter): reject unsupported bridge request kinds

* fix(ci): repair client format and shared verification fixtures

* fix(native): preserve debugger cleanup ownership and bridge authentication

* test(native): retain diagnostics without perfect coverage requirements

* chore(licenses): refresh locked dependency inventory and notices

* fix(test): exclude transient command locks from mutation sandboxes

* fix(gdb): admit only platforms with safe detach verification

* fix(cutter): retain bounded completion receipts until acknowledgement

* fix(cutter): acknowledge commands rejected before UI dispatch

* test(reverse): fail cancellation checks before fixture teardown

* test(gdb): clean up the retained broken-stdin fixture owner

* docs(test): clarify focused provider verification scope

* fix(rizin): retain close cleanup failures

* fix(gdb): wait for inferior stop and bound MI buffering

* fix(cutter): retain failed receipt acknowledgements

* fix(rizin): return retained session identity on rebind failure

* fix(gdb): preserve startup cancellation and lossy status

* fix(rizin): retain launch provenance and assemble frames once

* fix(cutter): recover receipts across callers and bound discovery

* docs: describe debugger evidence and bridge recovery

* fix(process): keep cleanup incomplete while writers remain

Stopping a debugger no longer reports success when inherited output
streams stay open, so BinarySession cannot reopen a binary a child is
still changing. Concurrent Cutter cleanup retries share one receipt
acknowledgement instead of treating a consumed receipt as failure.

* fix(debuggers): recover cleanup with captured process identities

* fix(analysis): retire sessions after unrestricted commands

* fix(cli): preserve completed evidence after cleanup recovery

* fix(cutter): bound frame collection and coalesce cleanup

* fix(windows): resolve selected provider paths absolutely

* fix(gdb): report decoding loss in failed startup evidence

* fix(rizin): scope decoding loss to collected command frames

* test(mcp): cover snapshot retirement in reverse tools CI

---------

Co-authored-by: Daniel Gonçalves Araujo <47118053+dandgabr@users.noreply.github.com>
Co-authored-by: REA Maintainers <noreply@github.com>
Co-authored-by: OpenAI Codex <codex@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
2026-10-14 04:47:34 +08:00