Files
reverse-engineering-anything/scripts/lib
f25a0a0599 refactor(verify): run Ghidra verifier commands through the supervised owner (2 of 2) (#12717)
* refactor(verify): run Ghidra verifier commands through the supervised owner (2 of 2)

Route the remaining Ghidra verifier compiler and CLI launches through
createVerifierCommands, close that owner before lineage observation, and
assert the raw arm64 alignment refusal from its structured error.

* fix(verify): stop detached Ghidra verifier commands on interrupt

SIGINT and SIGTERM abort the command owner and the scripts wait for its
cleanup, so a compiler started in its own process group cannot outlive
the verifier.

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

* fix(verify): stop Ghidra verifier analysis when interrupted

Pass the verifier interruption signal into MCP and Ghidra waits, and stop
waiting for calls that cannot observe it, so SIGINT does not continue the
analysis before cleanup.

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

* fix(verify): stop the switch evidence probe when the verifier is interrupted

Pass the verifier interruption signal into the detached Ghidra control
probe and end its wait so supervisor.stop() runs before a later SIGKILL.

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

* fix(verify): observe work already started when a verifier interrupt wins

untilInterrupted now settles the caller's promise after the signal has
already aborted, so a connection started just before the check cannot
reject with nobody listening.

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

* refactor(verify): share verifier interrupt handling and keep it through release

Move the SIGINT/SIGTERM abort wiring into bindVerifierCommandInterruption.
Handlers stay installed until after fixture release, and untilInterrupted
still observes a promise that was already started.

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

* fix(verify): keep diagnostic workspaces and stop fixture builds on interrupt

Check the interruption signal after finalization and before the fixture
root is removed. MIPS and RISC-V fixture compilers and readers now run
through the verifier command owner, so SIGTERM aborts them instead of
waiting out their execFile deadline.

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-11-19 23:29:09 -05:00
..