Repository navigation
fix(core): order browser teardown safely - #26
Conversation
1fbfd02 to
01cc5ff
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Require verified process-group leadership and preserve errored session records when browser or helper teardown is uncertain.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c43602c31d
ℹ️ 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".
| ): Promise<StopProcessGroupResult> { | ||
| const timeoutMs = opts.timeoutMs ?? 5_000; | ||
| const leader = readProcStat(identity.pid); | ||
| if (leader === undefined || leader.state === "Z") { |
There was a problem hiding this comment.
Handle zombie group leaders before failing closed
When the recorded browser leader has exited into Z but a child/renderer is still alive in the same process group, /proc/<pid>/stat still has the matching start time and pgrp, so the group is still verifiable and safe to signal. This branch returns reused without signaling, which makes reapDeadRunningSessions mark the session error and leave the browser children plus VNC/Xvfb helpers running. Treat zombies as dead only when the group has no live members, or allow a matching zombie leader to proceed to group termination.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in c98452e. A matching zombie leader with live non-zombie group members now remains a verified group owner, so teardown signals the group. Missing leaders, reused identities, and non-leaders still fail closed. Added a focused regression; full test, coverage, typecheck, and build are green.
Allow verified zombie leaders to retain ownership of live browser group members so teardown can remove the complete process tree.
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Changed
main.Supersedes #24.
Validated
bun run typecheckbun run test— 622 passed, 2 skippedbun run test:coverage— thresholds metbun run buildbun run test packages/core— 8 files, 107 passedNot tested
Refs #17
Refs #18