Skip to content

test(id): browser conformance against the production DraftStore wiring (#14774 slice 4) - #17080

Merged
developing-today-fleet[bot] merged 1 commit into
mainfrom
xaltha/2347-14774-slice4-conformance
Nov 30, 2026
Merged

developing-today-fleet[bot] merged 1 commit into
mainfrom
xaltha/2347-14774-slice4-conformance

Conversation

@dezren39

@dezren39 dezren39 commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

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: new draftStore probe — the production DraftStore from pkgs/id/web (the exact class main.ts opens) 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 production id-web database 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 serves pkgs/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 optional close() on RecordStorePort (the IndexedDB adapter already has one) so a reopen is clean; unit test in draft-store.test.ts covers 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.ts in pkgs/id/browser, then bunx vitest run src/draft-store.test.ts in pkgs/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-bot with what you need.

…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
@coderabbitai

coderabbitai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 82671046-ac3a-433b-aa37-67661146dd3e
Commits

Reviewing files that changed from the base of the PR and between 7ed58d9 and f03f49a.

Files selected for processing: 4

  • pkgs/id/browser/test/browser_driver.ts
  • pkgs/id/browser/test/indexeddb_conformance.test.ts
  • pkgs/id/web/src/draft-store.test.ts
  • pkgs/id/web/src/draft-store.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@developing-today-fleet
developing-today-fleet Bot merged commit 03f9210 into main Nov 30, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the xaltha/2347-14774-slice4-conformance branch November 30, 2026 06:06
@dezren39

Copy link
Copy Markdown
Member Author

Verification update — lane 2347-R-H

  • fleet-run 46363323025 on this exact head (f03f49a, confirmed in the run log): the Chromium conformance suite PASSED — ✔ indexeddb conformance: shared vectors + engine probes in Chromium, tests 2 / pass 2 / fail 0, including the new draftStore probe assertions (probe output in the log matches the expected reopened draft, afterClear: null, remaining: ["b.md"]). That run's overall conclusion was failure only because the follow-on bunx vitest leg, run without a prior bun install, could not resolve vitest/config for vitest.config.ts — an invocation issue, not a test failure.
  • Re-runs with the corrected invocation (bun install first) — runs 46363770119, 46364214085, 46364929857 — all failed in the checkout step (git fetch of the branch refspec, exit 1, three attempts each) before any command ran. No code conclusion can be drawn from them; the fetch flake is being retried.
  • First dispatch 46362933152 failed earlier still: the fleet-build container has no node on PATH (exit 127) — the nix-provided node/chromium invocation above is the working form.

@dezren39

Copy link
Copy Markdown
Member Author

Post-merge verification (lane 2347-R-H): fleet-run 46366514219 on main (which includes merge commit 03f9210) — bun install && bunx vitest run src/draft-store.test.ts → completed success. All verification legs for this PR are now green: Chromium conformance on the head (run 46363323025, tests 2/2) + draft-store unit tests on merged main.

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