Skip to content

feat(network): correlate bounded WebDriver BiDi responses - #248

Draft
seonghobae wants to merge 21 commits into
feat/webdriver-bidi-text-message-assemblyfrom
feat/webdriver-bidi-command-correlation
Draft

feat(network): correlate bounded WebDriver BiDi responses#248
seonghobae wants to merge 21 commits into
feat/webdriver-bidi-text-message-assemblyfrom
feat/webdriver-bidi-command-correlation

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Boundary

Draft child of #246. This slice owns bounded local-end WebDriver BiDi command correlation: at most 256 outstanding ids, exact typed command-family provenance and fail-closed response consumption. It performs no transport I/O, authenticates no received connection or Chromium process, and does not treat a protocol response as a browser post-condition.

Current exact head is b386f17c4826adabebda084bff2fba35aee94dd0 on exact #246 585791f3641fbe757c3bd9fd36d5316adcc78d63. Duplicate/out-of-range ids and the outstanding-command ceiling fail closed; success/correlatable error consumes only an exact matching typed id; events, null-id errors, unknown ids and kind mismatches cannot retire unrelated state. Connection-bound provenance remains a later owner repair.

Native release-record discovery was repaired to an executable unittest.TestCase; local verification passed 142 Python contracts, compileall, full Rust 1.97.1 fmt/check/workspace tests/strict Clippy/rustdoc and numeric coverage 975 functions / 9848 lines / 12563 regions / 1092 branches = 100%, with the known unstable branch-option warning.

Exact-current hosted CI 33953719566 is terminal success. This is repository quality evidence only; it does not create absent central security/review, received-connection provenance, real-browser, protected integration or release acceptance.

Keep Draft and parent-first integration. No merge, Close, self-approval, bypass, force update, destructive rebase, workflow/ruleset/secret mutation, tag, release or publication was performed.

@coderabbitai

coderabbitai Bot commented Aug 30, 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 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The exact head is genuinely repository-native GREEN, but the current root repair still leaves an impossible success + None state in WebDriverBiDiJsonEnvelope and converts that impossible state into the out-of-range sentinel MAX_WEBDRIVER_BIDI_JS_UINT + 1. The predecessor RED at line 202 and the same stale-generation RED now observed independently on #250/#251/#253/#254/#255 show this is a representation defect, not a missing realistic test. W3C WebDriver BiDi WD 18 Aug 2026 requires CommandResponse.id: js-uint, permits nullable ids only on ErrorResponse, and models events separately. Replace the sentinel workaround at this canonical correlation owner with structurally valid private routing (CommandSuccess { command_id: u64 }, CommandError { command_id: Option<u64> }, Event) while preserving public kind()/command_id() behavior. Refresh the protocol doctoring baseline in the same owner. This intentionally invalidates descendant generations parent-first; do not force-restack them until the new exact #248 head is terminally verified.

Replace the out-of-range sentinel workaround with a structurally valid common-envelope representation at the canonical command-correlation owner. Successful responses carry a required js-uint id, protocol errors alone retain nullable ids, and events are id-less. Preserve the public envelope API and refresh WebDriver BiDi doctoring to the 18 August 2026 W3C Working Draft.
seonghobae added a commit that referenced this pull request Sep 4, 2026
Non-destructively reconstruct the typed session.status command lane onto verified #248d835c35. Preserve the prior #249 lineage as first parent, adopt the repaired common-envelope/correlation/doctoring root as second parent, and retain only #249's typed session.status command source and tests.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fresh exact-head verification supersedes the queued state recorded in the earlier finding. CI 33774224507 completed success on d835c35: Rust contracts 100711784911 and Production coverage 100711785377 both completed successfully. The structural CommandSuccess/CommandError/Event repair is therefore repository-native GREEN at this exact head. This is not an approval or merge-ready claim: #248 remains Draft behind live prerequisite #247 and broader stack/governance gates. Parent-first continuation is now valid, and #249 has been non-destructively reconstructed onto this exact root; do not transfer this GREEN to that moved child.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Dependency update: canonical parent #247 moved from prior GREEN e6d5166825d0b2e7fea95b7adb6880ee64e6a6c3 to test-only 1bdfb42b35f1bda118e4b4b1a4d331db2190c3bc after review 5111407394 found that the common envelope accepts arbitrary error text even though the 3 Sep 2026 WebDriver BiDi grammar requires finite ErrorCode. GitHub now reports this #248 PR non-mergeable against the live parent. The existing exact-head CI 33774224507 remains valid evidence for this commit's own correlation delta, but it no longer proves the current parent-first stack. Keep the PR Draft; after #247 receives its minimal causal fix and fresh exact-head GREEN, reconstruct #248 non-destructively onto that verified parent, preserving only this child delta, then rerun exact Rust/coverage. Do not copy the ErrorCode vocabulary here, force-push, or weaken gates. This is a dependency repair note, not approval.

Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-parent reconstruction on exact head 43e428a4000972f78c20fb062ee0140ce65cb8d8:

  • Refetched canonical envelope parent feat(network): validate WebDriver BiDi JSON envelopes #247 at 4a9d7fa4cb8d6e31604d42a4a006a374f473d42a and merged it non-destructively.
  • Resolved the sole doctoring conflict from current official W3C evidence: latest published WebDriver BiDi Working Draft is 18 August 2026; the live Editor’s Draft retrieved 4 September identifies itself as 3 September 2026. Its local-end CDDL keeps ErrorCode finite and does not include no such client window.
  • Preserved feat(network): correlate bounded WebDriver BiDi responses #248 structural success/error/event correlation routing while adopting the parent finite error-code parser and tests.
  • Local verification passed: rustfmt, documentation contracts (22 tests, 177 subtests), strict workspace/all-target/all-feature Clippy, all workspace/all-target/all-feature tests, rustdoc with warnings denied, and pinned-nightly LLVM function/line/region/branch coverage at 100%.

