Skip to content

fix(bidi): make reusable application scope explicit - #298

Merged
seonghobae merged 13 commits into
feat/webdriver-bidi-presentation-capabilitiesfrom
codex/bidi-application-completeness-20260909
Sep 9, 2026
Merged

fix(bidi): make reusable application scope explicit#298
seonghobae merged 13 commits into
feat/webdriver-bidi-presentation-capabilitiesfrom
codex/bidi-application-completeness-20260909

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Product correction

The reusable BiDi planner previously accepted a complete presentation profile while emitting only reversible viewport, DPR, and timezone commands. That could be mistaken for complete profile application. This successor makes the restorable inputs explicit, keeps command payloads bound to validated presentation value objects, and distinguishes the implemented capability/planning boundary from still-unshipped live transport.

Current exact head is 369add64ea285497e9fa3f706ba85ba205adff80 on Draft parent #293 6855e2578ae94279cc9ab4a14527b016e8c049ee. Keep this PR Draft.

Test-first lineage

The predecessor application-completeness repair had local evidence on e523de76ff8e03caf1766692d8d53ca81b48c61b: 162 Python tests / 546 subtests plus locked Rust workspace tests, strict Clippy, rustfmt, and rustdoc passed there. Independent local validation later reported rustfmt, 164 Python tests / 546 subtests, locked Rust workspace tests, strict Clippy, and rustdoc green on 82f2e20ed8aa47eb40c7098ce01fdcca1b2be870. Neither result transfers to the current head.

Application completeness and validated payloads

  • 5c3513fe056e3edc770dc1fd1bc34897fe66ab3d requires public command payloads to retain validated ViewportBounds, DevicePixelRatio, and PresentationTimeZone values rather than reopening validation with raw numbers/strings.
  • 46abb40bef592181dcba0ec254b76c7e526e337c applies that minimal type-boundary repair.
  • The reusable planner takes only viewport, DPR, and timezone inputs; it no longer accepts a complete PresentationProfile while silently omitting other surfaces.
  • Review 5149967283 records the bounded validated-payload repair without approval.

Shipped-vs-planned documentation

  • 0d36e8838221b2b43c6871a5768913afda3b00ee adds the documentation contract.
  • 6e07a4d920629514d745425b40642b22ef556ff5 and 82f2e20ed8aa47eb40c7098ce01fdcca1b2be870 align README and roadmap: the version-pinned capability/command-planning boundary exists only on this active branch, while live WebDriver BiDi serialization/transport, request-response correlation, page-observed post-conditions, and cleanup observation remain unshipped.
  • Review 5149980581 records that bounded documentation repair.

Reduced-motion command authority

Fresh source review found a remaining authority leak: SetReducedMotion was still a publicly constructible command variant even though this crate has no Browser Session ownership witness or complete pre-existing media-state snapshot/restore capability. The crate's own lifecycle contract says media mutation must not occur until one of those invariants exists.

  • Test-first 3bd7b2a911fddcd6771c46568fb5e44d3c3412f8 requires ReducedMotion to remain a protocol capability while preventing this reusable planning boundary from minting an unowned media-mutation command. On predecessor source this is semantically RED; Draft admission prevents hosted execution, so no hosted RED is claimed.
  • Minimal production 369add64ea285497e9fa3f706ba85ba205adff80 removes only the public SetReducedMotion variant and its focused unit construction. PresentationSurface::ReducedMotion remains in the pinned protocol capability map.
  • Review 5150131844 confirms the bounded authority repair without approval or executable-GREEN promotion.

This does not claim that reduced-motion can never be applied. A later Browser Session-owned adapter may introduce it only after proving a disposable context/profile lifecycle or complete media-configuration snapshot/restore and page-observed cleanup.

Both inherited parent #293 P2 threads have successor handoffs and remain unresolved until #293 adopts the child deltas through normal stack integration and regenerates its own exact-head evidence.

Verification state

Exact-current CI 34315065049 completed skipped under Draft admission. Therefore current-head Python repository contracts, rustfmt, locked workspace tests, strict Clippy, rustdoc, exact 100% owned-production coverage, and browser execution are not claimed GREEN for 369add64....

Earlier Ready-triggered or local predecessor results cannot authorize this head. Only evidence bound to the exact current tree applies.

Scope and remaining gates

No transport I/O, CDP, JavaScript evaluation, browser launch, workflow, ruleset, secret, #212/#148 owner behavior, merge, tag, or release changes. No caller-mintable media-mutation authority remains in this reusable planner.

Issue #292 still owns pinned-Chromium application, request/ACK correlation, page-observed post-conditions, navigation/crash behavior, explicit reset or owned-boundary destruction, post-cleanup observation, reduced-motion lifecycle authority, and Chromium-specific remainder surfaces. Do not mark Ready, merge, tag, publish, release, force-push, destructively rebase, edit .github/**, or transfer predecessor GREEN.

