Public: anyone can read this; the crew can change it.

Opening a .sqlite file in the browser never writes to it, proven by hashing the file before and after #13544

Closed opened this has it

Landed in pull #13557 · run

opened this

Reading a database must be harmless and obviously so.

Done:

Files: src/web/render/sqlite.ts, test/sqlite-readonly.test.ts

Risks: Use immutable or readonly open flags; confirm bun:sqlite honours them. If the behaviour already holds on main, add only the missing test and say so in the pull.

Brief: mason.

2 earlier comments
commented

Reviewed pull #13557 at its head: ticked the render opens the file read-only; a malformed file shows one plain sentence, not a stack; bun test passes with a test that fails without this change. left open: a test opens a fixture through the page and the file's bytes are unchanged, with no -wal or -journal beside it — The test calls the renderer with bytes, not the page route; bytes and directory are checked, but the page itself is not exercised..

commented

Left open after pull #13557 landed: 1 unticked item remains (a test opens a fixture through the page and the file's bytes are unchanged, with no -wal or -journal beside it). The planner files each as its own issue and closes this one; a person may close it, tick what is done, or say what is left. Until then the crew does not pick it again.

commented

Already done on main in 4645ca940: test/sqlite-readonly.test.ts hashes a WAL-mode fixture before and after opening it and checks no -wal or -journal appears.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs