Skip to content

Check native and Wasm SQLite3MC open each other's files, under Node and in browsers - #12

Merged
LucaCappelletti94 merged 1 commit into
mainfrom
upstream/ci-interop-browsers
Sep 30, 2026
Merged

LucaCappelletti94 merged 1 commit into
mainfrom
upstream/ci-interop-browsers

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Owner

The same amalgamation reaches users natively through a -sys crate and in the browser through sqlite-wasm-rs, which compiles it with its own flags. Until now CI only checked that the Wasm build could reopen its own files under Node, so a flag change that made browser-written databases unreadable natively, or a failure that shows only in a real browser or on OPFS, passed every check.

A native writer built from the packaged sources now writes one database per cipher SQLite3MC offers. Those files are compiled into the Wasm tests, which read them under Node, in headless Chrome and Firefox, and on OPFS sahpool in a dedicated worker. The Wasm tests then write one database per cipher in each of those places and print it as base64, since a browser has no filesystem, and the native side decodes and opens every one. Every file must refuse a wrong key and a missing cipher setting, and no page may show plaintext. Building only the Wasm side with a different default ChaCha20 format now fails in both directions, while the old Wasm-only round trip still passed.

The interop job replaces the old wasm job and keeps its checks, so the ruleset needs the required context "sqlite-wasm-rs builds the packaged amalgamation for Wasm" swapped for the two new job names before this merges. On OPFS, SQLite3MC only encrypts after sqlite3mc_vfs_create wraps the pool, which the sahpool test does the way an app would have to.

@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: LucaCappelletti94/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 06148722-d08a-48b1-b3a9-7db44fdae80b

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8fe5535) to head (ba307c9).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines            3         3           
  Branches         3         3           
=========================================
  Hits             3         3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/ci-interop-browsers branch from f860653 to ba307c9 Compare September 30, 2026 16:12
@sonarqubecloud

Copy link
Copy Markdown

@LucaCappelletti94
LucaCappelletti94 merged commit 6676d7e into main Sep 30, 2026
22 checks passed
@LucaCappelletti94
LucaCappelletti94 deleted the upstream/ci-interop-browsers branch September 30, 2026 16:32
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