Skip to content

fix(browser): await confirmed session closes - #130

Merged
senamakel merged 1 commit into
epic/202-tinycomputerfrom
epic-202-h3-driver
Oct 20, 2026
Merged

senamakel merged 1 commit into
epic/202-tinycomputerfrom
epic-202-h3-driver

Conversation

@senamakel

Copy link
Copy Markdown
Member

Concurrent close_session calls now wait for the in-flight browser close instead of reporting success while it is still running. A backend close failure stays visible and can be retried, so callers do not release a profile based on an unconfirmed close.

Validation: cargo fmt --all -- --check, cargo clippy --locked -p tinycomputer-browser --all-targets -- -D warnings, and cargo test --locked -p tinycomputer-browser.

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@tinysweeper

tinysweeper Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Tiny Sweeper review

Tiny Sweeper reviewed this change across 5 lane(s) and found 0 active actionable finding(s). Detailed lane evidence and any incomplete work are listed below.

State: Incomplete
Priority: none
Reviewed head: 6b781fe47c85
Updated: 2026-10-20T23:36:43Z

Review snapshot

Change surface Files Review signal Count
Production 2 Active findings 0
Tests 1 Noted findings 0
Documentation 0 Resolved findings 0
Configuration 0 Pending checks/questions 8

Completeness: Incomplete
Test assessment: No supported feature-to-test mapping was available; this does not mean tests are absent or passed.

Features

None identified with supported citations.

Tests

No supported feature-to-test mapping was produced. Test execution is not inferred.

  • Unreviewed: tinysweeper/tests

Findings

No active actionable findings.

Could not review: crates/tinycomputer-browser/src/fake/mod.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs, tinysweeper/description, tinysweeper/tests

Before merge

  • Complete the critique review for crates/tinycomputer-browser/src/fake/mod.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs.
  • Complete the security review for crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/fake/mod.rs.
  • Complete the tests review for tinysweeper/tests.
  • Complete the description review for tinysweeper/description.

How this fits together

flowchart LR
  n0["Fake<br/>changed"]:::changed
  n1["Browser<br/>changed"]:::changed
  n2["Session<br/>changed"]:::changed
  n3["open_session_with_context"]:::impacted
  n4["...refused_before_content_reaches_the_engine"]:::impacted
  n5["Value"]:::impacted
  n6["with_scratch"]:::impacted
  n7["...ion_and_value_without_debugging_the_value"]:::impacted
  n8["...metadata_without_sending_text_to_the_page"]:::impacted
  n0 -->|uses| n5
  n1 -->|uses| n2
  n3 -->|uses| n2
  n4 -->|calls| n6
  n4 -->|tests| n6
  n7 -->|calls| n3
  n7 -->|tests| n3
  n7 -->|calls| n6
  n7 -->|tests| n6
  n8 -->|uses| n1
  n8 -->|calls| n6
  n8 -->|tests| n6
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading
Agent review details

critique

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinycomputer-browser/src/fake/mod.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs
  • Lane summary: Reviewed 0 files; 0 findings. 3 files could not be reviewed: crates/tinycomputer-browser/src/fake/mod.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs.

security

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/fake/mod.rs
  • Lane summary: Reviewed 0 files; 0 findings. 3 files could not be reviewed: crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/fake/mod.rs.

tests

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/tests
  • Lane summary: No reviewer produced a usable response.

commits

  • Conclusion: Neutral
  • Scope reviewed: all assigned evidence
  • Lane summary: Nothing sensitive found in what this pull request commits.

description

  • Conclusion: Neutral
  • Scope reviewed: incomplete; unanswered: tinysweeper/description
  • Lane summary: No reviewer produced a usable response.
Evidence and run details
  • Models: ladder/vectors-oai3
  • Spend: $0.000033
  • Tokens: 0 input · 0 output · 0 cached · 253 embedding
Head State Pass summary
6b781fe47c85 incomplete 0 active finding(s), 0 resolved finding(s) (at 2026-10-20T23:36:43Z)

tinysweeper 0.1.2

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

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: Advanced
  • Run ID: 72f8e7e0-29df-4897-b4fb-21625d347f99

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T23:38:37.911112Z 6b781fe PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@senamakel
senamakel merged commit d9eb61a into epic/202-tinycomputer Oct 20, 2026
8 of 15 checks passed

@tinysweeper tinysweeper 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.

tinysweeper found nothing blocking, but could not review everything, so this is not an approval: crates/tinycomputer-browser/src/fake/mod.rs, crates/tinycomputer-browser/src/sessions/mod.rs, crates/tinycomputer-browser/src/sessions/sessions_tests/lifecycle_tests.rs, tinysweeper/description, tinysweeper/tests.

$0.0000 · 0 in / 0 out · 253 embedded · ladder/vectors-oai3

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

session.run(json!({"action": "close"})).await?;

P1 Badge Preserve a retry path for failed surface closes

When a BrowserSurface-owned session encounters any close error, BrowserSurface::close has already removed the session ID from its slot and ignores the spawned close result (surface/mod.rs:285-295). Propagating the error here therefore leaves the session in this map while the normal surface lifecycle has no way to retry it, so it keeps counting toward MAX_SESSIONS; repeated transient close failures—or a browser that is already dead and can never confirm another close—eventually make all later browser tasks fail with LimitExceeded until the module restarts. The background cleanup path needs to retain/retry the ID or remove sessions known to be terminally closed.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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