Hosted exact-head checks remain authoritative. This PR remains draft and stacked on #247.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Current-head parent-first finding after fresh refetch: this branch legitimately adopted #247 only through 4a9d7fa4..., but canonical #247 has now advanced again to test-only 6cade8968c25a10a29bd9437e1622595fc37918d for the W3C no such client window interoperability defect. The current #248 tree therefore remains useful child-delta evidence but is not live-stack current; GitHub also reports it non-mergeable. Do not force-rebase or copy the common-envelope fix here. Keep Draft, preserve the correlation delta, and reconstruct non-destructively only after #247 executes the new realistic RED, receives the minimal compatibility repair, and reaches exact-head GREEN.

…e' into codex/restack-pr248

Signed-off-by: Seongho Bae <me@seonghobae.me>

# Conflicts:
#	docs/doctoring/browser-agent-protocols.md
@seonghobae

Copy link
Copy Markdown
Contributor Author

Stack RCA: this PR became conflicting when parent PR #247 advanced from 4a9d7fa4 to its current head. After fixing #247’s exact failing parser contract, merged parent head 3df49e60 into this branch and resolved the overlapping standards-doctoring text in favor of the newer 3 September 2026 W3C baseline. Exact new head: 7349dc4b5f4564824a04a0edc8b3bbebbec974ce. Semantic child delta remains bounded to command correlation (6 files, 655 additions/16 deletions versus current parent). Verification: focused envelope/correlation tests, rustfmt, workspace all-target/all-feature Clippy, full Rust tests, 139 Python tests plus 449 subtests, and fresh 100% functions/lines/regions/branches coverage are green.

Commit-Message-Assisted-by: Claude (via Claude Code)
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae marked this pull request as ready for review September 5, 2026 03:36
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head parent refresh evidence for de7754aaeb97ccb0fd47bcbe1c4d99c10eaf84eb on merged #247 head 6407895f4db4bee640074cb9c9d3cbe8b0e9e13a:

  • Adopted the current parent non-destructively with no conflicts.
  • Verification passed: rustfmt; workspace all-feature/all-target check; strict Clippy; rustdoc with warnings denied; 141 Python contracts; and the repository CI-equivalent pinned nightly-2026-08-01 branch-coverage command at 100% for production functions, lines, regions, and branches.
  • The PR is now Ready so newly queued exact-head hosted checks remain authoritative. No protected-main delivery is claimed.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Current-head review: the command-correlation production boundary is bounded and fail closed, but the public behavior had no Unreleased release record. Test-first e522826b... makes that omission explicit at source level; c5187585... adds only the missing release note and current 77cf9176... restores the prior EOF newline. Exact CI 33943423940 is materialized but both Rust contracts 101245048016 and Production coverage 101245048172 remain runner-less/queued, and no current security workflow result is returned. Do not transfer predecessor GREEN or move descendants as if this generation were accepted; protocol response correlation is not a browser post-condition.

@seonghobae seonghobae left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Current-head follow-up: the first focused documentation contract was correct about the missing release record but its global protocol ACK absence assertion over-owned unrelated future CHANGELOG prose. Exact 7d6db16... narrows that test to the one correlation release record while retaining the 256-id, CommandKindMismatch, and UncorrelatableErrorResponse source invariants. Production and release-note semantics are unchanged. Fresh current-head workflow evidence is still required; predecessor queued/native results do not transfer.

@seonghobae
seonghobae marked this pull request as draft September 5, 2026 07:46
Preserve correlation production and Rust test blobs while adopting the current verified message parent. Repair the release-record contract's zero-test unittest discovery by using the repository's existing TestCase pattern, with no workflow or dependency change.

Commit-Message-Assisted-by: Codex (via Codex)
Signed-off-by: Seongho Bae <me@seonghobae.me>
@seonghobae
seonghobae changed the base branch from feat/webdriver-bidi-json-envelope to feat/webdriver-bidi-text-message-assembly September 5, 2026 07:52
seonghobae added a commit that referenced this pull request Sep 5, 2026
Update the live queue to 12 Ready and 113 Draft PRs after #248's parent repair. Preserve the zero-test RED, exact local gates and coverage, current parent lineage, and #249's remaining dependency adoption without claiming hosted or protected delivery.

Commit-Message-Assisted-by: Codex (via Codex)
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