fix(browser): tolerate ChromeDriver exit races during teardown - #153
Open
seonghobae wants to merge 5 commits into
Open
fix(browser): tolerate ChromeDriver exit races during teardown#153seonghobae wants to merge 5 commits into
seonghobae wants to merge 5 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
seonghobae
marked this pull request as ready for review
August 14, 2026 10:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partial implementation of #28, stacked on exact PR #150 head
cb03afd86c303e7217987f850c47c73089cef9bf.Falsifiable defect
All three pinned browser lanes previously signaled ChromeDriver through raw
terminate()/kill()calls. If the child exited immediately before either signal boundary, Python could raiseProcessLookupErroreven though the child had already terminated, converting a normal teardown race into a compatibility failure. The cleanup also granted TERM wait and KILL wait independent full five-second budgets instead of one total teardown deadline.RED -> RCA -> GREEN
acc2d2707f2f18c2666b61ee706ab597a3bc5c8cintroduced behavioral contracts for child exit immediately before TERM, child exit immediately before KILL, propagation of unrelated signal errors, and one cleanup boundary across all three pinned browser lanes.f8738768d1ec94bd4f9e046220395898ea15d09aintroduced_terminate_chromedriver_process, using one monotonic deadline across TERM wait and optional KILL escalation while normalizing onlyProcessLookupErrorexit races.4d4209eaa5ca478d3e08c2f963ab0ce3f69f72bbthen exposed a repository-contract regression in CI run31789991615:test_forced_close_browser_failure_is_returned_after_teardown_waitsstill searched the removed literaldriver.wait(timeout=5). That was a stale test assertion, not an infrastructure failure and not a reason to weaken the production cleanup.89c1d12cc3afcdde04a565cd440c741039aa6462updates that contract to assert ordering through_terminate_chromedriver_process(driver), preserving the required shutdown -> Linux teardown proof -> failure-return sequence.Current exact-head evidence
Current exact head:
89c1d12cc3afcdde04a565cd440c741039aa6462.Exact prerequisite/base head:
cb03afd86c303e7217987f850c47c73089cef9bf.31790801953: success on the exact head.94737022518: Python repository contracts, canonical formatting, locked workspace check, full tests, strict Clippy, and rustdoc success.94737022579: exact owned-production function/line/region/branch enforcement success.31790802032: success on the exact head.Predecessor-head failures are historical only and are not promoted as current exact-head evidence. Passing automation is not independent approval.
Truth boundary
This lane hardens controlled pinned-browser CI cleanup only. It does not establish cgroup/task ownership, discover post-snapshot processes, prove OS-wide orphan absence, authenticate Chromium/ChromeDriver provenance, implement a cross-platform product process supervisor, or turn the compatibility runner into a product browser API.
The stack prerequisite PR #150 remains open. The scheduled actor does not merge or self-approve.