test(browser): retain Agent Task process teardown evidence after failure - #143
Draft
seonghobae wants to merge 2 commits into
Conversation
|
Important Review skippedDraft detected. 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 |
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 current PR #142 head
a66fb27532a689e2e2458c7ff3cb79b340d113ce.Buyer/reliability gap
PR #142 proves PID-reuse-safe termination of the exact Chrome root process after a successful controlled Agent Task, but an earlier browser-pass exception could escape through cleanup before that post-shutdown identity check ran. A failed task could therefore retain profile-cleanup evidence while losing whether its original browser root actually terminated.
Dependency
This Draft targets exact current #142 head
a66fb27532a689e2e2458c7ff3cb79b340d113ceand must remain Draft while #142 and its prerequisite stack remain active. No prerequisite check, review, status, coverage, mergeability, synthetic-merge, predecessor-head, skipped, cancelled, queued, or absent evidence transfers.TDD / RCA sequence
e847d0768d7006771b6ee10d56c52e555c0fc168required failure-path teardown retention before production support existed.31667834902, Rust contracts job94346126016, checked out that exact head and failed in Python repository contracts with the intended missing failure-teardown boundaries. This is the valid RED.d2dbf3bbee883b91812690089bb33bd274a4687aretains only a bounded failure type plus exact root-process termination evidence after browser identity capture, while preserving fail-closed behavior when identity was never captured.Implemented contract
_run_agent_task_browser_passnow:/proc/<pid>/statstart-time identity before controlled task work proceeds;OSError,ValueError,RuntimeError,json.JSONDecodeError) after that identity exists;false;failure_typeplusbrowser_process_terminated, without retaining raw exception messages or page content;Agent Task browser process did not terminateunless the exact root identity exited; andbrowser_process_terminated: trueonly after that post-shutdown proof._run_agent_task_trialnow validates and propagates the bounded failure result after temporary-profile cleanup, preserving bothtrueandfalseprocess-termination outcomes instead of indexing the success-only result shape or inventing cleanup.Exact-head proof
On unchanged exact head
d2dbf3bbee883b91812690089bb33bd274a4687aagainst unchanged exact prerequisite #142 heada66fb27532a689e2e2458c7ff3cb79b340d113ce:31669405222: success;94350746789: exact checkout, 154 Python repository-contract tests OK, Rust 1.97.1, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;94350746682: exact owned production function/line/region/branch enforcement success;31669405239: success;Truth boundary
This lane remains limited to the Chrome root PID/start-time identity already introduced by #142. It does not yet prove renderer/GPU/utility descendant termination, arbitrary process ownership, authenticated Chromium/ChromeDriver provenance, OS-wide orphan absence, crash recovery beyond the controlled runner, or completion of #28. The next test-first descendant lane separately targets termination of the exact Chromium process set sampled before shutdown; that active branch is not promoted to this PR's implemented truth.