Skip to content

feat(browser): prove forced-close recovery evidence - #132

Draft
seonghobae wants to merge 5 commits into
test/agent-task-semantic-observation-schemafrom
test/agent-task-forced-close-recovery
Draft

feat(browser): prove forced-close recovery evidence#132
seonghobae wants to merge 5 commits into
test/agent-task-semantic-observation-schemafrom
test/agent-task-forced-close-recovery

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Partial implementation of #28, stacked on unchanged exact PR #129 head d199a0d1f30746aafc67986bf9dbc3ca88d802c6.

Buyer/reliability gap

The controlled pinned-Chromium Agent Task proves a successful observation/input/post-condition path and profile cleanup, while PR #67 defines typed interruption metadata on a separate prerequisite lane. The executable compatibility path still needed to force a real browsing-context close and prove that the next browser command fails deterministically instead of being normalized as success. Issue #28 explicitly requires renderer/tab crash or forced-close failure and recovery evidence.

Dependency

This Draft targets unchanged exact #129 head d199a0d1f30746aafc67986bf9dbc3ca88d802c6 and must remain Draft while #129/#128/#105 and their prerequisites remain active. No prerequisite check, review, status, coverage, mergeability, or synthetic-merge evidence transfers.

TDD and RCA sequence

  1. Exact test-only head 0b8c9c722c154a0eb08011420a4d502dc4324408 defined the forced-close runner, exact no such window failure, surviving-session, profile-cleanup, evidence, and overall-gate contracts before runner support existed. CI run 31633625919, Rust contracts job 94238352919, failed in the Python repository-contract suite with the intended missing _force_close_agent_task_context, missing browser-pass/trial functions, and absent forced-close evidence/gate boundaries. The unrelated Rust production-coverage job succeeded because this Python runner slice did not alter owned Rust production code; that result is not promoted as source GREEN. This is the valid RED.
  2. Head 138ad51b7fbc4c5b7b02c98d99ac798297049337 refined the contract so closing one disposable context must preserve a separate survivor context and the WebDriver session rather than accepting whole-session termination.
  3. Production head 2e0fb4db866a591e7c7bce68691462130b1f4c48 added the real pinned-Chrome/ChromeDriver forced-close probe, repeatable isolated-profile trials, bounded evidence, and fail-closed aggregate gate.
  4. Head 34a29faf05794736ea3bfc6d15961a5e23a61ec8 added hostile regressions proving that an arbitrary message containing the words no such window is not accepted as structured interruption evidence.
  5. Current exact head 5a352a05ade9e902e6729bcb40ad37b69b485db3 parses only exact direct WebDriver error framing or a structured HTTP 404 WebDriver payload whose value.error is exactly no such window.

Implemented contract

The compatibility runner now:

  • starts pinned Chrome for Testing and matching ChromeDriver in a fresh extensions-disabled Agent Task profile;
  • creates one survivor context and a separate disposable context;
  • loads the controlled local fixture only in the disposable context;
  • closes that current context through the WebDriver window-close command;
  • requires the next current-context URL command to fail specifically as structured no such window evidence;
  • fails closed when the context remains usable, the close response has no valid survivor, or another WebDriver error occurs;
  • switches back to the survivor context and proves that the same WebDriver session remains usable;
  • removes the temporary profile after each trial;
  • repeats the probe three times and emits bounded trial number, pinned browser version, close detection, session survival, cleanup, duration, pass/failure type; and
  • fails the Manifest V3/Agent Task compatibility gate unless every forced-close trial proves close detection, surviving session, and profile cleanup.

The helper recognizes only exact direct WebDriver error: no such window: ... framing or structured WebDriver HTTP 404 JSON with value.error == "no such window"; substring lookalikes and malformed payloads remain failures.

Exact-head proof

On unchanged exact head 5a352a05ade9e902e6729bcb40ad37b69b485db3 against unchanged exact prerequisite d199a0d1f30746aafc67986bf9dbc3ca88d802c6:

  • CI run 31641185937: success;
  • Rust contracts job 94263782640: repository contracts, canonical formatting, locked workspace/all-target check, full tests, strict Clippy, and rustdoc success;
  • Production coverage job 94263782478: exact owned production function/line/region/branch enforcement success;
  • Manifest V3 Compatibility run 31641185948: success;
  • CodeRabbit exact-head status: success;
  • GitHub reports the Draft mergeable against its unchanged prerequisite base; and
  • no formal reviews or inline review threads are currently returned.

No predecessor-head or prerequisite evidence is promoted as current proof.

Remaining branch-local closure

The implementation and acceptance evidence are exact-green, but this branch's changed-file set does not include a dedicated Unreleased changelog entry. PR #136 already depends on this exact head, so moving #132 only for release-note prose would invalidate descendant ancestry and exact evidence. That release-note debt must be reconciled through dependency-ordered stack alignment rather than silently treated as complete.

Truth boundary

This lane exercises one controlled forced close before an external effect. It does not synthesize or attribute a renderer crash, prove interruption handling in arbitrary Chromium processes, reconcile an ambiguous external mutation, authorize automatic retry or quarantine in the product runtime, authenticate a browser adapter, or complete #28. It is compatibility/acceptance evidence; a trusted runtime still must compose actual interruption facts with the separate typed recovery policy/evidence boundary before making retry, reconciliation, or quarantine decisions.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 26c0f7a2-2085-49eb-b8dc-c2155c734013

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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): prove forced-close recovery evidence feat(browser): prove forced-close recovery evidence Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant