Skip to content

feat(network): write bounded BiDi WebSocket opening request - #195

Draft
seonghobae wants to merge 667 commits into
feat/webdriver-bidi-websocket-handshake-requestfrom
feat/webdriver-bidi-websocket-opening-write
Draft

feat(network): write bounded BiDi WebSocket opening request#195
seonghobae wants to merge 667 commits into
feat/webdriver-bidi-websocket-handshake-requestfrom
feat/webdriver-bidi-websocket-opening-write

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Buyer/runtime boundary

This Draft owns one narrow WebDriver BiDi transport step: write the complete bounded RFC 6455 client opening request on the same verified TCP stream produced by its prerequisite stack, without reading or accepting the server handshake.

Fresh stack truth

  • protected main: exact 87c4daa1830bac5a5228b6036752ad5633232085;
  • live base / retained feat(network): serialize bounded BiDi WebSocket opening request #193 prerequisite head: exact 6922dd98779e8f8aad132a3b1f563d7ba6e6d070;
  • this Draft exact contributor head: 63997bcf555e2c5c8e91ba287734ffba3837a1b7;
  • GitHub reports the Draft open and mergeable; and
  • this remains dependency-root work. No predecessor check, approval, coverage, synthetic merge, or stale-head evidence transfers.

Stale-tree recovery

Historical whole-tree repair 5c111d0db6c363f9d1786c21cc01c5c7398007bd restored the opening-write prerequisite while also dropping valid protected product/source/test/documentation assets. That deletion is treated as a repair finding, not a reason to close descendants.

The content-aware recovery remains on this earliest active owner point:

  • 29dd314501299a3ad8276e5d73189591ff6327a0 restores protected product contracts while preserving the branch's WebDriver BiDi modules: BAP workspace, MCP/release-acceptance contracts, destination revalidation, policy MCP binding, resource errors, TLS revocation/trust, Agent Task fixture, gap baseline and directly coupled contracts.
  • 89708cf5e474f7701513b84a1356a8ce1699bef5 restores extraction schema, sensitive-handle lifecycle and RFC 3986 evidence-path admission while retaining BrowserProtocolValidationEvidence.
  • 22449238068929127dc41176756776fc628f1880 through 64114aab9e000f9cdc017f68e6c926e5abf28df3 reconcile the live commercial baseline, architecture/index/ADR discoverability, product authority contracts and the protected MCP product boundary without copying a whole protected tree over later WebDriver work.

Workflow source remains untouched by this scheduled product lane. The non-workflow protected metadata .github/dependabot.yml was restored because the recovered rust-toolchain contract requires it and protected main contains the canonical weekly rust-toolchain updater.

Test-first gap-baseline repair

The refreshed gap snapshot had acquired a self-staleness defect: tests/test_gap_snapshot_inventory_consistency.py required the evidence commands to contain the literal then-current #195 head 89708cf.... Any later content repair necessarily moved the PR head and made the supposedly current baseline stale.

Commit dbf3de6688ec2f714b31c85fa2751eee18267c60 is the RED contract. Commit 7b2f30941ba2a2b17870f31a835a3ed0217be17c makes the evidence procedure re-resolve #195's live head before querying checks.

That exact predecessor then produced exercised hosted RED in CI 34010603105: Production coverage succeeded, MV3 34010603003 succeeded, but Python repository contracts reported five recovery defects. Three were safe leaf/content repairs and are fixed:

  • 6e5aeb583738aa3b3c3433d7f63265fac8aef8c3 restores protected .github/dependabot.yml;
  • c8f850707474726eb580ec2652c254e79d37bb9b aligns the BAP lifecycle regression with the canonical - **Status:** Proposed ADR metadata instead of a formatting-only false negative; and
  • 7dbdf0364768f049286bc5cb59e85e9978d533ca restores the exact fail-closed signed cross-platform artifacts release wording required by the commercial completion contract.

Commit 63997bcf555e2c5c8e91ba287734ffba3837a1b7 records that repair lineage in docs/product-technical-gap-baseline.md.

Exact-current exercised RED

Exact head 63997bcf555e2c5c8e91ba287734ffba3837a1b7 has now executed:

  • repository CI 34013251657: failure;
  • Rust contracts job 101432585450: failure only at Check Python repository contracts after checking out exact 63997bcf...;
  • Production coverage job 101432585502: success, including exact coverage enforcement; and
  • Manifest V3 Compatibility 34013251651: success.

The two Python failures are exactly the protected-workflow-generation mismatches, not new product-source defects:

  • test_ci_validates_the_exact_pull_request_head expects workflow/repository-scoped concurrency identity containing ${{ github.workflow }}-${{ github.repository }}, while this historical branch still carries ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}; and
  • test_branch_coverage_uses_one_current_date_pinned_nightly expects three uses of nightly-2026-08-18, while this branch still carries nightly-2026-08-01.

This confirms the restored contracts fail closed on the exact current head while production coverage and MV3 remain healthy. The tests are not weakened here, and this scheduled writer does not edit .github/workflows/**. The exercised evidence and exact job identities were handed to canonical workflow-owner issue #279 in comment 5557341445.

Implemented transport boundary

The production opening-write implementation is unchanged by these recovery repairs. It consumes the already-verified stream and writes the complete bounded opening request under one nonzero caller deadline capped at five seconds; retries only interrupted writes; distinguishes timeout configuration, timeout/would-block, zero-write, non-recoverable write, deadline and timeout-cleanup failures; drops failed partial-write streams; clears the operation-local write timeout before successful handoff; retains verified transport evidence/client key/request byte count/write budget; and classifies ambiguous full-write/deadline outcomes as ReconciliationRequired rather than blindly redispatching.

It still does not read or validate the peer opening response, establish WebSocket state, authenticate Chromium/ChromeDriver process provenance, or grant browser/Agent authority.

Remaining integration boundary

PR #242 still targets the pre-recovery #195 generation 48eb2d23009c1c804520dd5efcd0d4d072aacef1 and remains the next dependent repair point. Before this stack can be promoted dependency-first:

  1. the authorized workflow owner must preserve/adopt the protected current CI generation on the repaired feat(network): write bounded BiDi WebSocket opening request #195 foundation, then exact-current CI/MV3 must execute again;
  2. any further RED must be repaired on that exact head without weakening restored contracts;
  3. fix(network): restore bounded BiDi opening-response validation #242 and descendants must adopt the verified repaired foundation non-destructively and regenerate their own exact-head evidence;
  4. [Governance] Repair MV3 workflow ownership and sandbox contract #212 separately owns current-generation Chromium sandbox-helper workflow integration; and
  5. protected integration still requires configured central workflows, resolved review threads and any qualifying independent approval required by live rules.

Passing automation is not approval. This Draft remains Draft. No administrative bypass, merge, self-approval, force update, destructive rebase, workflow/ruleset/secret weakening, tag, release, or publish is performed here.

@coderabbitai

coderabbitai Bot commented Aug 19, 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.

opencode-agent Bot and others added 25 commits August 24, 2026 07:05
seonghobae added a commit that referenced this pull request Sep 5, 2026
Bring PR #93 onto PR #195 exact head b852245 so the shared macOS loopback lifetime race is repaired without rewriting either branch.

Commit-Message-Assisted-by: Claude (via Claude Code)
Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae added a commit that referenced this pull request Sep 5, 2026
Refresh the active-stack baseline and executable inventory contracts with the exact #195 and #93 heads, their local verification, and the remaining authority boundaries.

Commit-Message-Assisted-by: Claude (via Claude Code)
Signed-off-by: Seongho Bae <me@seonghobae.me>
seonghobae added a commit that referenced this pull request Sep 5, 2026
Bring PR #242 onto PR #195 exact head b852245 without rewriting either branch.

Commit-Message-Assisted-by: Claude (via Claude Code)
Signed-off-by: Seongho Bae <me@seonghobae.me>
Keep the accepted loopback socket alive until local shutdown and fail-closed write classification complete, removing a macOS ENOTCONN race from coverage.

Commit-Message-Assisted-by: Claude (via Claude Code)
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact head 48eb2d2 fixes the remaining revoked-stream macOS fixture race: the accepted peer stays alive through local shutdown and fail-closed write classification. The focused regression passed 50/50, then 139/139 Python contracts, Rust fmt/check/test/all-target Clippy/rustdoc, and exact 100% production function/line/region/branch coverage passed. Fresh hosted checks remain required.

seonghobae added a commit that referenced this pull request Sep 5, 2026
Bring PR #242 onto PR #195 exact head 48eb2d2 without rewriting either branch.

Commit-Message-Assisted-by: Claude (via Claude Code)
Signed-off-by: Seongho Bae <me@seonghobae.me>
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