Repository navigation
Conversation
ci: add repository security scans
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 168ba252e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
168ba25 to
6d4710c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7266a8257a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 337923b709
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ce1aa9b515
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const result: GdbCommandResult = { | ||
| command, | ||
| mi: "", | ||
| records: [...session.lines], |
There was a problem hiding this comment.
Scope GDB exit fallback to the active command
When a second or later GDB command makes the debugger exit before emitting its token result, session.lines is the global 256-record history and already contains startup and prior-command records. Although this fallback now propagates history truncation, it still attributes those unrelated records (and the derived console/target/log text) to the current command's Evidence; retain the active pending command's bounded lines through the exit rejection and use that command-local capture instead.
AGENTS.md reference: AGENTS.md:L5-L5
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed on this branch. Each pending GDB command now keeps a bounded, command-local MI capture, and the process-exit fallback builds Evidence from that capture instead of session-wide history. The regression includes startup and prior-command records and verifies they are not attributed to the active command, including truncation status.
| if (signal?.aborted || cause instanceof AnalysisCancelledError) | ||
| return err(new AnalysisCancelledError("gdb_console", { cause })); |
There was a problem hiding this comment.
Preserve failed GDB cancellation cleanup
When an AbortSignal fires and stopDebuggerOnly cannot confirm that GDB exited, #request rejects with an AnalysisCapabilityUnavailableError, but the still-aborted signal makes this condition rewrite that failure to AnalysisCancelledError. The remaining unconditional remap is fresh evidence beyond the cancellation-wiring fix: callers are told only that cancellation occurred while the owned debugger and its effects may still be running, so preserve the cleanup failure and only map actual cancellation errors.
AGENTS.md reference: AGENTS.md:L21-L21
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed on this branch. Cancellation handling now preserves the cleanup failure when the owned GDB process cannot be confirmed stopped, even when the signal is already aborted; only an actual cancellation error is translated to AnalysisCancelledError. The regression verifies that callers retain the actionable cleanup failure.
| if (!(await session.supervisor.waitForExit(300))) { | ||
| session.launched.process.kill("SIGKILL"); | ||
| if (!(await session.supervisor.waitForExit(1_000))) { | ||
| session.supervisor.dispose(); |
There was a problem hiding this comment.
Keep supervision after an incomplete debugger stop
When a debugger survives the SIGKILL grace period, this branch reports incomplete and closeOwnedDebuggerSessions deliberately retains the session, but dispose() removes the supervisor's exit and diagnostic listeners as though ownership had been released. A later retry cannot observe a newly occurring exit through waitForExit during that attempt and the retained session loses live diagnostics; keep the supervisor attached until a later stop or observed exit actually releases ownership.
AGENTS.md reference: AGENTS.md:L17-L17
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed on this branch. The process supervisor keeps its exit and diagnostic listeners after an incomplete stop, so a later retry can observe the process exit and release ownership exactly once. The regression covers the incomplete stop followed by a successful retry.
| expect(started.ok).toBe(true); | ||
| if (!started.ok) return; | ||
| const timedOut = await manager.execute(started.value.session_id, "slow"); | ||
| expect(timedOut.ok).toBe(false); |
There was a problem hiding this comment.
Update the stale Rizin timeout expectation
When this fake provider suppresses the completion marker, the current manager handles RizinCommandTimeoutError by returning successful partial Evidence with unknown completion, so this assertion deterministically fails; the later regression at DebuggerSessionReviewRegressions.test.ts:447 already expects result.ok to be true. The fresh post-fix evidence is this contradictory assertion, which should instead verify the retained partial result and completion_status: "unknown".
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed on this branch. The stale timeout assertion now checks the returned partial observation, retained output, and completion_status: unknown, matching the timeout Evidence contract. The focused provider suite passes.
| received = await waitForFrame(session, remaining, signal); | ||
| } catch (cause) { | ||
| if (cause instanceof AnalysisCancelledError) throw cause; | ||
| throw new RizinCommandTimeoutError(output.join("\n")); |
There was a problem hiding this comment.
Preserve Rizin process-exit reasons
When Rizin exits or crashes while a command is waiting for its next frame, waitForFrame rejects with an exit-specific error, but this blanket conversion turns every non-cancellation failure into RizinCommandTimeoutError. execute therefore reports successful partial Evidence claiming the deadline expired, and its later session.exited branch cannot handle this path; preserve the process-exit reason (and partial output) separately from an actual timer expiry.
AGENTS.md reference: AGENTS.md:L21-L21
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed on this branch. Rizin process exit now has a distinct error path from deadline expiry and returns partial frame output with completion_status: unknown and process-exit-specific Evidence limitations. The regression exits after two partial frames and verifies their newline-joined output in the result and Evidence.
| signalName = capture.signal; | ||
| outputTruncated = capture.outputTruncated; | ||
| if (code === "ERR_CHILD_PROCESS_STDIO_MAXBUFFER") { | ||
| exitCode = null; | ||
| completionStatus = "unknown"; |
There was a problem hiding this comment.
Mark signal-terminated commands as unknown
When a one-shot objdump/Rizin provider crashes or is externally killed by a signal, the captured failure has exit_code: null and a non-null signal, but completion_status remains complete; only the max-buffer code path changes it to unknown. The remaining capture.signal path is fresh evidence beyond the max-buffer fix: for unrestricted mutating Rizin commands this can present a partially executed command as completed and invite an unsafe retry, so signal termination should also produce unknown completion and a corresponding limitation.
AGENTS.md reference: AGENTS.md:L21-L21
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed on this branch. A signal-terminated one-shot provider command now reports completion_status: unknown and records a limitation explaining that execution ended by signal, while retaining captured output. The provider regression covers signal termination.
|
I think it'd be better if you could split these into individual PRs so we can evaluate + test the tools! |
|
Agreed. The fixes are implemented and validated locally, with provider-specific coverage and mutation selectors for Cutter and Rizin plus separate GDB, Rizin, and shared-process regressions. The changes are still consolidated on this working branch; I have not pushed them or opened separate PRs yet. I will split the integration changes into individually reviewable PRs before publishing, keeping the shared process-ownership work as the dependency for the debugger-specific PRs. |
|
Update: PR #1279 is closed. Its replacement PRs are open and ready for review:
Review corrections are pushed, and each inline review thread has an English reply. GitHub currently reports all three PRs as mergeable with no conflicts. No CI status checks are reported yet. The remaining integration branches are pushed to
Latest aggregate validation: 237 tests passed; statements 1007/1007, branches 680/680, functions 166/166, and lines 967/967. The primary mutation run killed all 147 valid mutants, with zero survivors or timeouts (148 generated mutations were rejected by TypeScript compilation). The semantics run killed all 19 valid mutants, also with zero survivors or timeouts (6 compile-invalid mutations). |
Summary
Verification
npm run build:cachednpm run check:fastnpm run docs:checkReal upstream Cutter smoke execution was not run in this environment; CI documents the self-hosted per-OS lane and its limits.