Skip to content

fix(kv-store): skip pool creation on ephemeral deleteDb to unstick browser tests#22704

Draft
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
claudebox/fix-merge-train-fairies
Draft

fix(kv-store): skip pool creation on ephemeral deleteDb to unstick browser tests#22704
AztecBot wants to merge 1 commit intomerge-train/fairiesfrom
claudebox/fix-merge-train-fairies

Conversation

@AztecBot
Copy link
Copy Markdown
Collaborator

What

Forward-port of PR #22693 from merge-train/spartan to merge-train/fairies. The kv-store SQLite-wasm-over-OPFS change (#22658) is now in fairies via the latest next → fairies merge, but the fix from #22693 has not yet propagated, so every fairies merge-train CI run is timing out on the kv-store browser tests.

yarn-project/kv-store/src/sqlite-opfs/worker.ts::handleDeleteDb installs an OPFS SAH Pool on every teardown, even for :memory: ephemeral DBs (which never back a file). The OPFS SAH Pool acquires an exclusive directory lock; under heavy test churn + --cpus=2 CI contention, the next test's pool install can block indefinitely waiting for the previous terminated worker's OPFS handles to release. The deleteDb RPC has no timeout, so afterEach hangs and the whole yarn test run times out.

All kv-store browser tests use AztecSQLiteOPFSStore.open(mockLogger, undefined, true) (ephemeral), so handleInit never sets up a pool — handleDeleteDb has nothing to unlink. Skip the pool install in that case. Non-ephemeral stores are unchanged.

Failing CI

Verification

  • yarn test:browser — 131 passed / 2 skipped (~12.8s).
  • yarn test:node blocked locally by missing @aztec/bb.js artifact (transitive dep, pre-existing env limitation, unrelated to this fix). The failing CI step timed out in the browser half before node tests started.

Full analysis: https://gist.github.com/AztecBot/c2e5ab8c838332ed915529db81d3f442

Related

ClaudeBox log: https://claudebox.work/s/8d2f61f686747a33?run=1

ClaudeBox log: https://claudebox.work/s/8d2f61f686747a33?run=1

@AztecBot AztecBot added ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR. labels Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-draft Run CI on draft PRs. claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant