Skip to content

release: v0.19.2 — Firefox saveState/eval/console fixes#10

Merged
hamr0 merged 2 commits into
mainfrom
fix/ff-parity-review-fixes
Jul 11, 2026
Merged

release: v0.19.2 — Firefox saveState/eval/console fixes#10
hamr0 merged 2 commits into
mainfrom
fix/ff-parity-review-fixes

Conversation

@hamr0

@hamr0 hamr0 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

Three validated fixes from a /code-review medium pass over the Firefox parity arc (v0.16.0–v0.19.1). Each was confirmed against real Firefox before fixing; two candidate findings were validated-but-declined (would regress).

  • saveState sameSite casing — Firefox wrote BiDi's lowercase lax/strict/none, but the only loader (connect({ storageState })) is CDP-only and rejects a lowercase enum → the whole Network.setCookies batch threw and every cookie was silently dropped, making a Firefox-saved state useless for auth restore. Now capitalized to Lax/Strict/None.
  • Firefox eval statement regression — a Phase-4 await (${expr}) wrapper turned every statement list (var x=2; x*3) into a SyntaxError. Now evaluates the raw expression (BiDi script.evaluate has eval-semantics) + a new deserializeBiDi() walks the {type,value} remote value back to CDP's plain-value shape — statements work and deep objects stay clean.
  • Console object-arg formatting — no longer splats nested {type,value} serialization into the daemon log; falls back to the type name (CDP-parity).

Declined (validated, but fixing would regress): premature network-idle on redirect (empty-pending window is microscopic; a 3xx-skip breaks manual/background 3xx) and download savedPath URL-mismatch (unreproduced).

Verification

  • tsc --noEmit → 0
  • Tests 228/228 (unit 144 · browse+interact 31 · cli 20 · firefox 33)
  • /ship Ready · /security clean · /diff-review Ready-to-merge
  • Fixes verified end-to-end against real Firefox (POCs)

🤖 Generated with Claude Code

hamr0 and others added 2 commits July 11, 2026 14:51
… (BiDi)

Three fixes from a /code-review medium pass over the FF parity arc
(v0.16.0–v0.19.1), each validated against real Firefox before fixing:

- saveState wrote BiDi's lowercase sameSite (lax/strict/none), but the only
  loader for a state file is connect()'s CDP-only storageState → Network.setCookies,
  whose enum is capitalized (Lax/Strict/None). The lowercase value was rejected
  and the swallowing try/catch dropped EVERY cookie — the cross-engine auth
  restore was silently dead. Capitalize on save.
- daemon Firefox `eval` wrapped the expression in `await (${expr})`, which is a
  SyntaxError for any statement list ("var x=2; x*3") — a regression vs the raw
  script.evaluate it replaced (and vs the CDP Runtime.evaluate path). Evaluate
  the raw expression (eval-semantics: statements work) and walk BiDi's
  {type,value} remote value back to a plain value via new deserializeBiDi().
- daemon Firefox console capture splatted objects' nested {type,value}
  serialization into the log; fall back to the type name, matching the CDP
  capture's RemoteObject.description ("Object").

Declined (validated, but fixing would regress): premature network-idle on
redirect (empty-pending window is microscopic; a 3xx-skip breaks manual/
background 3xx) and download savedPath URL-mismatch (unreproduced, speculative).

Tests: +3 deserializeBiDi cases, +object-arg console assertion, saveState now
asserts capitalized sameSite. tsc 0; unit 144/144; CLI 20/20; FF integration 33/33.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZpPPhwXmSfN1n7uX7RAxT
…ole args fixes

Three validated fixes from a /code-review pass over the FF parity arc
(saveState cross-engine cookie casing, statement-form eval regression, console
object-arg formatting). See CHANGELOG [0.19.2].

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MZpPPhwXmSfN1n7uX7RAxT
@hamr0
hamr0 merged commit 0830fac into main Jul 11, 2026
1 check passed
@hamr0
hamr0 deleted the fix/ff-parity-review-fixes branch July 11, 2026 13:02
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