@coderabbitai

coderabbitai Bot commented Sep 9, 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: 40a1be95-7951-4e87-88c9-491ec3f9a86b

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.

…9' into codex/bidi-application-completeness-20260909
@seonghobae
seonghobae changed the base branch from feat/webdriver-bidi-presentation-capabilities to codex/repair-bidi-format-20260909 September 9, 2026 04:54
@seonghobae
seonghobae changed the base branch from codex/repair-bidi-format-20260909 to feat/webdriver-bidi-presentation-capabilities September 9, 2026 04:57
@seonghobae
seonghobae marked this pull request as draft September 9, 2026 05:00

Copy link
Copy Markdown
Contributor Author

PR-state repair on exact e523de76ff8e03caf1766692d8d53ca81b48c61b: this stacked child was Ready while its base #293 remains Draft and its own body says it remains unshipped until parent/exact-head governance completes. I converted #298 back to Draft without changing source, base, or head. The Ready transition had enqueued CI 34312957077, which was still queued at the pre-transition read; that run must not be treated as merge authorization, and any terminal result applies only to this exact head. No workflow/ruleset/secret, force update, self-approval, merge, tag, or release mutation.

Copy link
Copy Markdown
Contributor Author

Writer lease ACTIVE — exact e523de76ff8e03caf1766692d8d53ca81b48c61b, bounded to the inherited validated-command construction finding only. The public WebDriverBidiPresentationCommand currently exposes raw u32 viewport dimensions, raw f64 DPR, and arbitrary String timezone even though the inward fingerprint context already owns validated ViewportBounds, DevicePixelRatio, and PresentationTimeZone value objects. Scope: test-first require those validated value objects at the public command boundary, then minimally change enum/planner/unit expectations and CHANGELOG. Preserve #298 Draft state, exact #293 base, protocol capability/application semantics, #212/#148 owner boundaries, and all workflow/ruleset/secret state. No AGENTS/CLAUDE edit, Ready transition, merge, tag, release, force push, or destructive rebase.

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

Exact-head source review on 46abb40bef592181dcba0ec254b76c7e526e337c: the inherited validated-command construction finding is repaired at the type boundary. SetViewport now carries ViewportBounds and DevicePixelRatio; SetTimezone carries PresentationTimeZone, so downstream transport code cannot construct zero/oversized viewport dimensions, NaN/non-positive DPR, or arbitrary timezone strings through these public variants. The planner retains the same two reusable intents and reduced-motion remains outside reusable application. This is not an approval or executable GREEN: exact CI 34313352903 is skipped under Draft admission, so full repository gates and pinned-browser evidence remain outstanding. Keep Draft.

Copy link
Copy Markdown
Contributor Author

Writer lease RELEASED — exact 46abb40bef592181dcba0ec254b76c7e526e337c. Test-first 5c3513fe... and minimal production 46abb40b... close only the validated-command construction slice; review 5149967283 confirms the bounded source repair without approval. Exact CI 34313352903 is skipped under Draft admission, so no current-head repository/browser GREEN is claimed. Parent #293's validated-command thread has a successor handoff but remains unresolved until normal adoption. No source/docs/PR-state authority from this slice is retained.

Copy link
Copy Markdown
Contributor Author

Writer lease ACTIVE — exact 46abb40bef592181dcba0ec254b76c7e526e337c, bounded to the remaining inherited documentation-status P2 only. Current branch contains an originweave-bidi capability/command-planning crate, while README.md still groups all WebDriver BiDi as “planned but not yet shipped” and docs/product-roadmap.md still lists an undifferentiated versioned BiDi adapter as wholly remaining. Scope: test-first distinguish active-branch capability/planning implementation from still-unshipped live transport/application, then minimally align README and roadmap. Preserve Draft/base/source semantics and protected-main shipment truth. No AGENTS/CLAUDE, workflow/ruleset/secret, Ready, merge, tag, release, force-push, or rebase mutation.

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

Exact-head documentation review on 82f2e20ed8aa47eb40c7098ce01fdcca1b2be870: the inherited shipped-vs-planned P2 is repaired without promoting live browser behavior. README now records the active-branch originweave-bidi capability/command-planning boundary while explicitly keeping live WebDriver BiDi transport planned and open-PR-only. The roadmap now separates that version-pinned planning foundation from remaining serialization, request/response correlation, page-observed post-conditions, and cleanup observation. This is a docs/source-consistency repair only, not protected-main shipment or browser GREEN. Keep Draft; current exact-head hosted repository/browser gates have not executed.

Copy link
Copy Markdown
Contributor Author

