Skip to content

feat(store): SQLite Stores are synchronous=NORMAL only; remove the Disposable (OFF) profile - #757

Merged
yifanxuaaa merged 1 commit into
layerfs_v2_0_0from
docs/store-sync-normal
Nov 23, 2026
Merged

yifanxuaaa merged 1 commit into
layerfs_v2_0_0from
docs/store-sync-normal

Conversation

@yifanxuaaa

Copy link
Copy Markdown
Contributor

Summary

Owner direction 2026-11-23: every SQLite Store opens WAL / synchronous=NORMAL. The Disposable (WAL / synchronous=OFF) profile is removed.

  • layerfs-persistence: SqlitePersistenceProfile::Disposable removed; permitted() is Normal only. The read-only diagnostic open uses Normal. Snapshot copies (VACUUM INTO and the copy's checkpoint) write with the Store's synchronous instead of OFF.
  • layerfs-bridge: StoreProfile::Disposable renamed StoreProfile::Normal. Wire byte 2 is unchanged, so existing manifests still decode. The daemon, install, init and discovery checks and their messages follow.
  • layerfs-store: new and restored Store records carry profile: "normal". A record written earlier with "disposable" reads as "normal" (record::profile) and is never rewritten. New test profile_label.
  • Tests, examples, benches select Normal. disposable_startup_sync (which asserted OFF never syncs) is removed. Assertions expect synchronous=1 and sqlite-wal-normal-v2, and the call-surface examples (calls.json, families/store.json) answer profile: "normal".
  • Docs and AGENTS.md describe Normal as the only SQLite Store profile. Recorded receipts measured under the former Disposable/OFF profile are labelled as such.

Unchanged on purpose (these are not Stores)

  • Each Workspace's overlay database (MEMORY journal, OFF, EXCLUSIVE).
  • The compaction visited scratch and the diagnostic scratch.
  • The compaction rebuild's bulk-load phase. Its fresh file is switched to WAL with the Store's synchronous, then sync_all'd and renamed into place.

Durable stays NOT_RUN — disabled by owner until explicit reauthorization. Store files copied outside SQLite (install, transfer, restore) are still not synchronized (layerfs-project#155 §7.3).

Verification

  • macOS, release, through tools/worktree.py: cargo clippy --release --all-targets -D warnings on persistence, bridge, store-service, project, daemon, store, api, cli, control, sandbox, bucket and nfs: clean.
  • All 130 changed test targets pass (497 tests), including profile_label, sqlite_publication, background_checkpoint, snapshot, serverless_store, api contract and cli usage_lines.
  • Linux (build container): the persistence and store-service targets pass. The daemon's real-mount tests (mounted_*, forced_producers, fp27_reader_health, r5_10_producer_profile) are NOT_RUN here: every failure is kernel attach Device: No such file or directory or a denied fusectl mount, because the container has no /dev/fuse. These need a FUSE-capable Linux host.

🤖 Generated with Claude Code

…sposable (OFF) profile

Owner direction 2026-11-23: every SQLite Store opens WAL / synchronous=NORMAL.

- layerfs-persistence: remove SqlitePersistenceProfile::Disposable; permitted()
  is Normal only; the read-only diagnostic open uses Normal; snapshot copies
  (VACUUM INTO and the copy's checkpoint) write with the Store's synchronous
  instead of OFF.
- layerfs-bridge: StoreProfile::Disposable is renamed StoreProfile::Normal
  (wire byte 2 unchanged), with the daemon, install, init and discovery
  checks and their messages.
- layerfs-store: new and restored Store records carry profile "normal"; a
  record written earlier with "disposable" reads as "normal" and is never
  rewritten (record::profile, test profile_label).
- Tests, examples and benches select Normal; disposable_startup_sync (OFF
  never syncs) is removed; assertions expect synchronous=1 and
  sqlite-wal-normal-v2; call-surface examples answer profile "normal".
- Docs and AGENTS.md describe Normal as the only SQLite Store profile;
  recorded receipts measured under the former Disposable/OFF profile say so.

Unchanged on purpose (not Stores): each Workspace's overlay database, the
compaction and diagnostic scratch files, and the compaction rebuild's bulk
load (its file is sync_all'd and renamed into place). Durable stays
NOT_RUN — disabled by owner until explicit reauthorization.

Verified on macOS (release): clippy -D warnings on the affected crates, and
all 130 changed test targets pass. Linux daemon mount tests were not run:
the build container has no /dev/fuse.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yifanxuaaa
yifanxuaaa merged commit 343c59b into layerfs_v2_0_0 Nov 23, 2026
2 checks passed
@yifanxuaaa
yifanxuaaa deleted the docs/store-sync-normal branch November 23, 2026 05:21
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