Skip to content

feat(browser): retain cleanup evidence for failed Agent Tasks - #139

Draft
seonghobae wants to merge 13 commits into
test/agent-task-pristine-profile-admissionfrom
test/agent-task-failure-cleanup-evidence
Draft

feat(browser): retain cleanup evidence for failed Agent Tasks#139
seonghobae wants to merge 13 commits into
test/agent-task-pristine-profile-admissionfrom
test/agent-task-failure-cleanup-evidence

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28, stacked on current parent #136 1cffb2e23d4002f12e8462c4c8c24f404a4eeee7.

Buyer/reliability gap

Failed ordinary and forced-close Agent Task trials previously discarded temporary-profile cleanup evidence. The bounded repair retains credential-free failure classification and verifies profile removal after the temporary-directory lifecycle, including the reviewed ChromeDriver teardown timeout class. Failed trials remain failures; cleanup evidence does not grant task completion.

Exact reviewed lineage

Current head: b7ea5bfe336456fb263dd479a60b1cd0193d8a47. Current parent: 1cffb2e23d4002f12e8462c4c8c24f404a4eeee7. The unique delta is three files: CHANGELOG, the controlled runner, and the failure-cleanup contract suite.

The preceding head 10a60f59046c1a29a6e73084804aee0203798bbb accidentally dropped inherited documentation. Existing repair b7ea5bfe restores the documentation and its regression contracts to the exact parent versions. Both canonical indexes again link ADRs 0007–0010; ADR 0009 remains Proposed. No documentation deletion remains in the current unique delta. The two stale documentation findings and informational cleanup thread were resolved after this verification; see current-head evidence.

Implemented contract

Both trial wrappers classify only OSError, ValueError, RuntimeError, JSONDecodeError, and subprocess.TimeoutExpired inside the temporary-profile lifecycle. They retain only failure type, never exception text or command paths, verify removal afterward, reject retained profiles, and return failed-trial cleanup evidence only after that check. Unreviewed exception classes remain unnormalized. Ordinary and forced-close acceptance gates require cleanup evidence from every trial, including failures.

Verification and historical provenance

All 179 Python contracts passed locally on exact head b7ea5bfe during this review. Current-head Rust contracts, Production coverage, and pinned-Chromium hosted jobs are cancelled; no fresh hosted GREEN, 100% Rust coverage, or real-browser success is claimed here.

The earlier timeout regression was introduced at RED head 0e66b24395aae595c569ad86b46e76ca3aad3a4a (recorded CI 32443705971, job 96659262887); source repair 10a60f59046c1a29a6e73084804aee0203798bbb added TimeoutExpired to the two reviewed catch lists. Its previously recorded CI 32444083415, MV3 32444083543, Semgrep 32444083450, and Security Scan 32444083490 remain predecessor-only evidence and do not transfer to the current documentation-restoration head.

Integration and truth boundary

Keep Draft while #136/#132 and their prerequisites remain active. No force-push, destructive rebase, base mutation, self-approval, workflow edit, or weakened gate is included. This controlled fixture proves neither browser-process termination nor adversarial filesystem erasure, arbitrary-task recovery, browser authenticity, durable incident evidence, policy authorization, or #28 completion. Parent integration and current-head verification remain required.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae changed the title test(browser): require failed Agent Task cleanup evidence feat(browser): retain cleanup evidence for failed Agent Tasks Aug 13, 2026
@seonghobae
seonghobae marked this pull request as ready for review August 26, 2026 22:06

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Open in Devin Review

Comment thread docs/README.md
Comment thread docs/adr/README.md
Comment thread scripts/ci/run_mv3_compatibility.py
@seonghobae
seonghobae marked this pull request as draft August 27, 2026 11:34
Signed-off-by: Seongho Bae <me@seonghobae.me>

Copy link
Copy Markdown
Contributor Author

Verified the existing repair on exact head b7ea5bfe336456fb263dd479a60b1cd0193d8a47 against current parent 1cffb2e23d4002f12e8462c4c8c24f404a4eeee7.

The earlier documentation findings were attached to 10a60f59046c1a29a6e73084804aee0203798bbb. Commit b7ea5bfe restores the inherited documentation and documentation-test contracts; the current parent-to-head diff changes only CHANGELOG, the cleanup runner, and its focused test file. Both canonical indexes again link ADRs 0007–0010, with 0009 correctly retained as Proposed rather than silently promoted to Accepted. No documentation deletion remains in this PR's unique delta.

I also checked the informational cleanup thread: both wrappers catch the reviewed failure classes inside the temporary-profile context, verify profile removal afterward, retain only the failure type, and apply all-trial cleanup gates before acceptance. All 179 current Python contracts passed with uv run python -m unittest discover -s tests. No new code commit is needed for these three threads.

Resolving the two repaired documentation findings and the informational thread does not establish current hosted GREEN, real pinned-browser evidence, process-termination proof, independent approval, or protected-main delivery. Keep this dependency-stacked PR Draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant