a4e6c609

By: Michael Lynch <git@mtlynch.io>

Guarantee the e2e seed database is a single file

import-from-tinybeans never closed its SQLite store, so the process
exited with an uncheckpointed write-ahead log and the seed database
landed on disk as three files: store.db, store.db-wal, and
store.db-shm. The e2e fixtures compensated by copying whichever
sidecar files existed.

Add Store.Close, which checkpoints the WAL into the main database file
and deletes the sidecars when the last connection closes, and call it
from the importer. A new test proves the close leaves a single file on
disk. The e2e fixtures now copy just the main file and fail hard if
the seed has a -wal sidecar, since copying the main file alone would
silently drop the writes still sitting in the WAL.

Verified with nix build .#e2e-tests: 19 passed (5.0s).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codeberg
configuredevShellx86_64-linuxbackendbackend-devcheck-bashcheck-frontendcheck-go-formattingcheck-go-test-packagescheck-trailing-newlinecheck-trailing-whitespacedeploy-to-flydiagramdocker-imagee2e-testsgo-testsimport-from-tinybeansjs-testslint-sqllittle-momentslittle-moments-devx86_64-linux