Skip to content

Keep waiting for the answer when a page read stalls after the send - #17

Merged
ryanduguid merged 2 commits into
mainfrom
ryan/wait-through-page-stalls
Oct 30, 2026
Merged

ryanduguid merged 2 commits into
mainfrom
ryan/wait-through-page-stalls

Conversation

@ryanduguid

@ryanduguid ryanduguid commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A page read that times out or throws after the send no longer fails the run while ChatGPT is still answering. The answer wait keeps polling for up to 10 command budgets, and no prompt is sent again.

 wait_answer loop
-  privacy check or result read fails -> run fails
+  privacy check or result read stalls -> poll again, within the window
+  privacy refusal, closed connection, or an exception with no description -> run fails, as before

Evidence

  • Before: with the wait disabled, the new test a_page_stall_after_the_send_keeps_waiting_and_captures_the_answer_without_a_second_send fails with the error seen in live runs: CDP command timed out; acknowledgement is uncertain. Do not replay. Method: Runtime.evaluate.
    After: it passes, with the answer captured and exactly 1 send.
  • a_privacy_refusal_from_the_result_read_ends_the_wait_at_once passes: the guard's refusal stays final. A live CDP check in a blank tab confirmed a thrown error reports its message in exceptionDetails.exception.description, which this classification reads.
  • Session records since 28 October 2026 hold 56 attempts that sent and then failed, 12 of them on this timeout, each with a saved conversation ID.
  • cargo fmt --check, cargo build and cargo clippy --all-targets -- -D warnings pass.
  • cargo test --no-fail-fast: 923 pass. bridge_doctor_accepts_and_ignores_verbose_like_commander and local_browser_cli_and_mcp_admit_foreground_and_detached_rust_workers fail here and on clean main f12ebe9.

Merge danger

Door: two-way. Blast radius: browser runs

A page that stays stalled now fails after about 11 minutes rather than at the first failed read. Answers are still accepted only after Temporary Chat is verified on the poll that reads them.

Unverified

  • Not run against live ChatGPT; both new tests use the fake CDP peer.
  • Whether each live Browser expression failed was the privacy guard is not recorded. Those that were still fail at once, by design.
  • Local full unit runs on this head each had 1 to 3 different timing failures on a loaded machine (for example Browser profile transaction deadline reached). All were rerun alone and passed; a clean full run on the first commit of this change had 0 failures. CI is the check for a quiet run.

This branch does not contain the tab cleanup or tab retention work, which exists only on the separate local Alcuin line.

The answer wait failed the run on the first page read that timed out or threw,
although ChatGPT was still answering. Every prompt was already sent, so the
answer was lost unless its tab could still be read. The wait now rides out such
reads for up to 10 command budgets. Each poll repeats the same reads, so nothing
is sent again, and a privacy refusal or closed connection still ends it at once.
@ryanduguid
ryanduguid enabled auto-merge (squash) October 30, 2026 23:26
@sonarqubecloud

sonarqubecloud Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

@ryanduguid
ryanduguid merged commit da2d63b into main Oct 30, 2026
11 checks passed
@ryanduguid
ryanduguid deleted the ryan/wait-through-page-stalls branch October 30, 2026 23:44
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