Repository navigation
test(id): browser conformance against the production DraftStore wiring (#14774 slice 4) - #17080
Conversation
…iring (#14774 slice 4) The Chromium conformance suite in pkgs/id/browser now also drives pkgs/id/web's DraftStore (the class main.ts opens) against real IndexedDB: an offline draft writes through the store layer, reads back, lists in key order, survives a close/reopen of the production id-web database, syncs only over its base version, and clears. This is the #16808 remainder: the conformance suite did not yet run against the web wiring. DraftStore gains a close() delegating to the port (optional on RecordStorePort) so a reopen is clean; unit test covers it. Refs #14774, #16808
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
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. |
|
Verification update — lane 2347-R-H
|
|
Post-merge verification (lane 2347-R-H): fleet-run 46366514219 on main (which includes merge commit 03f9210) — |
Refs #14774, #16808
What
#16808 (closed, PR #16810 merged) recorded a remainder: "the browser conformance suite does not yet run against the web wiring." This PR closes that remainder — it is the conformance half of #14774 slice 4 (offline drafts), the only unchecked slice on #14774.
pkgs/id/browser/test/browser_driver.ts: newdraftStoreprobe — the productionDraftStorefrompkgs/id/web(the exact classmain.tsopens) driven against real IndexedDB in Chromium: save two drafts, read back, list in key order, sync decisions (matching →sync, diverged/missing hash →conflict, absent →none), close + reopen the productionid-webdatabase and read the draft back (the offline-write / later-session path), then clear.pkgs/id/browser/test/indexeddb_conformance.test.ts: the harness now also servespkgs/id/web/src/draft-store.ts(type-stripped, adapter import rewritten like the driver's) and asserts the probe's observations exactly on the Node side.pkgs/id/web/src/draft-store.ts:DraftStore.close()delegating to an optionalclose()onRecordStorePort(the IndexedDB adapter already has one) so a reopen is clean; unit test indraft-store.test.tscovers delegation + the no-close port no-op.The service worker is untouched (stays a cache), per the slice contract.
Verification
Remote dispatch on this head (f03f49a): fleet-run run 46362933152 (developing-today/fleet) —
node --experimental-transform-types --test test/indexeddb_conformance.test.tsinpkgs/id/browser, thenbunx vitest run src/draft-store.test.tsinpkgs/id/web. Conclusion recorded on the PR / #14774 when it lands; merge follows on success per lane verification judgment (CI is not a merge gate).Lane 2347-R-H (Xaltha).
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-30T05:57:41Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "c36a28d672723b085b14125996bcd72b1931e09d" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.