Repository navigation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eada258ea3
ℹ️ 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: 2667a65daf
ℹ️ 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: 6a68979e65
ℹ️ 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".
|
TL;DR: The new head fixes the hang that Codex flagged and I reproduced. In my runs, Node now exits by itself when a grandchild is left running. Everything else I measured on the earlier head still holds. I tested head 6a68979 on top of current main 04089d5. I copied the PR's four changed files onto main. The typecheck and lint pass on Node 24. All 13 tests in the two test files pass on Node 22, 24 and 26. What changed since 2667a65The new head adds
Checks, by Node version
oxlint exits 0 but warns that Real processes (Linux, Node 24)Each child was started through REA's own launcher and supervisor. Times run from the helper call to its return. A batch job from another project ran on the box at the same time, so the times are rough.
I killed every leftover process by PID. A final Not run
Thanks, dandgabr, for the quick fix. Changes since the earlier head (old results)These are my first results, on head 2667a65 added onto main 42b0ed1. I ran them at 10:35 PM to 10:43 PM on 2026-10-11. Checks, by Node version
Real processes (Linux, Node 24)Each child was started through REA's own launcher and supervisor. Times are from the helper call to its return.
I killed every leftover process by PID. A final Test setup
Commands# build (Node 24, under an 8 GB memory cap)
npm ci
npm run build
npm run test:prepare
npm run typecheck
oxlint src/process/ownedDebuggerSession.ts src/process/ProviderProcess.ts tests/boundary/process/ownedDebuggerSession.test.ts tests/boundary/process/providerProcessOutput.test.ts
# the PR's two test files, once per Node version
npm run test:focused -- tests/boundary/process/ownedDebuggerSession.test.ts tests/boundary/process/providerProcessOutput.test.ts
# real processes, one case per run (a b b2 c d d2 e1 e2)
node driver.mjs <case>The driver script starts each child with the repo's 🤖 Generated with Claude Code (Sonnet 5.5, verified by Opus 5.5) 🦊 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4b67b6045b
ℹ️ 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: 310109f54d
ℹ️ 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: 03ac0b6257
ℹ️ 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: 064297f54f
ℹ️ 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".
…-process-lifecycle
…-process-lifecycle
…-process-lifecycle
…-process-lifecycle
…/owned-debugger-process-lifecycle
…/owned-debugger-process-lifecycle
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
# Conflicts: # .jscpd.json # docs/reverse-engineering-tools.md # src/gdb/GdbSessionManager.ts # src/process/ownedDebuggerSession.ts # src/rizin/RizinDebugSessionManager.ts # src/windows/WindowsOwnedProcess.ts # tests/boundary/filesystem/ciTestProjects.test.ts # tests/boundary/filesystem/jsonOutputOwnership.test.ts # tests/boundary/process/ownedDebuggerSession.test.ts # tests/boundary/providers/GdbSessionManagerCoverage.test.ts # tests/boundary/providers/RizinDebugSessionReviewRegressions.test.ts # vitest.config.ts
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4ea9d49981
ℹ️ 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".
| if (session.completedDetachCommand !== undefined) | ||
| return this.#verifyCompletedDetachCommand( | ||
| session, | ||
| session.completedDetachCommand, | ||
| ); |
There was a problem hiding this comment.
Synchronize transport before retrying a retained detach receipt
If a cleanup control reply exceeds a frame/output limit after o- completes, or while verifying a confirmed detach, the receiver leaves session.protocolError set. These new early-return paths bypass #synchronizeCleanup, so subsequent retries reject on the retained protocol error or queued late frames even after the provider starts returning valid replies. Consequently, retryCleanupFailures() cannot release the session through the recovery path that remains available without a retained receipt. Run the existing synchronization step before entering either retained-detach branch, preserving the receipt so recovery does not repeat the detach command.
AGENTS.md reference: AGENTS.md:L23-L23
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 4ad3fdb19. #detachInferiorUnlocked now synchronizes cleanup transport via #synchronizeCleanup(session) when session.protocolError !== undefined before verifying or returning retained detach command receipts. Focused tests and check:fast pass.
…-process-lifecycle
| } | ||
| else if (line === "e dbg.exitkills") process.stdout.write("false\\0"); | ||
| else if (line.startsWith("!echo ")) process.stdout.write(line.slice(6) + "\\0"); | ||
| else process.stdout.write("\\0"); |
There was a problem hiding this comment.
Fake providers accept unknown commands
The new fake provider answers every unknown command with an empty success frame. docs/testing.md requires protocol fixtures to reject unmodeled commands. A misspelled or unexpected cleanup command can therefore pass this boundary instead of failing where it was sent.
List expected no-output commands explicitly and surface unknown commands as test failures. The same fallback appears in createRetryableDetachProvider and elsewhere. This repository requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/boundary/providers/RizinDebugSessionReviewRegressions.test.ts
Line: 273
Comment:
**Fake providers accept unknown commands**
The new fake provider answers every unknown command with an empty success frame. `docs/testing.md` requires protocol fixtures to reject unmodeled commands. A misspelled or unexpected cleanup command can therefore pass this boundary instead of failing where it was sent.
List expected no-output commands explicitly and surface unknown commands as test failures. The same fallback appears in `createRetryableDetachProvider` and elsewhere. This repository requirement must be satisfied before merging.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Fixed in 715cb9797. Fake providers in RizinDebugSessionReviewRegressions.test.ts now reject unmodeled commands with unmodeled command: <line> to stderr and exit with non-zero code to fail closed rather than pretending unknown requests succeeded with \0.
| expect(started.ok).toBe(true); | ||
| if (!started.ok) return; |
There was a problem hiding this comment.
Startup failures lose their reason
The new success cases assert started.ok and then return on failure instead of throwing started.error. docs/testing.md explicitly requires throwing the typed error before asserting a successful Result. These failures currently show only a boolean mismatch, hiding the useful startup and cleanup details.
Replace this pattern here and in the other added success cases. This repository requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/boundary/providers/RizinDebugSessionReviewRegressions.test.ts
Line: 982-983
Comment:
**Startup failures lose their reason**
The new success cases assert `started.ok` and then return on failure instead of throwing `started.error`. `docs/testing.md` explicitly requires throwing the typed error before asserting a successful `Result`. These failures currently show only a boolean mismatch, hiding the useful startup and cleanup details.
Replace this pattern here and in the other added success cases. This repository requirement must be satisfied before merging.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.There was a problem hiding this comment.
Fixed in 715cb9797. Replaced expect(started.ok).toBe(true); if (!started.ok) return; across all test cases with if (!started.ok) throw started.error; so startup failures preserve and surface the typed error.
…-process-lifecycle
…tity verification
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfd633f05d
ℹ️ 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 failure = cause instanceof Error ? cause : new Error(String(cause)); | ||
| // Native polling is not atomic: it may drain one stream before a later | ||
| // read (stderr or job state) fails. Retrying cannot recover those bytes. | ||
| this.#outputIncomplete = true; |
There was a problem hiding this comment.
Keep native close failures separate from output loss
On Windows, when process_poll successfully reports a settled job with both output streams fully drained, #release() can still throw because process_close fails. This catch now sets the sticky outputIncomplete flag for that handle-release failure, so even a successful cleanup retry leaves ProviderProcessSupervisor.snapshot() and snapshotOutputSince() reporting the fully captured output as truncated/incomplete. Distinguish failed polling from failed handle release here so cleanup uncertainty does not invalidate an already completed output observation.
AGENTS.md reference: AGENTS.md:L23-L23
Useful? React with 👍 / 👎.
…-process-lifecycle
| observedPids: [], | ||
| overflow: true, | ||
| error: new Error( | ||
| "Rizin `olj` response exceeds the safe inferior row limit.", |
There was a problem hiding this comment.
Limit errors hide their values
The new olj overflow errors omit the fixed 262,144-character and 1,024-row ceilings. The repository requires fixed-limit failures to state the value, say there is no runtime override, and name controls that cannot raise it.
Add those details to the size, row, and retained-identity overflow errors so callers do not try changing unrelated debugger budgets when close fails. This repository requirement must be satisfied before merging.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/rizin/RizinDebugSessionManager.ts
Line: 2304
Comment:
**Limit errors hide their values**
The new `olj` overflow errors omit the fixed 262,144-character and 1,024-row ceilings. The repository requires fixed-limit failures to state the value, say there is no runtime override, and name controls that cannot raise it.
Add those details to the size, row, and retained-identity overflow errors so callers do not try changing unrelated debugger budgets when close fails. This repository requirement must be satisfied before merging.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Fixed in 715cb9797. parseRizinPtraceRows now explicitly states the exact limits (262,144 characters or 1,024 rows), notes that the release has no runtime override, and notes that debugger settings or controls cannot raise them.
| const createTempDirectory = async (prefix: string): Promise<string> => { | ||
| const dir = await mkdtemp(join(tmpdir(), prefix)); | ||
| directories.push(dir); | ||
| directory = dir; | ||
| return dir; |
There was a problem hiding this comment.
Directory cleanup bypasses shared owner
createTempDirectory adds another directory tracker instead of the createTestTempDirectory owner required by CONTRIBUTING.md. The new removal loop also hides deletion failures.
Use the shared helper and remove the local tracking and deletion. Keep process teardown in afterEach, which runs first. The new RizinInferiorEnvironment.test.ts and inferiorInputSink.test.ts repeat this direct-mkdtemp pattern. This repository requirement must be met before merging.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/boundary/providers/RizinDebugSessionReviewRegressions.test.ts
Line: 39-43
Comment:
**Directory cleanup bypasses shared owner**
`createTempDirectory` adds another directory tracker instead of the `createTestTempDirectory` owner required by `CONTRIBUTING.md`. The new removal loop also hides deletion failures.
Use the shared helper and remove the local tracking and deletion. Keep process teardown in `afterEach`, which runs first. The new `RizinInferiorEnvironment.test.ts` and `inferiorInputSink.test.ts` repeat this direct-`mkdtemp` pattern. This repository requirement must be met before merging.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.| expect(parsed.error?.message).toContain( | ||
| "safe inferior row limit of 1,024 rows", | ||
| ); | ||
| expect(parsed.error?.message).toContain("no runtime override"); | ||
| expect(parsed.error?.message).toContain( | ||
| "debugger settings or controls cannot raise it", | ||
| ); |
There was a problem hiding this comment.
These new assertions pin explanatory phrases in Error.message, so harmless rewording breaks the tests. docs/testing.md requires checking limit facts instead of explanatory wording. It also says guidance checks should use the owning formatter alongside independent behavior checks.
Keep the overflow and empty-row checks, test the limit values and override policy as facts, and check delivered guidance against its owner. The oversized-text checks at lines 83–89 have the same issue. This repository requirement must be met before merging.
Context Used: AGENTS.md (source)
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/boundary/providers/RizinDebugSessionReviewRegressions.test.ts
Line: 71-77
Comment:
**Tests depend on error wording**
These new assertions pin explanatory phrases in `Error.message`, so harmless rewording breaks the tests. `docs/testing.md` requires checking limit facts instead of explanatory wording. It also says guidance checks should use the owning formatter alongside independent behavior checks.
Keep the overflow and empty-row checks, test the limit values and override policy as facts, and check delivered guidance against its owner. The oversized-text checks at lines 83–89 have the same issue. This repository requirement must be met before merging.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 715cb9797d
ℹ️ 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 parsed = parseLinuxProcessStat(stat); | ||
| if (parsed === undefined || parsed.pid !== Number(pid)) | ||
| throw new Error(`Inferior PID ${pid} has an unreadable process identity.`); | ||
| if (parsed.lifecycle === "zombie" || parsed.lifecycle === "dead") return null; |
There was a problem hiding this comment.
Check all inferior threads before accepting a zombie as ended
When a multithreaded Linux inferior's main thread calls pthread_exit while a worker remains alive, /proc/<tgid>/stat reports Z for the leader even though the thread group is still running; a local pthread fixture confirmed this case. This new null result makes verifyOwnedInferiorsEnded return true, and Rizin's #resolveInferiorRowIdentity can discard the listed inferior and return no-inferior without checking its descriptors or debugger exit policy. Cleanup can therefore signal or release the debugger while live inferior threads remain. Retain the identity until the whole thread group is proven ended rather than treating the leader's zombie state as process exit.
AGENTS.md reference: AGENTS.md:L21-L21
Useful? React with 👍 / 👎.
CassieFox23
left a comment
There was a problem hiding this comment.
TL;DR: My earlier findings still hold on head 715cb97, and I found nothing new that is wrong. 18 test files pass on Node 22, 24 and 26 in a Fedora VM, and they also pass on this head merged onto current main. Real gdb runs match my earlier ones, and a program with a pipe on stdin keeps the debugger session open, as the docs say.
This follows my earlier result on head 7fc92fa. Since then the PR grew from 15 files to 35, mostly Rizin. It now touches 19 test files, not 8. The base is now 144843c. All 8 files from my old list are among the 18 I ran.
Results
| Check | Node 22.23.4 | Node 24.22.1 | Node 26.12.1 |
|---|---|---|---|
| PR's test files on head (18 files, 541 pass, 2 skipped) | pass | pass | pass |
| Same files on head merged onto main c3647ad (#8824) | not run | pass (541 pass, 2 skipped) | not run |
| Same files with the PR's source files put back to the merge base 144843c | not run | 12 files fail (92 tests), 6 files pass | not run |
The 18 files are the 17 test files the PR touches that I could run, plus providerProcessOutput.test.ts from my old list. The 2 skipped tests are the macOS-only case in nativeDemangleCli.test.ts and the one real-Rizin case, because the VM has no Rizin. In the last row, the two new inferiorInputSink test files cannot load without the new source file.
Real programs (Node 24.22.1, gdb 17.2), head 715cb97
| Check | Result now | Same as on 7fc92fa? |
|---|---|---|
| Six single stops (listed below the tables) | stopped or already exited, same signals | yes |
| Two stop calls at once on a child that ignores SIGTERM | 1 SIGTERM, then 1 SIGKILL; both calls return stopped |
yes |
| An orphan holds the output pipes (2 cases) | incomplete after 1.3 s and 1.0 s; Node stays alive until my script kills the orphan |
yes |
gdb debugging sleep, caller sets no run ID: the program's environment |
has no run ID | yes |
Same, caller sets REA_PROCESS_RUN_ID |
holds the caller's value | yes |
New checks at this head. Each one is new, so there is nothing from 7fc92fa to compare:
| Check | Result |
|---|---|
Run ID =abc, and run ID x=y z |
reach the program unchanged |
| Run ID with a leading space, or with a line break | gdb start refused, with an error that names the run ID |
Program's stdin is /dev/null, a regular file, or closed |
close succeeds; the program keeps running |
| The program reopens its own stdin as a pipe | close returns an error that says stdin is not the terminal, /dev/null or a regular file; the session stays owned |
| Identity read on a zombie process, a live one and a missing one | zombie: none, live: a start time, missing: none |
| Process table after six debugger test files | no user process left |
The six single stops were a plain child and a child that ignores SIGTERM. Two used gdb, one attached to a running program. The last two were a child that had already exited, and a wrong exited flag. After close, the debugged program kept running and kept the selected terminal as its stdin, as before. I killed each program by its PID. I did not run main for the pipe case, so I cannot say what main does there.
Should fix
Nothing I could show.
Nit
- Orphan keeps Node alive. When an orphan holds the output pipes, the stop returns
incompleteand keeps ownership. The code then never reachesunrefOutputStreams()(src/process/ownedDebuggerSession.tsline 266), so Node waits for the orphan. This is the same as in my two earlier results and not a change from this PR. A line in the docs would help if it is meant. - Size. About 870 changed lines of Rizin source came in since my last result, plus 3,200 of Rizin tests. I could not run Rizin. There are also small edits outside the debugger folders (
CdpEndpoint.ts,PcapSnapshot.ts,analysisErrorBase.ts). A separate PR for Rizin might be easier to review. That is the maintainers' call.
Looks good
- Two stop calls at once now send each signal once (
ownedDebuggerSession.tsline 391). The PR's test for it fails on the merge-base source. - The program gets no run ID, or the caller's own, while gdb itself keeps REA's. Values GDB cannot carry are refused at start.
- The stdin check before detach works against a real gdb. It lets the terminal,
/dev/null, a regular file and a closed descriptor through. It refuses a pipe. - A zombie process counts as gone, checked on a real zombie.
- No process was left behind after the debugger tests.
- CI on this head (I read it, I did not run it): 37 pass, 14 skipped, 0 failing.
Not run
- Rizin for real: it is not installed in the VM, and the VM has no network. The Rizin changes ran only through the PR's fake-Rizin tests.
- Windows: the Job Object changes ran only as the PR's unit tests with fake native calls. CI's Windows lane passed, but I did not run it.
- macOS, and the one macOS-only case in
nativeDemangleCli.test.ts. clientProfileLifecycle.test.tsandhopperDownloadHttpFailure.test.ts: the first runsdoctorand the second builds a doctor fixture, so I skipped both.- A process-table scan during the tests. I scanned before and after.
- A retry after an incomplete stop with a real process stuck in the kernel.
- Main again: I did not re-run main, so the "on main" rows of my earlier result stand as they were.
- The whole suite. CI ran it.
- Which bot review threads GitHub shows as resolved. I read only the ones about run IDs and stdin.
Thanks, dandgabr, for the fixes since my last result.
Test setup
Commands
# in the VM, offline, each Node's folder first on PATH
npm ci --offline
npm run test:prepare
npm run test:focused -- src/application/AnalysisContextQueries.test.ts src/browser/WebBundleAnalysisWorker.test.ts src/cliJsonPaths.test.ts src/domain/analysisErrorCleanup.test.ts src/ida/IdaOperationFailures.test.ts src/process/inferiorInputSink.identityRace.test.ts src/process/inferiorInputSink.test.ts src/windows/WindowsOwnedProcess.test.ts tests/boundary/cli/nativeDemangleCli.test.ts tests/boundary/pcap/pcapSnapshotCancellation.test.ts tests/boundary/process/ownedDebuggerSession.test.ts tests/boundary/process/providerProcessOutput.test.ts tests/boundary/providers/GdbSessionManagerCoverage.test.ts tests/boundary/providers/RizinDebugSessionManagers.test.ts tests/boundary/providers/RizinDebugSessionReviewRegressions.test.ts tests/boundary/providers/RizinInferiorEnvironment.test.ts tests/boundary/providers/RizinInferiorExit.test.ts tests/boundary/providers/RizinInferiorTty.test.tsFor the "merge-base source" row I copied the tree, put the merge base's version of each of the PR's 14 non-test source files over it, deleted inferiorInputSink.ts, and ran the same command on Node 24. For the merged row I took main's tree, laid the PR's files over it, merged the 2 files that both touched with git merge-file (no conflicts), re-ran test:prepare, and ran the same command on Node 24.
The real-process runs used the same small scripts as before. One calls stopOwnedDebuggerProcess on real children. The other starts GdbSessionManager with a pseudo-terminal as the program's terminal, runs starti 300 on sleep (with < /dev/null, < /etc/hostname or <&- added for the stdin cases; for the pipe case it runs bash -c 'exec 0< <(sleep 300); exec sleep 300' under catch syscall clock_nanosleep), reads the program's environment and stdin link under /proc, then calls close. The zombie check starts a shell whose child exits while the parent never waits for it, then calls readLinuxProcessStartTime on it. Each of these scratch scripts ran only in the VM.
🤖 Written and tested with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
|
Hey @dandgabr, thanks for this! The addition looks good. What's left: it has merge conflicts with main in |
|
Hi! This PR's checks pass, but GitHub shows a merge conflict with 🤖 Written with Claude Code (Opus 5.5), posted with my OK 🦊 |
|
Thank you for this work! The owned debugger shutdown lifecycle changes were integrated and landed on |
Summary
Owned debugger shutdown now shares each full stop attempt, requires verified independent inferior stdin/stdout/stderr before detaching and signalling a POSIX debugger, and retains sessions until process and inherited-output settlement are confirmed. Windows Job Object launches fail closed for direct-child termination; failed native observation continues with referenced, capped-backoff polling, and explicit cleanup promptly resumes polling and drains newly blocked output.
GDB and Rizin verify inferior input through Linux
/proc, preserve caller-selectedREA_PROCESS_RUN_IDvalues instead of leaking REA's ownership token, and fail closed on unknown descriptor state. The latest correction requires an explicit GDB input classification: an injected verifier returning no value previously becamedurable; it now rejects before detach or signalling. Fixtures have bounded lifetimes and ownership-based teardown. Existing CLI load budgets are retained.This updates existing supervision and debugger consumers; no new provider, tool, execution authority, or mutation gate is introduced. It continues the lifecycle prerequisite split from #1279. Maintainer scope judgment remains required; no new approval is claimed.
Validation (Linux, Node 24.18.0 / npm 11.16.0)
Merged
upstream/mainthrough9af0b6113ind1c6619de, following the earlier41aa15462synchronization. The branch preserves both its CLI timeout and upstream's uninstall regression. GDB input-proof fix:202d3f7c7.GdbSessionManagerCoverage,RizinInferiorTty,clientProfileLifecycle,nativeDemangleCli— 182 passed, 1 pre-existing macOS-only skip.GdbSessionReviewRegressions,GdbSessionManagers,GdbCommandQueue,ownedDebuggerSession,providerProcessOutput,WindowsOwnedProcess,inferiorInputSink,RizinDebugSessionManagers,RizinInferiorEnvironment— 99 passed.d1c6619de: 10 focused files passed, 299 tests passed / 4 platform-gated tests skipped, covering debugger lifecycle, GDB coverage, error projection/cleanup and upstream snapshot-handle cleanup through compiled CLI/MCP.npm run check:fast— typecheck and lint passed freshly and again from the pre-push hook;git diff --checkpassed.049603306: all 43ownedDebuggerSessiontests passed;npm run build:cached,npm run check:fast, andnpm run docs:checkpassed. The actual rebuiltrea debug-with-rizin --helpoutput explicitly includes stdin and warns that the inferior may consume terminal input. Checks used the pinned Node/npm above.GdbSessionManager: a source-owned Python inferior stopped at its own SIGTRAP, detached, survived debugger close, and wrote both stdout/stderr markers to its selected TTY. Fixture resources were cleaned up. Earlier exploratory probes used MI syntax through the console API or waited for a naturally exiting target and did not establish survival; the corrected probe above passed.The prior 40 review threads were read alongside paginated comments/reviews. Two subsequent findings are corrected in
6ef308f3dand049603306: Rizin CLI help now explicitly discloses inferior stdin and possible terminal-input consumption; debugger fixture setup prepares the ownership reader before launching fixtures, with the configured Swift compiler budget plus hook overhead. Full ownership-based teardown and its assertions are retained. Independent source review of these two follow-up commits found no actionable issue.Limits and compatibility
No Windows or macOS runtime was executed here; the cold Swift compile/setup path is source-reviewed but was not reproduced on macOS; Windows tests use native-binding doubles and do not prove Job Object behavior on Windows. No full suite, package-install verification, or public CLI/MCP GDB end-to-end workflow was run. The GDB smoke establishes its production manager boundary only. Unknown detach, input, output, process identity, or settlement retains ownership rather than claiming cleanup. No performance improvement is claimed.
Author readiness
Human owner: @dandgabr