Writer lease RELEASED — exact 82f2e20ed8aa47eb40c7098ce01fdcca1b2be870. Test-first 0d36e883... plus README 6e07a4d... and roadmap 82f2e20... close only the shipped-vs-planned documentation slice; review 5149980581 records the bounded repair without approval. Exact CI 34313583351 is skipped under Draft admission, so no repository/browser GREEN is claimed. Parent #293 received a successor handoff and its thread remains unresolved until normal adoption. No source/docs/PR-state authority is retained.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Independent exact-head validation at 82f2e20 completed locally: rustfmt, 164 Python tests with 546 subtests, locked Rust workspace tests, strict Clippy, and rustdoc passed. This is local evidence only. The PR remains Draft and has no transferable hosted or browser-runtime GREEN.

Copy link
Copy Markdown
Contributor Author

Writer lease ACTIVE — exact 82f2e20ed8aa47eb40c7098ce01fdcca1b2be870, bounded to one authority-boundary follow-up discovered after the application-completeness repair. SetReducedMotion remains a publicly constructible command variant even though this crate has no Browser Session ownership/snapshot witness and its own rustdoc says callers must establish such a lifecycle before constructing/sending it. Scope: test-first prevent the reusable/versioned BiDi planning boundary from minting an unrestorable media-mutation intent while preserving ReducedMotion as a protocol capability surface; align only the affected source/test/docs state. Keep Draft and the #293 base. No .github/**, workflow/ruleset/secret, Ready, merge, tag, release, force-push, or destructive rebase.

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

Exact-head authority-boundary review on 369add64ea285497e9fa3f706ba85ba205adff80: the reusable/versioned BiDi planning crate no longer exposes a caller-constructible SetReducedMotion command while lacking any Browser Session ownership or complete media-state snapshot/restore witness. ReducedMotion remains in the protocol-capability surface, but actual media mutation is deferred to a later Browser Session-owned adapter that can prove a disposable lifecycle or full restoration. Test-first 3bd7b2a911fddcd6771c46568fb5e44d3c3412f8 fixes this as an API-surface contract; minimal production 369add64... removes only the unowned command variant and its focused unit assertion. This is not approval or executable GREEN: exact CI 34315065049 is Draft-skipped, so repository gates and real browser application/cleanup evidence remain outstanding.

Copy link
Copy Markdown
Contributor Author

Writer lease RELEASED — exact head 369add64ea285497e9fa3f706ba85ba205adff80. Test-first 3bd7b2a911fddcd6771c46568fb5e44d3c3412f8 plus minimal production 369add64... remove only caller-mintable reduced-motion command authority from the reusable BiDi planning boundary while preserving ReducedMotion as a protocol capability. Review 5150131844 records the bounded repair. Exact CI 34315065049 is Draft-skipped, so no current-head repository/browser GREEN is claimed. #292 retains Browser Session lifecycle and real pinned-Chromium application/post-condition/cleanup evidence; #212 retains current-generation sandbox/workflow ownership. No source/docs/PR-state authority from this slice is retained.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Review finding (exact head 369add64ea285497e9fa3f706ba85ba205adff80): the final commit deliberately removes SetReducedMotion, but tests/test_webdriver_bidi_presentation_adapter_contract.py still requires that symbol in both test_2026_09_03_bidi_capabilities_fail_closed_for_complete_profile and test_reusable_apply_and_cleanup_do_not_mutate_unrestorable_media_state.

Reproduction:

uv run pytest tests/test_bidi_media_authority_contract.py tests/test_webdriver_bidi_presentation_adapter_contract.py -q
2 failed, 6 passed, 3 subtests passed

The Rust crate test passes, so the source-only contract was not included in that gate. Update the older assertions to require the intended absence of a reusable media-mutation command and retain the positive protocol-capability check. Then rerun the exact targeted Python contract suite and the full repository gate before making the Draft ready. This is a non-approval review finding; no Chromium runtime or protected-main claim follows.

…tract-repair-20260909

test(bidi): align media authority contract
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head follow-up for d01f45c2c8ac7b0fc4dbc3d3ada60238732cdf8c: the 2026-09-09 source-contract finding is already repaired by non-force merge #305 (5be09591). Fresh reproduction now passes: uv run pytest tests/test_bidi_media_authority_contract.py tests/test_webdriver_bidi_presentation_adapter_contract.py -q → 8 passed, 3 subtests. Full local current-head verification also passes: 165 Python tests / 546 subtests, Rust workspace all-target tests, rustfmt, strict Clippy, and rustdoc with warnings denied.

Visual inspection: GitHub-rendered exact-head README in Edge desktop shows the pre-alpha/active-branch planning boundary, headings, long identifiers, and originweave-bidi explanation without clipping, overlap, or contrast loss. This remains local/document-rendering evidence only. #298 is still Draft on Draft parent #293, so hosted checks are skipped and no browser-runtime, protected-main, approval, merge, or release claim follows.

@seonghobae
seonghobae marked this pull request as ready for review September 9, 2026 09:15
@seonghobae
seonghobae merged commit 2d97c12 into feat/webdriver-bidi-presentation-capabilities Sep 9, 2026
6 checks passed
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