Skip to content

[docs] decision: storage exposes a typed cookie API and storage_state save/restore#17673

Open
AutomatedTester wants to merge 2 commits into
trunkfrom
adr-bidi-cookies-storage-state
Open

[docs] decision: storage exposes a typed cookie API and storage_state save/restore#17673
AutomatedTester wants to merge 2 commits into
trunkfrom
adr-bidi-cookies-storage-state

Conversation

@AutomatedTester

Copy link
Copy Markdown
Member

💥 What does this PR do?

Proposes a design decision record: storage exposes a typed cookie API and storage_state save/restore.

BiDi cookies use an awkward wire shape (value is a BytesValue descriptor, partitioning via a descriptor), so the common "set a session cookie" case carries needless ceremony. And the most-requested workflow — log in once, capture state, restore it to skip login in later sessions (Playwright's storage_state) — has no Selenium equivalent. This record proposes a typed Cookie value for set_cookie/get_cookies plus a save_state/load_state pair, while being explicit that cookies come from the BiDi protocol whereas localStorage is captured via script.evaluate and IndexedDB is out of scope.

🔧 Implementation Notes

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code
    • What was generated: Initial draft of the decision record, derived from a CDDL-validated comparison of the Python BiDi surface against Playwright; revised through discussion and review
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

One of a set of BiDi ergonomics decision records proposed together. The cookie convenience and storage_state are kept in one record as a single cohesive storage-ergonomics decision; reviewers who prefer them split can request that. Cross-binding convergence is tracked in the binding-status table.

🔄 Types of changes

  • Documentation (design decision record)

@AutomatedTester AutomatedTester force-pushed the adr-bidi-cookies-storage-state branch from be86795 to 5a87b78 Compare June 11, 2026 18:30
@AutomatedTester AutomatedTester added the A-needs decision TLC needs to discuss and agree label Jun 15, 2026
… partition unit

Rename 0003 -> 17673 and note that the raw-partition escape hatch covers
targeting a specific user context (17681).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-needs decision TLC needs to discuss and agree

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant