Repository navigation
feat: add sqlite-wasm package - #30
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
9397360 to
0657932
Compare
526f562 to
5db6f99
Compare
5db6f99 to
69f3d56
Compare
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
69f3d56 to
e1b71fc
Compare
|
@codex security review |
e1b71fc to
9c1229a
Compare
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
27b8945 to
3911271
Compare
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
The SQLite graph store in the browser: @sqlite.org/sqlite-wasm in a dedicated worker on the OPFS opfs-sahpool VFS, reached by Drizzle through drizzle-orm/sqlite-proxy, served to the page over oRPC's message-port transport (serveGraphStoreInWorker and connectGraphStore). Each store operation holds an exclusive Web Lock named after the database while it unpauses the pool, opens the file, runs and pauses it again, so tabs take turns on one database with no cross-origin isolation headers. Committed changes reach every tab's subscribers over a BroadcastChannel. The conformance kit runs in Chromium through Vitest's browser mode, and further browser tests run two workers on one database and reopen a database after its writer has gone. The worker module's dependencies are scanned up front so Vite never reloads the page under running tests. Refs #22
The SQLite wasm store's integration tests run in Chromium through Vitest's browser mode, so the test job installs the browser build the package's pinned Playwright expects before running them.
3911271 to
02f13cb
Compare
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Its tests drive a real browser over OPFS, which Stryker's sandboxed copies cannot start, so a run could only score the few in-process unit tests as if they were the package's coverage.
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Adds
@exadev/process-graph-sqlite-wasm, the browser driver for the SQLite graph store, stacked on #29. Closes #22 once merged, since this is where the spike's decision is implemented.The worker entry (
./worker,serveGraphStoreInWorker({ name })) runs@sqlite.org/sqlite-wasmon the OPFSopfs-sahpoolVFS, givesgraph-store-sqliteadrizzle-orm/sqlite-proxydatabase over it, and serves the store's oRPC router on the worker's own message port. The page entry (connectGraphStore(worker)) is an oRPC client overRPCLink.Why this combination, from the spike in #22:
opfsandopfs-wlneedSharedArrayBuffer, so they never install without COOP/COEP headers; SQLocal falls back to a per-tab in-memory database without them;opfs-sahpoolworks without headers but a pool is exclusive to one worker. So every store operation takes an exclusive Web Lock named after the database, unpauses the pool, opens the file, runs, and closes and pauses it before releasing the lock. The lock spans the whole store operation because a Drizzle transaction is several proxy calls. Changes committed in one tab reach every tab'schangessubscribers through aBroadcastChannel.Tests: the conformance kit runs in Chromium through Vitest's browser mode (
test:integration) with no cross-origin isolation, a fresh database per test; two workers on one database (as two tabs) read and write each other's data and hear each other's changes; a database outlives the worker that wrote it. Removing thepauseVfscall makes the two-worker test fail. The worker's dependencies are scanned up front (optimizeDeps.entries), because otherwise Vite discovered them mid-run and reloaded the page under the first test.A separate commit installs Chromium in the CI test job with the package's pinned Playwright (1.63.0; 1.64.0 is inside the install age gate).
The repo-root
lint,typecheck,test,test:integrationandtest:smokescripts, knip and syncpack all pass at the top of this stack.npm name to reserve before the first release:
npm-reserve @exadev/process-graph-sqlite-wasm --trust ExaDev/process-graph --workflow ci.yml.