fix(browser): harden chrome shutdown across SIGUSR1 restarts#32520
fix(browser): harden chrome shutdown across SIGUSR1 restarts#32520bmendonca3 wants to merge 2 commits intoopenclaw:mainfrom
Conversation
|
🤖 We're reviewing this PR with Aisle We're running a security check on the changes in this PR now. This usually takes a few minutes. ⌛ Progress:
Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T04:19:20Z Latest run failed. Keeping previous successful results. Trace ID: Last updated on: 2026-03-03T04:46:48Z |
Greptile SummaryThis PR hardens Key changes:
Confidence Score: 5/5
Last reviewed commit: f64b2ab |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f64b2ab1f5
ℹ️ 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".
Summary
Describe the problem and fix in 2–5 bullets:
proc.killed=truestate and skip real shutdown work.stopOpenClawChrome()to key shutdown onexitCode(actual process exit) instead ofproc.killed(signal attempt flag), and to continue TERM/KILL escalation whenkilled===truebut the process is still running.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
proc.killed=truebut the process has not actually exited.Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation:Repro + Verification
Environment
Steps
proc.killed=truebefore actual process exit.Expected
exitCode !== null).proc.killed === true.Actual
proc.killed === true, which can skip shutdown work for still-running processes.Evidence
Attach at least one:
Human Verification (required)
What you personally verified (not just CI), and how:
pnpm vitest run src/browser/chrome.test.tspasses with updated stop semantics and new regression case.killed=true + exitCode=nullretry path.Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoFailure Recovery (if this breaks)
Browser: harden SIGUSR1 chrome shutdown.src/browser/chrome.ts,src/browser/chrome.test.ts.Risks and Mitigations
exitCodecould behave differently on unusual process wrappers.