Repository navigation
fix(rizin): preserve stopped session diagnostics - #8025
Nikhila-Dhevi-R wants to merge 4 commits into
Conversation
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. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The reviewed changes appear safe to merge; both numbered previous findings are fixed and no new blocking issue was found. SummaryPreserves Rizin stop reasons across cleanup recovery while releasing session slots held by failed starts.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Rizin startup] --> B{Startup succeeds?}
B -->|Yes| C[Publish session ID]
B -->|No| D[Keep failed-start owner while cleanup is pending]
C --> E[Command stops session]
E --> F[Save stop reason]
D --> G[Retry cleanup]
F --> G
G --> H{Cleanup succeeds?}
H -->|No| I[Keep owner for retry]
H -->|Yes| J{Published session with saved reason?}
J -->|No| K[Remove record and release slot]
J -->|Yes| L[Keep status and typed stop error]
L --> M[Explicit close removes record]
Reviews (4) · Last reviewed commit: "fix(rizin): release failed startup slots..." · Reviewed by Greptile |
|
I tested this PR at
That covers the first two points of #8024, and no processes are left. Two notes:
|
…zin-session-diagnostics # Conflicts: # src/rizin/RizinDebugSessionManager.ts
|
Hey @Nikhila-Dhevi-R, thanks for putting this together, the fix looks useful. What's left: there is 1 unresolved review thread from Greptile, about "Cleanup erases the stop reason". Happy to get this in once that's sorted out. |
|
TL;DR: On head 69b5408, the new test Edit (8 Nov): I ran the new head, 6e469c6, in a VM, and the results are here. I ran
Not run
Test setup
Commandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/mcp/rizinDebuggerCancellationMcp.test.ts tests/boundary/providers/RizinDebugSessionCoverage.part3.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
|
TL;DR: My comment above saw a failing MCP test at 69b5408. On 6e469c6, the 3 changed test files pass on all three Node versions. The new
Not run
Test setupCommandsnpm ci --offline
npm run test:prepare
xvfb-run -a npm run test:focused -- tests/boundary/mcp/rizinDebuggerCancellationMcp.test.ts tests/boundary/providers/RizinDebugSessionCoverage.part1.test.ts tests/boundary/providers/RizinDebugSessionCoverage.part3.test.ts
xvfb-run -a npm run test:focused -- tests/boundary/mcp/rizinDebuggerCancellationMcp.test.ts tests/boundary/providers/RizinDebugSessionCoverage.part1.test.ts🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Fixes #8024
After a Rizin protocol/output limit stops a session, later commands now return the retained stop reason and session status exposes
closed_reason. Cleanup synchronization and successful automatic cleanup retries preserve that diagnosis until explicit close.Failed startups are tracked separately from successfully published sessions. Their records are removed after cleanup succeeds, releasing capacity even when
REA_DEBUGGER_MAX_SESSIONS=1. This addresses the failed-start slot review finding. The MCP regression now correctly expectscleanup_incompletefor the first failed cleanup, thencapability_unavailableafter recovery.Validation
action_required(maintainer approval), not failed test runs. Full CI results remain unverified.Author readiness
Human owner: @Nikhila-Dhevi-R