mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 19:35:56 +00:00
* 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>
47 lines
1.9 KiB
TypeScript
47 lines
1.9 KiB
TypeScript
import { expect, it } from "vitest";
|
|
|
|
import { createRizinCommandTimeoutEvidence } from "../../../src/rizin/RizinDebugSessionManager.js";
|
|
|
|
it("preserves every field of partial Rizin timeout Evidence", () => {
|
|
const result = {
|
|
command: "dr",
|
|
output: "partial register output",
|
|
output_scope: "command_and_interleaved_session_output" as const,
|
|
output_truncated: true,
|
|
completion_status: "unknown" as const,
|
|
backend: null,
|
|
};
|
|
|
|
const evidence = createRizinCommandTimeoutEvidence({
|
|
sessionId: "session-123",
|
|
command: "dr",
|
|
result,
|
|
inferiorTty: "/dev/pts/7",
|
|
cleanupFailure: undefined,
|
|
launchProvenance: {
|
|
caller_selected_path: "./sample/../program",
|
|
resolved_path: "/workspace/program",
|
|
},
|
|
});
|
|
|
|
expect(evidence.parameters).toEqual({
|
|
session_id: "session-123",
|
|
command: "dr",
|
|
inferior_tty: "/dev/pts/7",
|
|
launch_provenance: {
|
|
caller_selected_path: "./sample/../program",
|
|
resolved_path: "/workspace/program",
|
|
},
|
|
});
|
|
expect(evidence.raw_result).toEqual(result);
|
|
expect(evidence.normalized_result).toEqual(result);
|
|
expect(evidence.limitations).toEqual([
|
|
"The current debugger target identity is not established by the Rizin session identifier.",
|
|
"The command timed out before its completion marker at 120000 ms (deadlineExpired). This release has no runtime override. Retained output is partial and completion is unknown.",
|
|
"The owned debugger session was stopped because output correlation could no longer be guaranteed.",
|
|
"The command is unrestricted and may access local files, the shell, network, or mutate the target.",
|
|
"Interrupted output may include an incomplete completion-marker prefix; it is retained because it cannot be distinguished from command diagnostics.",
|
|
"Launch provenance records the original and resolved startup paths; it does not establish the current target after unrestricted debugger commands.",
|
|
]);
|
|
});
|