diff --git a/AGENTS.md b/AGENTS.md index ba3eb94de4..ad6f1737f3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,7 +14,7 @@ assignment. Earlier wording of these guides is in the | Rule | Where | | --- | --- | -| Normal / WAL / synchronous=NORMAL is the product SQLite Store profile; Durable execution is `NOT_RUN` | [Persistence profile](#active-persistence-profile--owner-direction-2026-11-17) | +| Normal / WAL / synchronous=NORMAL is the only SQLite Store profile (Disposable removed 2026-11-23); Durable execution is `NOT_RUN` | [Persistence profile](#active-persistence-profile--owner-direction-2026-11-17) | | One attempted operation: no automatic retry, busy handler, refresh or replay | [§4](#4-code-build-and-docs) | | Build tests with `--no-run` first; every test command stops at 120 s, and reaching it is a hang | [§4](#4-code-build-and-docs) | | CI reports and never gates; verify your own change and report checks and gaps | [§4](#4-code-build-and-docs) | @@ -105,12 +105,13 @@ assignment. Earlier wording of these guides is in the from 2026-10-07). The owner enabled it ahead of its safety and performance gate ([layerfs-project#155](https://github.com/Ephemeral-AI-Lab/layerfs-project/issues/155) §7.5 and §7.6), which has **not** been run: claim no power-loss guarantee - from it yet. Store files written outside SQLite (install, transfer, restore, - snapshot) are still not synchronized (#155 §7.3). -- Disposable / synchronous=OFF remains selectable, and existing tests, - diagnostics and measurements that select it explicitly keep doing so. A - Store's manifest and record still carry the `disposable` label; it names the - non-durable WAL Store, not the connection's synchronization. + from it yet. Store files written outside SQLite (install, transfer, restore) + are still not synchronized (#155 §7.3). +- **Normal is the only SQLite Store profile** (owner, 2026-11-23): the former + Disposable / synchronous=OFF profile was removed, so tests, diagnostics, + measurements and snapshot copies open Stores Normal too. New Store records + carry the profile label `normal`; a record written earlier that says + `disposable` reads as `normal` and is never rewritten for it. - Durable execution is disabled indefinitely, until the owner explicitly allows it again. A milestone, old benchmark selection, default argument or passing build does not reauthorize Durable; never execute it or fall back to @@ -118,7 +119,7 @@ assignment. Earlier wording of these guides is in the `NOT_RUN — disabled by owner until explicit reauthorization`. Historical Durable receipts keep their verdicts. This policy does not claim the Durable API was removed. -- A Normal or Disposable COMMIT does not checkpoint (`wal_autocheckpoint=0`); +- A Normal COMMIT does not checkpoint (`wal_autocheckpoint=0`); the writing session's own thread checkpoints the WAL off the commit path with the session's synchronization (owner approval, 2026-11-07; [SQLite checkpoints](docs/architecture/engine/store/sqlite.md#checkpoints)). diff --git a/README.md b/README.md index bdf64ff02e..d855ed1f8c 100644 --- a/README.md +++ b/README.md @@ -43,9 +43,11 @@ https://github.com/user-attachments/assets/70c25887-86a1-4d81-bd78-571cf1c09a18 > Node and Python ([`api/`](api/README.md)) and the native `layerfs` command. It replaces > 1.1.0's `@layerfs/agent`, `@layerfs/backend`, `@layerfs/runtime` and `@layerfs/cli`; > see the [2.0.0 manual](docs/versioned/2.0.0/README.md). -> The results below are 1.0.0's, measured on `main` at `e5c7aaae05`. The Store runs in its Disposable profile only, with no -> crash or power-loss durability: use LayerFS for agent work and its history, not -> as the only copy of data you cannot rebuild. +> The results below are 1.0.0's, measured on `main` at `e5c7aaae05` with the then-Disposable +> profile (`synchronous=OFF`). A SQLite Store now opens with the Normal profile (WAL, +> `synchronous=NORMAL`), whose safety gate has not run, so no power-loss durability is +> claimed: use LayerFS for agent work and its history, not as the only copy of data you +> cannot rebuild. Since 1.1.0, LayerFS also supports native Windows dsh Live through WSL2 and its own Linux Docker Engine; see the [Windows setup](https://github.com/Ephemeral-AI-Lab/dsh-layerfs#windows-live). @@ -180,8 +182,8 @@ writable tree, and every result becomes a Commit on a Branch in one shared Store | **[try](https://github.com/binpash/try)** | Run a command against an overlay of your system, then inspect, apply or discard what it changed | `try` works on one machine with one overlay at a time. LayerFS keeps every result as a Commit, and lets many agents branch from any of them and share one Store | | **Apiary and virtual layered file systems** (Potter and Nieh, [USENIX ATC 2010](https://www.usenix.org/conference/usenix-atc-10/apiary-easy-use-desktop-application-fault-containment-commodity-operating), [LISA 2011](https://www.usenix.org/legacy/event/lisa11/tech/full_papers/Potter.pdf)) | Ephemeral containers that start instantly over shared layered filesystems | Apiary isolates desktop applications. LayerFS's target is agent tool calls whose results are kept, branched and merged as history | -**Use something else** if you need crash or power-loss durability (the Store runs -in its Disposable profile only), full POSIX node types, or top sequential I/O +**Use something else** if you need power-loss durability (the Store's Normal +profile claims none yet), full POSIX node types, or top sequential I/O bandwidth ([fio](https://layerfs.ai/benchmarks/fio/)). For a few long-lived checkouts on one machine, Btrfs snapshots or Git worktrees may be all you need. diff --git a/api/crates/layerfs-api/tests/docker_default_image.rs b/api/crates/layerfs-api/tests/docker_default_image.rs index 9ea646d2e4..5530545f9a 100644 --- a/api/crates/layerfs-api/tests/docker_default_image.rs +++ b/api/crates/layerfs-api/tests/docker_default_image.rs @@ -102,7 +102,7 @@ esac ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("docker")), ]), ) diff --git a/api/crates/layerfs-api/tests/doctor_targets.rs b/api/crates/layerfs-api/tests/doctor_targets.rs index afe30804b0..133cd8fa57 100644 --- a/api/crates/layerfs-api/tests/doctor_targets.rs +++ b/api/crates/layerfs-api/tests/doctor_targets.rs @@ -204,7 +204,7 @@ fn a_project_s_record_is_checked_against_its_store() { let manifest = layerfs_bridge::provision::StoreManifest { provider: layerfs_bridge::provision::ProviderKind::Sqlite, locator: "/layerfs-store/global/store.sqlite".into(), - profile: layerfs_bridge::provision::StoreProfile::Disposable, + profile: layerfs_bridge::provision::StoreProfile::Normal, binding: vec![1; 16], cursor_key: [7; 32], stack: [2; 17], diff --git a/api/crates/layerfs-api/tests/init.rs b/api/crates/layerfs-api/tests/init.rs index bcdbc6629c..a6e2de41c0 100644 --- a/api/crates/layerfs-api/tests/init.rs +++ b/api/crates/layerfs-api/tests/init.rs @@ -19,7 +19,7 @@ fn request(directory: &Path) -> InitRequest { InitRequest { source: directory.join("source"), store: PersistenceConfig::sqlite(directory.join("sealed.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), locator: "/store/store.sqlite".into(), policy: StoragePolicy::frozen_default(), catalog: HistoryCatalogConfig { @@ -59,7 +59,7 @@ fn init_seals_complete_root_and_first_branch_without_retained_handles() { .unwrap(); assert_eq!(project.initialized.entries, 6); assert_eq!(project.manifest.provider, ProviderKind::Sqlite); - assert_eq!(project.manifest.profile, StoreProfile::Disposable); + assert_eq!(project.manifest.profile, StoreProfile::Normal); assert_eq!(project.manifest.locator, "/store/store.sqlite"); assert_eq!( project.manifest.bytes, @@ -82,7 +82,7 @@ fn init_seals_complete_root_and_first_branch_without_retained_handles() { ) .unwrap(); assert_eq!(handles.profile().journal_mode, "wal"); - assert_eq!(handles.profile().synchronous, 0); + assert_eq!(handles.profile().synchronous, 1); assert_eq!( handles .history @@ -131,7 +131,7 @@ fn init_seals_complete_root_and_first_branch_without_retained_handles() { .as_bytes(), b"../file" ); - println!("SDK_INIT entries=6 full_file_oracle_bytes=140014 host_sqlite={} store_bytes={} profile=Disposable",project.manifest.host_sqlite,project.manifest.bytes); + println!("SDK_INIT entries=6 full_file_oracle_bytes=140014 host_sqlite={} store_bytes={} profile=Normal",project.manifest.host_sqlite,project.manifest.bytes); } drop(storage); handles.seal().unwrap(); diff --git a/api/crates/layerfs-api/tests/list_pages.rs b/api/crates/layerfs-api/tests/list_pages.rs index b625cc8fbe..1d22f5280e 100644 --- a/api/crates/layerfs-api/tests/list_pages.rs +++ b/api/crates/layerfs-api/tests/list_pages.rs @@ -2,7 +2,7 @@ //! default page of 100, plain and under a folder scope: every page boundary //! is crossed, the last page has no `next_cursor`, and a bad limit or cursor //! is refused (#30, #33; 2.0 call surface). The Store's paging is real: one -//! Disposable home, Branches made by `branch.fork`. +//! Normal home, Branches made by `branch.fork`. use layerfs_api::home; use layerfs_api::Scope; use layerfs_bridge::control::SdkValue; diff --git a/api/crates/layerfs-api/tests/local_install.rs b/api/crates/layerfs-api/tests/local_install.rs index 869c2de206..8f4ade4a21 100644 --- a/api/crates/layerfs-api/tests/local_install.rs +++ b/api/crates/layerfs-api/tests/local_install.rs @@ -29,7 +29,7 @@ fn sealed(directory: &Path) -> SealedProject { let request = InitRequest { source: directory.join("source"), store: PersistenceConfig::sqlite(directory.join("sealed.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), locator: "/layerfs-store/global/store.sqlite".into(), policy: StoragePolicy::frozen_default(), catalog: HistoryCatalogConfig { diff --git a/api/crates/layerfs-api/tests/logs_inspect.rs b/api/crates/layerfs-api/tests/logs_inspect.rs index 2421059e1f..6be73ce617 100644 --- a/api/crates/layerfs-api/tests/logs_inspect.rs +++ b/api/crates/layerfs-api/tests/logs_inspect.rs @@ -122,7 +122,7 @@ fn home_records(home: &Path, machine: &str, platform: &str, worker: Option<(Sock ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/api/crates/layerfs-api/tests/machine_files.rs b/api/crates/layerfs-api/tests/machine_files.rs index 33c58d132f..0839ea0460 100644 --- a/api/crates/layerfs-api/tests/machine_files.rs +++ b/api/crates/layerfs-api/tests/machine_files.rs @@ -99,7 +99,7 @@ fn home_records(home: &Path, machine: &str, platform: &str, worker: Option<(Sock ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/api/crates/layerfs-api/tests/machine_force.rs b/api/crates/layerfs-api/tests/machine_force.rs index a98453ef4c..7ff9b00650 100644 --- a/api/crates/layerfs-api/tests/machine_force.rs +++ b/api/crates/layerfs-api/tests/machine_force.rs @@ -90,7 +90,7 @@ esac ("name", t("shop")), ("kind", t("sqlite")), ("machine", t("vm")), - ("profile", t("disposable")), + ("profile", t("normal")), ]), ) .unwrap(); diff --git a/api/crates/layerfs-api/tests/machine_force_native.rs b/api/crates/layerfs-api/tests/machine_force_native.rs index 46eb5b639b..001e67143c 100644 --- a/api/crates/layerfs-api/tests/machine_force_native.rs +++ b/api/crates/layerfs-api/tests/machine_force_native.rs @@ -245,7 +245,7 @@ fn native_force_stops_live_daemon_and_command_and_detaches_mount_without_opening .unwrap() .unwrap() .get_text("profile"), - Some("disposable") + Some("normal") ); call( &home, diff --git a/api/crates/layerfs-api/tests/machine_no_start.rs b/api/crates/layerfs-api/tests/machine_no_start.rs index 787df6d51b..bbed32ab0a 100644 --- a/api/crates/layerfs-api/tests/machine_no_start.rs +++ b/api/crates/layerfs-api/tests/machine_no_start.rs @@ -66,7 +66,7 @@ fn home_with_stopped_vm(tag: &str) -> PathBuf { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("dev")), ]), ) diff --git a/api/crates/layerfs-api/tests/machine_stats.rs b/api/crates/layerfs-api/tests/machine_stats.rs index ea39a518db..f3df0f2b1d 100644 --- a/api/crates/layerfs-api/tests/machine_stats.rs +++ b/api/crates/layerfs-api/tests/machine_stats.rs @@ -117,7 +117,7 @@ fn store_record(home: &Path, machine: &str) { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/api/crates/layerfs-api/tests/sandbox_capacity.rs b/api/crates/layerfs-api/tests/sandbox_capacity.rs index 9319dd897b..228dc1c778 100644 --- a/api/crates/layerfs-api/tests/sandbox_capacity.rs +++ b/api/crates/layerfs-api/tests/sandbox_capacity.rs @@ -192,7 +192,7 @@ fn home_records(home: &Path, worker: bool) { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("native")), ]), ) diff --git a/api/crates/layerfs-api/tests/sandbox_capacity_worker.rs b/api/crates/layerfs-api/tests/sandbox_capacity_worker.rs index a7b5ab0a27..0f06ffd42d 100644 --- a/api/crates/layerfs-api/tests/sandbox_capacity_worker.rs +++ b/api/crates/layerfs-api/tests/sandbox_capacity_worker.rs @@ -99,7 +99,7 @@ fn home_records(home: &Path, worker: SocketAddr) { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("box")), ]), ) diff --git a/api/crates/layerfs-api/tests/sandbox_direct.rs b/api/crates/layerfs-api/tests/sandbox_direct.rs index 176805b9d5..2322546f74 100644 --- a/api/crates/layerfs-api/tests/sandbox_direct.rs +++ b/api/crates/layerfs-api/tests/sandbox_direct.rs @@ -168,7 +168,7 @@ fn machine( ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/api/crates/layerfs-api/tests/sandbox_files.rs b/api/crates/layerfs-api/tests/sandbox_files.rs index 72b79c4fb7..e5f60a8dfd 100644 --- a/api/crates/layerfs-api/tests/sandbox_files.rs +++ b/api/crates/layerfs-api/tests/sandbox_files.rs @@ -102,7 +102,7 @@ fn home_records(home: &Path, machine: &str, platform: &str, worker: Option<(Sock ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/api/crates/layerfs-api/tests/sandbox_get_no_lease.rs b/api/crates/layerfs-api/tests/sandbox_get_no_lease.rs index 4280c55989..a241c3b57b 100644 --- a/api/crates/layerfs-api/tests/sandbox_get_no_lease.rs +++ b/api/crates/layerfs-api/tests/sandbox_get_no_lease.rs @@ -357,7 +357,7 @@ fn home_records(home: &Path, machine: &str, platform: &str, worker: Option<(Sock ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/api/crates/layerfs-api/tests/sandbox_retired_docker.rs b/api/crates/layerfs-api/tests/sandbox_retired_docker.rs index 385df780a7..2388dafde6 100644 --- a/api/crates/layerfs-api/tests/sandbox_retired_docker.rs +++ b/api/crates/layerfs-api/tests/sandbox_retired_docker.rs @@ -119,7 +119,7 @@ fn home_with_retired(tag: &str, worker: SocketAddr, converted: bool) -> PathBuf ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("docker")), ]), ) diff --git a/api/crates/layerfs-api/tests/store_doctor_busy.rs b/api/crates/layerfs-api/tests/store_doctor_busy.rs index 90aa7998b1..ce54a72d76 100644 --- a/api/crates/layerfs-api/tests/store_doctor_busy.rs +++ b/api/crates/layerfs-api/tests/store_doctor_busy.rs @@ -60,7 +60,7 @@ fn a_store_another_writer_holds_is_busy_not_a_schema_error() { drop( SqliteHandles::create( PersistenceConfig::sqlite(&file) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: BINDING.to_vec(), diff --git a/api/crates/layerfs-api/tests/store_family.rs b/api/crates/layerfs-api/tests/store_family.rs index ef6efbeb40..0cca8ecd02 100644 --- a/api/crates/layerfs-api/tests/store_family.rs +++ b/api/crates/layerfs-api/tests/store_family.rs @@ -435,7 +435,7 @@ fn a_killed_opener_leaves_its_log_frames() { let identity = layerfs_store::identity::identity_of(&record).unwrap(); let handles = layerfs_persistence::SqliteHandles::open_writable( layerfs_persistence::PersistenceConfig::sqlite(&file) - .with_sqlite_profile(layerfs_persistence::SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(layerfs_persistence::SqlitePersistenceProfile::Normal), &identity.binding, identity.cursor_key, ) @@ -588,7 +588,7 @@ fn compact_of_a_remote_sqlite_store_takes_its_machines_worker_route() { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("box")), ]), ) diff --git a/api/crates/layerfs-api/tests/store_lifecycle.rs b/api/crates/layerfs-api/tests/store_lifecycle.rs index 20ba2ce00e..8482e354cd 100644 --- a/api/crates/layerfs-api/tests/store_lifecycle.rs +++ b/api/crates/layerfs-api/tests/store_lifecycle.rs @@ -272,7 +272,7 @@ fn home_with_stopped(machine_field: SdkValue) -> PathBuf { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", machine_field), ]), ) diff --git a/api/crates/layerfs-api/tests/store_projects.rs b/api/crates/layerfs-api/tests/store_projects.rs index 773d0a4fa3..2c7e57a8ea 100644 --- a/api/crates/layerfs-api/tests/store_projects.rs +++ b/api/crates/layerfs-api/tests/store_projects.rs @@ -25,7 +25,7 @@ const BINDING: &[u8] = b"store-first-proof"; const CURSOR: [u8; 32] = [41; 32]; fn store(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn catalog() -> HistoryCatalogConfig { diff --git a/api/crates/layerfs-api/tests/store_routes.rs b/api/crates/layerfs-api/tests/store_routes.rs index f644abe84f..e806ac36e0 100644 --- a/api/crates/layerfs-api/tests/store_routes.rs +++ b/api/crates/layerfs-api/tests/store_routes.rs @@ -46,7 +46,7 @@ fn sqlite_record(machine: SdkValue) -> SdkValue { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", machine), ]) } diff --git a/api/crates/layerfs-api/tests/worker_dial.rs b/api/crates/layerfs-api/tests/worker_dial.rs index 74d2d76db8..b6c7c66524 100644 --- a/api/crates/layerfs-api/tests/worker_dial.rs +++ b/api/crates/layerfs-api/tests/worker_dial.rs @@ -52,7 +52,7 @@ fn home_on_box(tag: &str, address: SocketAddr) -> PathBuf { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("box")), ]), ) diff --git a/api/crates/layerfs-api/tests/worker_mismatch.rs b/api/crates/layerfs-api/tests/worker_mismatch.rs index d4bd208fa1..c634e985cc 100644 --- a/api/crates/layerfs-api/tests/worker_mismatch.rs +++ b/api/crates/layerfs-api/tests/worker_mismatch.rs @@ -22,7 +22,7 @@ fn a_store_call_to_an_old_worker_names_stop_then_start_and_sends_nothing() { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("box")), ]); write_record(&paths::store_record(&home, "shop"), &store).unwrap(); diff --git a/api/crates/layerfs-cli/tests/cancel_forwarded.rs b/api/crates/layerfs-cli/tests/cancel_forwarded.rs index cface7d5f1..b285e5615e 100644 --- a/api/crates/layerfs-cli/tests/cancel_forwarded.rs +++ b/api/crates/layerfs-cli/tests/cancel_forwarded.rs @@ -230,7 +230,7 @@ fn home_with(tag: &str, worker: SocketAddr) -> PathBuf { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("box")), ]), ); diff --git a/api/crates/layerfs-cli/tests/cancel_worker.rs b/api/crates/layerfs-cli/tests/cancel_worker.rs index 6073f8e97b..d12eb00a26 100644 --- a/api/crates/layerfs-cli/tests/cancel_worker.rs +++ b/api/crates/layerfs-cli/tests/cancel_worker.rs @@ -144,7 +144,7 @@ fn home_with_sandbox(tag: &str, seen: Seen) -> PathBuf { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("docker")), ]), ) diff --git a/api/crates/layerfs-cli/tests/common/stream_worker.rs b/api/crates/layerfs-cli/tests/common/stream_worker.rs index 5951d3b864..33d17e9603 100644 --- a/api/crates/layerfs-cli/tests/common/stream_worker.rs +++ b/api/crates/layerfs-cli/tests/common/stream_worker.rs @@ -143,7 +143,7 @@ pub fn home_with_workspace(tag: &str) -> PathBuf { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t("docker")), ]), ) diff --git a/api/node/test/contract/cases.mjs b/api/node/test/contract/cases.mjs index 20cd990bfb..2d060f382b 100644 --- a/api/node/test/contract/cases.mjs +++ b/api/node/test/contract/cases.mjs @@ -31,7 +31,7 @@ const bad = (id, group, call, args, expect, opts = {}, more = {}) => ({ id, grou export const steps = [ // --- setup: a Store, a project from a folder, a Branch - ok("store", "setup", "store.create", ["shop"], { detail: true }, { check: (v) => assert.equal(v.profile, "disposable") }), + ok("store", "setup", "store.create", ["shop"], { detail: true }, { check: (v) => assert.equal(v.profile, "normal") }), ok("init", "setup", "project.init", (ctx) => [P, ctx.folder], { detail: true }, { check: (v) => assert.equal(v.project, P) }), ok("fork", "setup", "branch.fork", [P, B, "main"], { detail: true }, { check: (v) => assert.equal(v.outcome, "forked") }), diff --git a/api/node/test/project_export.mjs b/api/node/test/project_export.mjs index 85a86383c5..50f707fe72 100644 --- a/api/node/test/project_export.mjs +++ b/api/node/test/project_export.mjs @@ -210,8 +210,8 @@ test("native Node export: default main, selected Branch, callbacks, refusals and const lfs = real.client({ home: f.home }); try { assert.equal(typeof lfs.project.export, "function", "LP53a table entry required"); - await lfs.store.create("shop"); // public create selects the sole Disposable profile - assert.equal((await lfs.store.get("shop", { detail: true })).profile, "disposable"); + await lfs.store.create("shop"); // public create selects the sole Normal profile + assert.equal((await lfs.store.get("shop", { detail: true })).profile, "normal"); await lfs.project.init("shop/api", f.source); await lfs.branch.fork("shop/api", "agent", "main"); await lfs.file.write("shop/api", "agent", "/branch.txt", "agent\n"); @@ -284,7 +284,7 @@ test("CLI export: stdout JSON/text, stderr progress JSONL, default/selected Bran const run = shell(f.home, words); assert.equal(run.status, 0, run.stderr); } - assert.equal(JSON.parse(shell(f.home, ["store", "get", "shop", "--detail"]).stdout).profile, "disposable"); + assert.equal(JSON.parse(shell(f.home, ["store", "get", "shop", "--detail"]).stdout).profile, "normal"); const dest = join(f.parent, "out"); const run = shell(f.home, ["project", "export", "shop/api", dest, "--progress", "--detail"]); assert.equal(run.status, 0, run.stderr); diff --git a/api/python/test/test_project_export.py b/api/python/test/test_project_export.py index 2cfc36ebb1..76c1014057 100644 --- a/api/python/test/test_project_export.py +++ b/api/python/test/test_project_export.py @@ -302,8 +302,8 @@ def test_sync_aio_branch_fidelity_refusal_and_unraisable_callback(self): os.utime(source / "ignored.bin", ns=(timestamp, timestamp)) lfs = self.real.client(home=home) try: - lfs.store.create("shop") # public create selects only Disposable - self.assertEqual(lfs.store.get("shop", detail=True)["profile"], "disposable") + lfs.store.create("shop") # public create selects the sole Normal profile + self.assertEqual(lfs.store.get("shop", detail=True)["profile"], "normal") lfs.project.init("shop/api", str(source)) lfs.branch.fork("shop/api", "agent", "main") lfs.file.write("shop/api", "agent", "/branch.txt", "agent\n") diff --git a/api/python/test/test_values.py b/api/python/test/test_values.py index 18afdf8ec0..e8308adcc8 100644 --- a/api/python/test/test_values.py +++ b/api/python/test/test_values.py @@ -22,7 +22,7 @@ class Fixture(unittest.TestCase): - """A Disposable Store with one project and a Branch, in a temp home.""" + """A Normal Store with one project and a Branch, in a temp home.""" @classmethod def setUpClass(cls): diff --git a/control/crates/layerfs-control/tests/provider_ownership.rs b/control/crates/layerfs-control/tests/provider_ownership.rs index 5f83b17d17..25d013e7c7 100644 --- a/control/crates/layerfs-control/tests/provider_ownership.rs +++ b/control/crates/layerfs-control/tests/provider_ownership.rs @@ -27,7 +27,7 @@ impl ProjectFixture { let request = layerfs_control::InitRequest { source, store: PersistenceConfig::sqlite(directory.join("store.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), locator: "/layerfs-store/global/store.sqlite".into(), policy: layerfs_storage::StoragePolicy::frozen_default(), catalog: HistoryCatalogConfig { diff --git a/control/crates/layerfs-control/tests/store_doctor.rs b/control/crates/layerfs-control/tests/store_doctor.rs index c3716f3f4e..48d3e48537 100644 --- a/control/crates/layerfs-control/tests/store_doctor.rs +++ b/control/crates/layerfs-control/tests/store_doctor.rs @@ -52,7 +52,7 @@ fn fields(name: &str) -> SdkValue { fn store_file(path: &Path) -> SqliteHandles { home::private_dir(path.parent().unwrap()).unwrap(); SqliteHandles::create( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: BINDING.to_vec(), diff --git a/control/crates/layerfs-sandbox/src/launch/provider.rs b/control/crates/layerfs-sandbox/src/launch/provider.rs index 2bf512eb7b..8f5a6b5d3b 100644 --- a/control/crates/layerfs-sandbox/src/launch/provider.rs +++ b/control/crates/layerfs-sandbox/src/launch/provider.rs @@ -17,7 +17,7 @@ use std::{fmt, sync::Arc}; pub struct ProviderCreate { /// Runtime launch; configuration is encoded from setup after validation. pub launch: LaunchRequest, - /// Explicit Disposable daemon topology and Store selection. + /// Explicit Normal daemon topology and Store selection. pub setup: DaemonSetup, /// Controller secret; never printed or sent in argv/environment. pub controller_private: [u8; 32], diff --git a/control/crates/layerfs-sandbox/tests/inspect_space.rs b/control/crates/layerfs-sandbox/tests/inspect_space.rs index c330587313..f22053496b 100644 --- a/control/crates/layerfs-sandbox/tests/inspect_space.rs +++ b/control/crates/layerfs-sandbox/tests/inspect_space.rs @@ -105,7 +105,7 @@ fn store_record(home: &Path, name: &str, machine: &str) { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/control/crates/layerfs-sandbox/tests/inspect_stats.rs b/control/crates/layerfs-sandbox/tests/inspect_stats.rs index 792f6d89ab..2952b87620 100644 --- a/control/crates/layerfs-sandbox/tests/inspect_stats.rs +++ b/control/crates/layerfs-sandbox/tests/inspect_stats.rs @@ -128,7 +128,7 @@ fn store_record(home: &Path, name: &str, machine: &str) { ("kind", t("sqlite")), ("binding", SdkValue::Bytes(vec![7; 16])), ("cursor", SdkValue::Bytes(vec![8; 32])), - ("profile", t("disposable")), + ("profile", t("normal")), ("machine", t(machine)), ]), ) diff --git a/control/crates/layerfs-store/src/backup/restored.rs b/control/crates/layerfs-store/src/backup/restored.rs index 960caec1f8..d05b3766f4 100644 --- a/control/crates/layerfs-store/src/backup/restored.rs +++ b/control/crates/layerfs-store/src/backup/restored.rs @@ -179,11 +179,11 @@ fn record( } /// True when `record` holds what `discovery::project` reads: a `manifest` -/// and an `installed` manifest, each of which decodes with `Disposable`. +/// and an `installed` manifest, each of which decodes with `Normal`. pub fn complete(record: &ProjectRecord) -> bool { let decodes = |name: &str| match record.to_record().get(name) { Some(SdkValue::Bytes(bytes)) => { - StoreManifest::decode(bytes).is_ok_and(|m| m.profile == StoreProfile::Disposable) + StoreManifest::decode(bytes).is_ok_and(|m| m.profile == StoreProfile::Normal) } _ => false, }; diff --git a/control/crates/layerfs-store/src/get.rs b/control/crates/layerfs-store/src/get.rs index 6541c7f535..74cfcc774b 100644 --- a/control/crates/layerfs-store/src/get.rs +++ b/control/crates/layerfs-store/src/get.rs @@ -196,7 +196,7 @@ pub fn summary( ("backups", SdkValue::List(backups.collect())), ( "profile", - only(sqlite, SdkValue::opt_text(record.text("profile"))), + only(sqlite, SdkValue::opt_text(crate::record::profile(record))), ), ( "synchronous_commit", diff --git a/control/crates/layerfs-store/src/project/add.rs b/control/crates/layerfs-store/src/project/add.rs index d36b816081..98f5beeaca 100644 --- a/control/crates/layerfs-store/src/project/add.rs +++ b/control/crates/layerfs-store/src/project/add.rs @@ -37,7 +37,7 @@ pub fn manifest( let manifest = StoreManifest { provider: ProviderKind::Sqlite, locator: crate::project::init::LOCATOR.into(), - profile: StoreProfile::Disposable, + profile: StoreProfile::Normal, binding: identity.binding.clone(), cursor_key: identity.cursor_key, stack: stack.to_bytes(), diff --git a/control/crates/layerfs-store/src/project/discovery.rs b/control/crates/layerfs-store/src/project/discovery.rs index cc10607d2b..8ebbb7af4f 100644 --- a/control/crates/layerfs-store/src/project/discovery.rs +++ b/control/crates/layerfs-store/src/project/discovery.rs @@ -296,8 +296,8 @@ fn decoded(path: &Path, value: &SdkValue) -> Result { _ => Err(refused("NoSuchProject", "no complete project manifest")), }; let manifest = decode("manifest")?; - if manifest.profile != layerfs_bridge::provision::StoreProfile::Disposable { - return Err(refused("InvalidInput", "Disposable required")); + if manifest.profile != layerfs_bridge::provision::StoreProfile::Normal { + return Err(refused("InvalidInput", "Normal required")); } let installed = if matches!(value.get("installed"), Some(SdkValue::Bytes(_))) { Some(decode("installed")?) diff --git a/control/crates/layerfs-store/src/project/family.rs b/control/crates/layerfs-store/src/project/family.rs index 820dc44b8c..768b82eabd 100644 --- a/control/crates/layerfs-store/src/project/family.rs +++ b/control/crates/layerfs-store/src/project/family.rs @@ -288,7 +288,7 @@ fn init_on_worker( let stack = added.get("stack").cloned().unwrap_or_default(); // the worker's `manifest` and `installed` complete the record (#749); // a worker that sends none (an older build) or sends ones that are not - // a complete Disposable pair leaves it for a move or a Sandbox create + // a complete Normal pair leaves it for a move or a Sandbox create // to complete from the Store file, the latter logged: the project is // already in the Store, so the Init does not fail over it let initialised = ProjectRecord::initialised(store, name, stack); @@ -312,7 +312,7 @@ fn init_on_worker( ( "message", SdkValue::text( - "the worker's manifest and installed manifest are not a complete Disposable pair; the record keeps neither", + "the worker's manifest and installed manifest are not a complete Normal pair; the record keeps neither", ), ), ]), diff --git a/control/crates/layerfs-store/src/record.rs b/control/crates/layerfs-store/src/record.rs index 5a2139f300..505cbc9616 100644 --- a/control/crates/layerfs-store/src/record.rs +++ b/control/crates/layerfs-store/src/record.rs @@ -169,6 +169,20 @@ pub fn lock(home: &Path, name: &str) -> Result { entity_lock::take(&dir.join("lock"), entity_lock::WAIT, &held) } +/// The profile label a new sqlite Store's record is written with: the WAL +/// Store opened with NORMAL synchronization (owner, 2026-11-23). +pub const PROFILE: &str = "normal"; + +/// A sqlite Store record's profile label as callers show it. A record written +/// before 2026-11-23 says `disposable`, the earlier name of the same Store; +/// it reads as `normal`, and the record is never rewritten for it. +pub fn profile(record: &StoreRecord) -> Option<&str> { + match record.text("profile") { + Some("disposable") => Some(PROFILE), + other => other, + } +} + impl StoreRecord { /// Store `name`'s record `value`, as read. pub fn from_record(name: &str, value: SdkValue) -> Self { @@ -469,7 +483,7 @@ impl StoreRecord { let mut record = self; for (field, value) in [ ("machine", SdkValue::text(machine)), - ("profile", SdkValue::text("disposable")), + ("profile", SdkValue::text(PROFILE)), ("created", SdkValue::Int(home::now_ms())), ] { record = record.with(field, value); @@ -485,7 +499,7 @@ impl StoreRecord { ("binding", SdkValue::Bytes(binding.to_vec())), ("cursor", SdkValue::Bytes(cursor.to_vec())), ("machine", SdkValue::text("native")), - ("profile", SdkValue::text("disposable")), + ("profile", SdkValue::text(PROFILE)), ("created", SdkValue::Int(home::now_ms())), ]); Self::from_record(name, fields) diff --git a/control/crates/layerfs-store/src/sqlite/create.rs b/control/crates/layerfs-store/src/sqlite/create.rs index cf199e1685..e2d712d0ca 100644 --- a/control/crates/layerfs-store/src/sqlite/create.rs +++ b/control/crates/layerfs-store/src/sqlite/create.rs @@ -47,7 +47,7 @@ fn created(record: &StoreRecord) -> SdkValue { ("store", SdkValue::text(record.name())), ("engine", SdkValue::text("sqlite")), ("machine", SdkValue::opt_text(record.text("machine"))), - ("profile", SdkValue::opt_text(record.text("profile"))), + ("profile", SdkValue::opt_text(crate::record::profile(record))), ("sqlite_version", SdkValue::opt_text(record.text("sqlite"))), ( "created_at", diff --git a/control/crates/layerfs-store/tests/diagnostic_structure.rs b/control/crates/layerfs-store/tests/diagnostic_structure.rs index 385882fb9d..922cf8d1a1 100644 --- a/control/crates/layerfs-store/tests/diagnostic_structure.rs +++ b/control/crates/layerfs-store/tests/diagnostic_structure.rs @@ -51,7 +51,7 @@ fn binding_mismatch_keeps_logical_access_unavailable_without_corruption() { use layerfs_storage::StoragePolicy; let path = scratch("binding").join("store.sqlite"); let handles = SqliteHandles::create( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &layerfs_history::HistoryCatalogConfig { binding_key: b"correct-binding".to_vec(), diff --git a/control/crates/layerfs-store/tests/profile_label.rs b/control/crates/layerfs-store/tests/profile_label.rs new file mode 100644 index 0000000000..67f10c4ef1 --- /dev/null +++ b/control/crates/layerfs-store/tests/profile_label.rs @@ -0,0 +1,44 @@ +//! A sqlite Store record's profile label (owner, 2026-11-23): new and +//! restored records are written `normal`, and a record written before then, +//! which says `disposable`, reads as `normal` without being rewritten. +use layerfs_bridge::control::SdkValue; +use layerfs_store::record::{profile, StoreRecord, PROFILE}; + +fn record(label: Option<&str>) -> StoreRecord { + let fields = match label { + Some(label) => SdkValue::map([ + ("name", SdkValue::text("shop")), + ("kind", SdkValue::text("sqlite")), + ("machine", SdkValue::text("native")), + ("profile", SdkValue::text(label)), + ]), + None => SdkValue::map([ + ("name", SdkValue::text("shop")), + ("kind", SdkValue::text("sqlite")), + ("machine", SdkValue::text("native")), + ]), + }; + StoreRecord::from_record("shop", fields) +} + +#[test] +fn new_records_are_written_normal() { + assert_eq!(PROFILE, "normal"); + let restored = StoreRecord::restored("shop", &[7; 16], &[9; 32]); + assert_eq!(restored.text("profile"), Some("normal")); + assert_eq!(profile(&restored), Some("normal")); +} + +#[test] +fn an_earlier_disposable_label_reads_as_normal() { + let earlier = record(Some("disposable")); + assert_eq!(profile(&earlier), Some("normal")); + // read, never rewritten + assert_eq!(earlier.text("profile"), Some("disposable")); +} + +#[test] +fn other_labels_pass_through() { + assert_eq!(profile(&record(Some("normal"))), Some("normal")); + assert_eq!(profile(&record(None)), None); +} diff --git a/control/crates/layerfs-store/tests/restored_records.rs b/control/crates/layerfs-store/tests/restored_records.rs index ac0f9646cb..c48a6d1a94 100644 --- a/control/crates/layerfs-store/tests/restored_records.rs +++ b/control/crates/layerfs-store/tests/restored_records.rs @@ -87,7 +87,7 @@ fn a_restored_project_reads_as_a_sandbox_reads_it() { let project = discovery::project(Some(&home), Some(STORE), Some(PROJECT)) .expect("a Sandbox finds the restored project"); assert_eq!(project.manifest.provider, ProviderKind::Sqlite); - assert_eq!(project.manifest.profile, StoreProfile::Disposable); + assert_eq!(project.manifest.profile, StoreProfile::Normal); assert_eq!(project.manifest.binding, vec![7; 32]); assert_eq!(project.manifest.cursor_key, [9; 32]); assert_eq!(project.manifest.stack, main_branch().stack.to_bytes()); diff --git a/core/crates/layerfs-content/tests/support/filesystem.rs b/core/crates/layerfs-content/tests/support/filesystem.rs index 90ad9c58b8..7fc467e8e3 100644 --- a/core/crates/layerfs-content/tests/support/filesystem.rs +++ b/core/crates/layerfs-content/tests/support/filesystem.rs @@ -350,7 +350,7 @@ impl Session { } } -/// Disposable directory removed when it is dropped. +/// Normal directory removed when it is dropped. pub struct TempDir { path: std::path::PathBuf, } diff --git a/core/crates/layerfs-storage/tests/support/mod.rs b/core/crates/layerfs-storage/tests/support/mod.rs index fb7f369e2d..a34b9f9b18 100644 --- a/core/crates/layerfs-storage/tests/support/mod.rs +++ b/core/crates/layerfs-storage/tests/support/mod.rs @@ -16,7 +16,7 @@ use layerfs_content::{ static COUNTER: AtomicU64 = AtomicU64::new(0); -/// Disposable directory removed when it is dropped. +/// Normal directory removed when it is dropped. pub struct TempDir { path: PathBuf, } diff --git a/core/docs/issues/call-surface-2-0/calls.json b/core/docs/issues/call-surface-2-0/calls.json index b35ab8886d..5df0dbf2f3 100644 --- a/core/docs/issues/call-surface-2-0/calls.json +++ b/core/docs/issues/call-surface-2-0/calls.json @@ -7379,7 +7379,7 @@ "short": [ "{\"items\":[{\"store\":\"shop\",\"engine\":\"sqlite\",\"machine\":\"dev\",\"projects\":[\"api\",\"web\"],\"backups\":[{\"bucket\":\"r2-main\"}]},{\"store\":\"sim-website\",\"engine\":\"sqlite\",\"machine\":\"docker\",\"state\":\"blocked\",\"blocked_by\":{\"machine\":\"docker\",\"reason\":\"stopped\"},\"projects\":[\"website\"]},{\"store\":\"shop-pg\",\"engine\":\"postgresql\",\"auth\":\"pg-app\",\"connections\":[{\"url\":\"postgres://db.internal:5432/shop\",\"reached\":\"ok\"},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"reached\":\"failed\"},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\"}],\"projects\":[\"abc\"]}]}" ], - "long": "{\"items\":[{\"store\":\"shop\",\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":\"disposable\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}},{\"store\":\"shop-pg\",\"engine\":\"postgresql\",\"state\":\"ready\",\"machine\":null,\"auth\":\"pg-app\",\"binding\":\"f64587b8a1c2d3e4\",\"connections\":[{\"machine\":null,\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":\"ok\",\"reach\":{\"at\":\"2026-11-18T09:15:59Z\",\"ok\":true,\"latency_ms\":2,\"server_version\":\"17.6\",\"error\":null}},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"own\":true,\"server\":{\"host\":\"proxy.lab\",\"port\":6432,\"database\":\"shop\"},\"reached\":\"failed\",\"reach\":{\"at\":\"2026-11-18T09:14:02Z\",\"ok\":false,\"latency_ms\":null,\"server_version\":null,\"error\":\"machine lab cannot reach PostgreSQL Store shop-pg's server at proxy.lab: connection refused\"}},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":null,\"reach\":null}],\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":null,\"synchronous_commit\":\"local\",\"sqlite_version\":null,\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":null}]}" + "long": "{\"items\":[{\"store\":\"shop\",\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":\"normal\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}},{\"store\":\"shop-pg\",\"engine\":\"postgresql\",\"state\":\"ready\",\"machine\":null,\"auth\":\"pg-app\",\"binding\":\"f64587b8a1c2d3e4\",\"connections\":[{\"machine\":null,\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":\"ok\",\"reach\":{\"at\":\"2026-11-18T09:15:59Z\",\"ok\":true,\"latency_ms\":2,\"server_version\":\"17.6\",\"error\":null}},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"own\":true,\"server\":{\"host\":\"proxy.lab\",\"port\":6432,\"database\":\"shop\"},\"reached\":\"failed\",\"reach\":{\"at\":\"2026-11-18T09:14:02Z\",\"ok\":false,\"latency_ms\":null,\"server_version\":null,\"error\":\"machine lab cannot reach PostgreSQL Store shop-pg's server at proxy.lab: connection refused\"}},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":null,\"reach\":null}],\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":null,\"synchronous_commit\":\"local\",\"sqlite_version\":null,\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":null}]}" }, "dropped": [], "new_work": "A records-only state is new: today each item's state comes from the leases and a `stat` on the Store's machine, and is idle, in_use, busy, down or unresolved. `--machine` is a new filter. `blocked` with `blocked_by` replaces `down`.", @@ -7499,7 +7499,7 @@ "lost reply on a move: {\"engine\":\"sqlite\",\"state\":\"broken\",\"machine\":\"native\",\"projects\":[\"api\",\"web\"],\"reason\":\"unresolved\",\"fix\":\"layerfs store move shop dev\"}", "PostgreSQL: {\"engine\":\"postgresql\",\"state\":\"ready\",\"auth\":\"pg-app\",\"connections\":[{\"url\":\"postgres://db.internal:5432/shop\",\"reached\":\"ok\"},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"reached\":\"failed\"},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\"}],\"projects\":[\"api\",\"web\"]}" ], - "long": "{\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"store\":\"shop\",\"profile\":\"disposable\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}}" + "long": "{\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"store\":\"shop\",\"profile\":\"normal\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}}" }, "dropped": [ { @@ -7579,7 +7579,7 @@ "short": [ "{\"ok\":true}" ], - "long": "{\"ok\":true,\"outcome\":\"created\",\"store\":\"shop\",\"engine\":\"sqlite\",\"machine\":\"native\",\"profile\":\"disposable\",\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-18T09:16:59Z\"}" + "long": "{\"ok\":true,\"outcome\":\"created\",\"store\":\"shop\",\"engine\":\"sqlite\",\"machine\":\"native\",\"profile\":\"normal\",\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-18T09:16:59Z\"}" }, "dropped": [], "new_work": "`--machine` is new: today store.create makes the Store on native only, and a Store reaches a machine by store.push." diff --git a/core/docs/issues/call-surface-2-0/families/store.json b/core/docs/issues/call-surface-2-0/families/store.json index cbb1f02325..53035ceec4 100644 --- a/core/docs/issues/call-surface-2-0/families/store.json +++ b/core/docs/issues/call-surface-2-0/families/store.json @@ -102,7 +102,7 @@ "short": [ "{\"items\":[{\"store\":\"shop\",\"engine\":\"sqlite\",\"machine\":\"dev\",\"projects\":[\"api\",\"web\"],\"backups\":[{\"bucket\":\"r2-main\"}]},{\"store\":\"sim-website\",\"engine\":\"sqlite\",\"machine\":\"docker\",\"state\":\"blocked\",\"blocked_by\":{\"machine\":\"docker\",\"reason\":\"stopped\"},\"projects\":[\"website\"]},{\"store\":\"shop-pg\",\"engine\":\"postgresql\",\"auth\":\"pg-app\",\"connections\":[{\"url\":\"postgres://db.internal:5432/shop\",\"reached\":\"ok\"},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"reached\":\"failed\"},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\"}],\"projects\":[\"abc\"]}]}" ], - "long": "{\"items\":[{\"store\":\"shop\",\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":\"disposable\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}},{\"store\":\"shop-pg\",\"engine\":\"postgresql\",\"state\":\"ready\",\"machine\":null,\"auth\":\"pg-app\",\"binding\":\"f64587b8a1c2d3e4\",\"connections\":[{\"machine\":null,\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":\"ok\",\"reach\":{\"at\":\"2026-11-18T09:15:59Z\",\"ok\":true,\"latency_ms\":2,\"server_version\":\"17.6\",\"error\":null}},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"own\":true,\"server\":{\"host\":\"proxy.lab\",\"port\":6432,\"database\":\"shop\"},\"reached\":\"failed\",\"reach\":{\"at\":\"2026-11-18T09:14:02Z\",\"ok\":false,\"latency_ms\":null,\"server_version\":null,\"error\":\"machine lab cannot reach PostgreSQL Store shop-pg's server at proxy.lab: connection refused\"}},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":null,\"reach\":null}],\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":null,\"synchronous_commit\":\"local\",\"sqlite_version\":null,\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":null}]}" + "long": "{\"items\":[{\"store\":\"shop\",\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":\"normal\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}},{\"store\":\"shop-pg\",\"engine\":\"postgresql\",\"state\":\"ready\",\"machine\":null,\"auth\":\"pg-app\",\"binding\":\"f64587b8a1c2d3e4\",\"connections\":[{\"machine\":null,\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":\"ok\",\"reach\":{\"at\":\"2026-11-18T09:15:59Z\",\"ok\":true,\"latency_ms\":2,\"server_version\":\"17.6\",\"error\":null}},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"own\":true,\"server\":{\"host\":\"proxy.lab\",\"port\":6432,\"database\":\"shop\"},\"reached\":\"failed\",\"reach\":{\"at\":\"2026-11-18T09:14:02Z\",\"ok\":false,\"latency_ms\":null,\"server_version\":null,\"error\":\"machine lab cannot reach PostgreSQL Store shop-pg's server at proxy.lab: connection refused\"}},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\",\"own\":false,\"server\":{\"host\":\"db.internal\",\"port\":5432,\"database\":\"shop\"},\"reached\":null,\"reach\":null}],\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"profile\":null,\"synchronous_commit\":\"local\",\"sqlite_version\":null,\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":null}]}" }, "dropped": [], "new_work": "A records-only state is new: today each item's state comes from the leases and a `stat` on the Store's machine, and is idle, in_use, busy, down or unresolved. `--machine` is a new filter. `blocked` with `blocked_by` replaces `down`.", @@ -223,7 +223,7 @@ "lost reply on a move: {\"engine\":\"sqlite\",\"state\":\"broken\",\"machine\":\"native\",\"projects\":[\"api\",\"web\"],\"reason\":\"unresolved\",\"fix\":\"layerfs store move shop dev\"}", "PostgreSQL: {\"engine\":\"postgresql\",\"state\":\"ready\",\"auth\":\"pg-app\",\"connections\":[{\"url\":\"postgres://db.internal:5432/shop\",\"reached\":\"ok\"},{\"machine\":\"lab\",\"url\":\"postgres://proxy.lab:6432/shop\",\"reached\":\"failed\"},{\"machine\":\"build\",\"url\":\"postgres://db.internal:5432/shop\"}],\"projects\":[\"api\",\"web\"]}" ], - "long": "{\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"store\":\"shop\",\"profile\":\"disposable\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}}" + "long": "{\"engine\":\"sqlite\",\"state\":\"ready\",\"machine\":\"dev\",\"auth\":null,\"binding\":null,\"connections\":null,\"projects\":[\"api\",\"web\"],\"projects_count\":null,\"backups\":[{\"bucket\":\"r2-main\",\"file\":\"shop\",\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"last\":{\"call\":\"create\",\"ended_at\":\"2026-11-18T09:15:59Z\",\"size\":213263952},\"attempt\":null}],\"op\":null,\"blocked_by\":null,\"reason\":null,\"fix\":null,\"observed_at\":\"2026-11-18T09:15:59Z\",\"store\":\"shop\",\"profile\":\"normal\",\"synchronous_commit\":null,\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-17T09:16:59Z\",\"last_transfer\":{\"call\":\"move\",\"from\":\"native\",\"to\":\"dev\",\"ended_at\":\"2026-11-17T09:16:59Z\",\"size\":213263952,\"sha256\":\"8888888888888888888888888888888888888888888888888888888888888888\",\"heads_sha256\":\"9999999999999999999999999999999999999999999999999999999999999999\",\"retired\":true}}" }, "dropped": [ { @@ -304,7 +304,7 @@ "short": [ "{\"ok\":true}" ], - "long": "{\"ok\":true,\"outcome\":\"created\",\"store\":\"shop\",\"engine\":\"sqlite\",\"machine\":\"native\",\"profile\":\"disposable\",\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-18T09:16:59Z\"}" + "long": "{\"ok\":true,\"outcome\":\"created\",\"store\":\"shop\",\"engine\":\"sqlite\",\"machine\":\"native\",\"profile\":\"normal\",\"sqlite_version\":\"3.53.2\",\"created_at\":\"2026-11-18T09:16:59Z\"}" }, "dropped": [], "new_work": "`--machine` is new: today store.create makes the Store on native only, and a Store reaches a machine by store.push." diff --git a/docs/architecture/api/README.md b/docs/architecture/api/README.md index b87c470d53..3f07652db0 100644 --- a/docs/architecture/api/README.md +++ b/docs/architecture/api/README.md @@ -78,7 +78,7 @@ give each call's own arguments, answer and errors. | Unknown call or argument, wrong kind, out of scope | `InvalidInput`, before any effect | [`calls/check.rs`](../../../api/crates/layerfs-api/src/calls/check.rs) | | New work on a removed platform | `Unsupported`, before the home is opened | [`calls/platform_policy.rs`](../../../api/crates/layerfs-api/src/calls/platform_policy.rs) | | Where a Store call runs | the caller's process, or the Store machine's worker; no daemon serves a Store call | [Control](../control/README.md) | -| Persistence | a sqlite Store opens with WAL and `synchronous=NORMAL` (its record label is still `disposable`); a PostgreSQL Store writes with `synchronous_commit` (default `local`). Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [store family](sdk/store.md) | +| Persistence | a sqlite Store opens with WAL and `synchronous=NORMAL`, the only SQLite profile (record label `normal`); a PostgreSQL Store writes with `synchronous_commit` (default `local`). Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [store family](sdk/store.md) | ## Demonstration diff --git a/docs/architecture/api/calls/coverage.md b/docs/architecture/api/calls/coverage.md index 9a728c73f4..fc415b18f9 100644 --- a/docs/architecture/api/calls/coverage.md +++ b/docs/architecture/api/calls/coverage.md @@ -170,7 +170,7 @@ These are not calls and are not in the matrix. [`contract.mjs`](../../../../api/node/test/contract.mjs) runs the case list in [`contract/cases.mjs`](../../../../api/node/test/contract/cases.mjs) through Node, Python, Python `aio` and the command, each in its own fresh -Disposable home (a native SQLite Store `shop`, project `shop/api`, Branch +temporary home (a native SQLite Store `shop`, project `shop/api`, Branch `agent`). Answers are compared step by step after ids, times, inode numbers, stored sizes and home paths are normalized, and every case also asserts its expected value; a refusal is compared by `code`, key set and, unless the @@ -178,7 +178,7 @@ wording is the front end's own, `message` and `detail`. | Group | What it shows | | --- | --- | -| `setup` | `store.create` (profile `disposable`), `project.init`, `branch.fork` | +| `setup` | `store.create` (profile `normal`), `project.init`, `branch.fork` | | `args` | a missing positional; defaults of `file.read`, `branch.list` and the Commit message; omitted equals `null`; a line window, a `limit` and `cursor` page, `mode` | | `unknown` | an unknown option, an extra positional and a non-function handler are refused before any effect (state listed before and after is equal) | | `validation` | `InvalidInput` (a bad name, path or kind, a write to `main`, a bad cursor), `NotFound` (no project, Branch or path; the raised `NoSuchPath` kept as `detail.code`), `Exists` (a fork onto a taken name); `file.apply` stops at the first refused change with nothing committed (`detail.index`); JSON nested deeper than 128 | diff --git a/docs/architecture/api/front-ends/README.md b/docs/architecture/api/front-ends/README.md index b7916a3cb3..2cd9c28619 100644 --- a/docs/architecture/api/front-ends/README.md +++ b/docs/architecture/api/front-ends/README.md @@ -147,7 +147,7 @@ eight `quiet` calls write none. | stderr cannot be written | the line is lost; the exit stays the outcome's | [`output.rs`](../../../../api/crates/layerfs-cli/src/output.rs) `diagnostic` | | `workspace exec`: a command exiting 2 or 125 | same exit as a usage error or refusal; stderr tells them apart | [`run.rs`](../../../../api/crates/layerfs-cli/src/run.rs) | | Cargo features | Node: `machine` always, `tls` opt-in; Python and CLI: `machine` by default; without `tls` an `https://` remote is `Unsupported`. PostgreSQL is always built | the three crates' `Cargo.toml` | -| Durable Stores | `NOT_RUN — disabled by owner until explicit reauthorization`; a sqlite Store runs WAL with `synchronous=NORMAL` (record label `disposable`) | [store family](../sdk/store.md) | +| Durable Stores | `NOT_RUN — disabled by owner until explicit reauthorization`; a sqlite Store runs WAL with `synchronous=NORMAL` (record label `normal`) | [store family](../sdk/store.md) | ## Packaging and release diff --git a/docs/architecture/api/front-ends/mcp.md b/docs/architecture/api/front-ends/mcp.md index 75e2a7134d..06ef98458b 100644 --- a/docs/architecture/api/front-ends/mcp.md +++ b/docs/architecture/api/front-ends/mcp.md @@ -265,7 +265,7 @@ the SDK's request schema (`-32603`). The call does not run. From the repository root, each under a 120 s wall limit, with `TMPDIR` on ext4, xfs or btrfs, the built addon (`api/node/layerfs.node`) and `LAYERFS_CLI`. The tests run a real `node src/server.js` with the SDK's -`Client` over `StdioClientTransport` and a Disposable temp home. +`Client` over `StdioClientTransport` and a temporary home. | Test | Command | Shows | | --- | --- | --- | diff --git a/docs/architecture/api/sdk/store.md b/docs/architecture/api/sdk/store.md index 7c2894018f..417554e4a2 100644 --- a/docs/architecture/api/sdk/store.md +++ b/docs/architecture/api/sdk/store.md @@ -45,9 +45,9 @@ The `store` calls: list and read Stores, create a sqlite Store, connect a Postgr | [`store.doctor`](#storedoctor) | both | the doctor report | `admin` | A sqlite Store is opened with the Normal profile (WAL, -`synchronous=NORMAL`); its record and manifest still carry the label -`disposable`, which names the non-durable WAL Store, not the connection's -synchronization. Durable execution is `NOT_RUN — disabled by owner until +`synchronous=NORMAL`), the only SQLite Store profile; its record carries the +label `normal`, and a record written before 2026-11-23 that says `disposable` +answers `normal` (it is never rewritten for it). Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. A PostgreSQL Store has no profile: its write setting is `synchronous_commit`. A Store name is 1 to 63 of `a-z 0-9 _ . -`, starting and ending with a letter or digit, not a Windows diff --git a/docs/architecture/control/README.md b/docs/architecture/control/README.md index 04e2153046..750473883f 100644 --- a/docs/architecture/control/README.md +++ b/docs/architecture/control/README.md @@ -130,7 +130,7 @@ kind or kernel route is an engine change. | A PostgreSQL password is resolved only in the caller, travels only in one worker request and the Sandbox's private daemon setup file, and is never written to a record, log, trace or `Debug` output | [`secrets.rs`](../../../control/crates/layerfs-home/src/secrets.rs), [SQLite and PostgreSQL](stores-and-projects/sqlite-and-postgresql.md#credentials) | | Drivers know nothing of the home and write no records | [`layerfs-platform/src/lib.rs`](../../../control/crates/layerfs-platform/src/lib.rs) | | Stored and displayed values do not follow internal renames: the `host_process` backend is stored and shown as `"native"` | [`host_process/adapter.rs`](../../../control/crates/layerfs-sandbox-backend/src/backend/host_process/adapter.rs) | -| Disposable/WAL/synchronous=OFF is the only permitted Store profile; Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [`record.rs`](../../../control/crates/layerfs-store/src/record.rs) | +| sqlite Stores open with the Normal profile (WAL, synchronous=NORMAL), the only SQLite profile; their records carry the label `normal`; Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [`record.rs`](../../../control/crates/layerfs-store/src/record.rs) | The binding code rules for this layer are in the [control guide](../../../control/AGENTS.md). diff --git a/docs/architecture/control/backups/README.md b/docs/architecture/control/backups/README.md index 81b9b57e6e..6d3d03560c 100644 --- a/docs/architecture/control/backups/README.md +++ b/docs/architecture/control/backups/README.md @@ -25,7 +25,7 @@ that know nothing about Stores. | create: stage on the Store's machine (store.file) pieces + manifest | | [worker: 8 MiB reads into this process] --------> upload | | restore: install, <------- load: download, verify, download | -| records open Disposable, link | | +| records open Normal, link | | +----------------------------------------------------------|-----------------+ v once per request local_folder (tests) | minio --+--> s3_api: SigV4 over HTTP/1.1 @@ -79,7 +79,7 @@ A PostgreSQL Store is not backed up here. | 1 | Existing `store/` folder (if present): `store.create`'s kernel guard requires a real `0700` directory of this user (`Unsupported`, `chmod 700` before any staging). Existing Store: refuse PostgreSQL; under the home lock and the Store's lock check `replaceable`: on `native`, no unfinished operation, this process's open copy closed, no other lease holder or running Sandbox (`store_idle`), heads equal to the link's, no `-wal` or `-shm`. Then hold its lease. A new Store gets a fresh cursor key. | [`restore.rs`](../../../../control/crates/layerfs-store/src/backup/restore.rs), [`inventory.rs`](../../../../control/crates/layerfs-control/src/inventory.rs) | | 2 | Make `store/.restore-/` with a held `lock` file; first remove older restore folders whose lock can be taken (killed restores). | same, `Staging`, `sweep` | | 3 | `load` into it: `installer_user` (daemons' user), make the destination directory `0700` when absent (`install::make_private_directory`), `kernel_guard` on the Store file (a guard refusal removes only the still-empty directory this call's `mkdir` made; installer-user or `mkdir` failure removes nothing), no Store at the target, no sidecars; stat the object and take `layerfs-binding` and `layerfs-sqlite`; download to `.pulling` (0600, create-new) through `pieces::download`. | [`restore.rs` (bucket)](../../../../control/crates/layerfs-bucket/src/backup/restore.rs) | -| 4 | `verify`: open the bytes as a Disposable Store with that binding and cursor key, close, read heads, require no `-wal`/`-shm` left; `install`: hard link into place. | same | +| 4 | `verify`: open the bytes as a Normal Store with that binding and cursor key, close, read heads, require no `-wal`/`-shm` left; `install`: hard link into place. | same | | 5 | The binding must be the existing Store's. Read the Store's projects and each one's `main` Branch on a connection of the call's own. | [`restore.rs`](../../../../control/crates/layerfs-store/src/backup/restore.rs), `projects_in` | | 6 | Under the home lock: plan each project's record before the install (rebuilt as `project.init` writes it with `manifest` and `installed` from `main`, binding, cursor key, file length and `layerfs-sqlite` version; complete records kept, incomplete ones completed, no `main` keeps the listing record; an unencodable manifest refuses here). Then `backup::restore::install` re-checks the target's folder with the kernel guard, so a folder that appeared or lost its privacy during the download is refused `Unsupported` with nothing installed. A new Store is hard-linked (never over one that appeared) and recorded; replacing an existing Store takes the Store lock to re-check binding and `replaceable` and rename over, then drops it. `write_link` takes the Store lock on its own; `Records::write` writes the planned project records and removes records of absent projects under the home lock alone. The staging folder goes when the call ends. | [`restore.rs`](../../../../control/crates/layerfs-store/src/backup/restore.rs), [`restored.rs`](../../../../control/crates/layerfs-store/src/backup/restored.rs), [`family.rs`](../../../../control/crates/layerfs-store/src/backup/family.rs) | @@ -88,7 +88,7 @@ lock; the home lock covers planning each project's record (without the Store lock), the install (taking the Store lock only to re-check and rename over an existing Store), `write_link` (which takes the Store lock separately) and writing the project records (without the Store lock). A restore opens the bytes -with the Disposable profile (WAL, `synchronous=OFF`), the only permitted Store +with the Normal profile (WAL, `synchronous=NORMAL`), the only SQLite Store profile; Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. @@ -101,7 +101,7 @@ reauthorization`. | Each request is attempted once; an unknown outcome is reported, never resent. | [`error.rs`](../../../../control/crates/layerfs-bucket/src/bucket/error.rs) | | A create overwrites only the copy this home last moved through the link, or nothing; a copy another home wrote is never overwritten. Not compare-and-swap: a write between the check and the upload is not detected. | `check` in [`create.rs`](../../../../control/crates/layerfs-store/src/backup/create.rs) | | One create of a Store at a time per home (`backup.lock`). | `Creating` in [`create.rs`](../../../../control/crates/layerfs-store/src/backup/create.rs) | -| Restored bytes pass every sha256 check and open as a Disposable Store with the right binding before they are installed. | `fetch` in [`restore.rs` (bucket)](../../../../control/crates/layerfs-bucket/src/backup/restore.rs) | +| Restored bytes pass every sha256 check and open as a Normal Store with the right binding before they are installed. | `fetch` in [`restore.rs` (bucket)](../../../../control/crates/layerfs-bucket/src/backup/restore.rs) | | A restore replaces only an idle Store on `native` unchanged since its last transfer through that bucket; a new Store never replaces one that appeared meanwhile. | `replaceable` in [`restore.rs`](../../../../control/crates/layerfs-store/src/backup/restore.rs) | | Disconnect deletes no object; the only deletes are stale pieces beyond a new upload's count. | [`family.rs`](../../../../control/crates/layerfs-store/src/backup/family.rs), [`pieces.rs`](../../../../control/crates/layerfs-bucket/src/bucket/pieces.rs) | diff --git a/docs/architecture/control/doctor/README.md b/docs/architecture/control/doctor/README.md index 978808ae48..5eb402b6a7 100644 --- a/docs/architecture/control/doctor/README.md +++ b/docs/architecture/control/doctor/README.md @@ -182,7 +182,7 @@ Under a machine that is not ready only `store.record` is made: the rest are | Check | What is observed | Source | | --- | --- | --- | -| `project.record` | The project's record and its Store's record read; for a SQLite Store whose calls run in this process, with no `project.init` `op`, `manifest` and `installed` decode with `Disposable` (a Store on a worker is exempt: that worker's Sandboxes read the entry it keeps). A failure here does not stop `project.listed` or `project.data` | [`project_target.rs`](../../../../control/crates/layerfs-control/src/doctor/project_target.rs), [`restored.rs`](../../../../control/crates/layerfs-store/src/backup/restored.rs) | +| `project.record` | The project's record and its Store's record read; for a SQLite Store whose calls run in this process, with no `project.init` `op`, `manifest` and `installed` decode with `Normal` (a Store on a worker is exempt: that worker's Sandboxes read the entry it keeps). A failure here does not stop `project.listed` or `project.data` | [`project_target.rs`](../../../../control/crates/layerfs-control/src/doctor/project_target.rs), [`restored.rs`](../../../../control/crates/layerfs-store/src/backup/restored.rs) | | `project.listed` | The Store's own list (read where its calls run) holds the record's stack id, or its name for a record without one. Not listed: a notice, `fix` `layerfs project delete `, which removes such an entry. A Store this host cannot open or whose file is gone, and a worker that does not answer (`machine`, `not_answering`), block it | [`project_target.rs`](../../../../control/crates/layerfs-control/src/doctor/project_target.rs), [`live.rs`](../../../../control/crates/layerfs-store/src/project/live.rs) | | `project.data` (`--full` only) | Everything main's head and each live Branch's head reach, read and checked once per project in one pinned read view: each tree's namespace qualified, each object located, reconstructed, admitted and its children's context checked, as the whole-Store scan checks its rows ([Store diagnostics](../../engine/store/diagnostics.md#one-projects-data)). sqlite on this kernel and PostgreSQL in this process; sqlite on a machine through its worker's `store.diagnose` with `cut: project`, its `data` events passed back. The first 64 problems are findings (an unreadable object `not_checked` `lost`), the rest one counted finding | [`project_target.rs`](../../../../control/crates/layerfs-control/src/doctor/project_target.rs), [`diagnostic.rs`](../../../../control/crates/layerfs-store/src/diagnostic.rs) | diff --git a/docs/architecture/control/stores-and-projects/README.md b/docs/architecture/control/stores-and-projects/README.md index 0bf0c88054..12aad32676 100644 --- a/docs/architecture/control/stores-and-projects/README.md +++ b/docs/architecture/control/stores-and-projects/README.md @@ -52,7 +52,7 @@ full per-call table is "Where each call runs" in [Control](../README.md). | Store record | `store//record.json`, read once into `StoreRecord` with its parsed `StoreRef`; nobody reads a record's `kind` text or fields except through it; `v` is read past and never shown | [`record.rs`](../../../../control/crates/layerfs-store/src/record.rs) | | Kind | `sqlite` or `postgresql`; no `kind` or any other text is `InvalidInput` "Store record kind" (only the step that needs the kind refuses; `store.get` shows such a record with engine unknown, `broken` `unsupported`, fix `layerfs store remove `; a `machine` that is not text is the same; `store.remove` and `store.disconnect` remove such a record alone, `record::forget_unread`, and `store.remove`'s `left` names the Store file it keeps; a sqlite Store on a machine whose record has no 2.0 name is also removed by its records alone, `sqlite::remove`, `left` saying its file stays on that machine) | same, `kind_of` | | Placement | a sqlite record names its `machine` (none is `native`); a PostgreSQL Store is on no machine | same, `StoreRef::machine` | -| New sqlite Store | `store.create`: an empty Store on `native`, record `{machine: native, profile: disposable, created, sqlite}` | [`sqlite/create.rs`](../../../../control/crates/layerfs-store/src/sqlite/create.rs), `record.rs` `created_on_native` | +| New sqlite Store | `store.create`: an empty Store on `native`, record `{machine: native, profile: normal, created, sqlite}` | [`sqlite/create.rs`](../../../../control/crates/layerfs-store/src/sqlite/create.rs), `record.rs` `created_on_native` | | Resolve | `/` split and both records read; a bare name `InvalidInput` | [`resolve.rs`](../../../../control/crates/layerfs-store/src/resolve.rs) | | Store calls | `branch`, `commit`, `file` (and project stats): each call translated once to one engine method (snake_case to camelCase, absent options not sent) and run on its route | [`calls/`](../../../../control/crates/layerfs-store/src/calls/mod.rs), [`calls/op.rs`](../../../../control/crates/layerfs-store/src/calls/op.rs) | | Placement plan | PostgreSQL: this process. sqlite: this process when the machine's platform executor is `Local` on this host (`native` on macOS and Linux); else that machine's worker (`docker` on every host) | [`place.rs`](../../../../control/crates/layerfs-store/src/place.rs) | @@ -108,7 +108,7 @@ live read found, else `ready`. | A guest never reads the home: the caller sends the Store's record with each call; the worker finds the file under its own root by name | [`call.rs`](../../../../control/crates/layerfs-store/src/call.rs), [`worker_server.rs`](../../../../control/crates/layerfs-control/src/worker_server.rs) | | Direct Store access only where the Store's own directory is a real `0700` directory owned by this user and every opener shares one kernel and a local filesystem: Linux ext4, xfs, btrfs; macOS apfs, hfs; else every Store call is `Unsupported` with its reason, no fallback | [`service.rs`](../../../../control/crates/layerfs-store/src/service.rs), [`kernel_guard.rs`](../../../../engine/crates/layerfs-store-service/src/kernel_guard.rs) | | One attempt per call; nothing is resent | [`service.rs`](../../../../control/crates/layerfs-store/src/service.rs), [`place.rs`](../../../../control/crates/layerfs-store/src/place.rs) | -| Store records are created with `profile: disposable` (Disposable/WAL/synchronous=OFF, the only permitted profile); Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [`record.rs`](../../../../control/crates/layerfs-store/src/record.rs) `created_on_native`, `restored` | +| Store records are created with `profile: normal`; a record written before 2026-11-23 that says `disposable` is read as `normal` and never rewritten for it; every Store opens with the Normal profile (WAL, synchronous=NORMAL); Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [`record.rs`](../../../../control/crates/layerfs-store/src/record.rs) `created_on_native`, `restored`, `profile` | ## Limits and failures diff --git a/docs/architecture/control/stores-and-projects/projects.md b/docs/architecture/control/stores-and-projects/projects.md index 2852d935be..96ef550604 100644 --- a/docs/architecture/control/stores-and-projects/projects.md +++ b/docs/architecture/control/stores-and-projects/projects.md @@ -42,7 +42,7 @@ runs and how the folder gets there. | Rule | Detail | Source | | --- | --- | --- | | Live add | Init adds a folder as a new project to an existing Store through its writer; it does not seal | [`family.rs`](../../../../control/crates/layerfs-store/src/project/family.rs), [`add.rs`](../../../../control/crates/layerfs-store/src/project/add.rs) | -| Where | where the Store's calls run: this process for PostgreSQL and a `Local` sqlite machine, else the machine's worker; the folder is always on the caller's host, and a worker Init returns `manifest` and `installed` so the caller's project record is complete; a pair that is not a complete Disposable one is left out and logged in `log/repair.jsonl`, for a move or Sandbox create to complete | same | +| Where | where the Store's calls run: this process for PostgreSQL and a `Local` sqlite machine, else the machine's worker; the folder is always on the caller's host, and a worker Init returns `manifest` and `installed` so the caller's project record is complete; a pair that is not a complete Normal one is left out and logged in `log/repair.jsonl`, for a move or Sandbox create to complete | same | | Time limit | default 1 hour (`timeout` in ms) | same, `INIT_TIMEOUT_MS` | | Progress | `{phase, done, total}`: `check`, `send` (bytes, worker route only), `install`, `record` | same | | Lease | this process holds the Store's lease for the whole Init, on every route | same | diff --git a/docs/architecture/control/stores-and-projects/sqlite-and-postgresql.md b/docs/architecture/control/stores-and-projects/sqlite-and-postgresql.md index 27061cafe1..02116ee318 100644 --- a/docs/architecture/control/stores-and-projects/sqlite-and-postgresql.md +++ b/docs/architecture/control/stores-and-projects/sqlite-and-postgresql.md @@ -11,8 +11,8 @@ checked from a machine and opened, within [Stores and projects](README.md). | Source | [`layerfs-store/src/sqlite/`](../../../../control/crates/layerfs-store/src/sqlite), [`layerfs-store/src/postgresql/`](../../../../control/crates/layerfs-store/src/postgresql), [`layerfs-control/src/store.rs`](../../../../control/crates/layerfs-control/src/store.rs), [`secrets.rs`](../../../../control/crates/layerfs-home/src/secrets.rs) | `sqlite/` and `postgresql/` never import each other; the kind-neutral root -chooses by `StoreKind`. Every new Store runs the Disposable profile -(WAL, synchronous=OFF), the only permitted one; Durable execution is +chooses by `StoreKind`. Every sqlite Store opens with the Normal profile +(WAL, synchronous=NORMAL; its record's label is `normal`); Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. ## Create and remove (`sqlite/create.rs`, `sqlite/remove.rs`) diff --git a/docs/architecture/core/compare-and-merge/README.md b/docs/architecture/core/compare-and-merge/README.md index 5a8118099c..17b54ebff2 100644 --- a/docs/architecture/core/compare-and-merge/README.md +++ b/docs/architecture/core/compare-and-merge/README.md @@ -164,7 +164,7 @@ listed conflict with a defined result. ## Demonstration `layerfs-content` tests use in-memory trees. The `layerfs-store-service` tests -run Project Init into a temporary Disposable SQLite Store and call the SDK +run Project Init into a temporary SQLite Store and call the SDK method table in process; they need no Docker, root or PostgreSQL server. Each command gets a wall timeout of at most 120 s. diff --git a/docs/architecture/core/history/README.md b/docs/architecture/core/history/README.md index 26a24c1448..c2c84bb113 100644 --- a/docs/architecture/core/history/README.md +++ b/docs/architecture/core/history/README.md @@ -42,7 +42,7 @@ identities, and the one catalog contract a persistence provider implements. The crate opens no database, reads no pack and never reads a clock or PID to invent an identity. A root is an `ObjectId`; history records which root a Commit or Layer holds and never reads its content. The provider runs on the -Disposable profile only; Durable execution is +Normal profile only; Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. ## What it does @@ -213,7 +213,7 @@ Callers match variants; nothing parses message text. ## Demonstration `layerfs-history` has one test of its own; the provider tests exercise the -contract on Disposable SQLite Stores. Each command gets a wall timeout of at +contract on Normal SQLite Stores. Each command gets a wall timeout of at most 120 s. | Test or example | Command | Platform | Shows | diff --git a/docs/architecture/core/physical-storage/README.md b/docs/architecture/core/physical-storage/README.md index 3ff7d3c41c..b196c70b6b 100644 --- a/docs/architecture/core/physical-storage/README.md +++ b/docs/architecture/core/physical-storage/README.md @@ -42,8 +42,8 @@ are read back authenticated, and the ports a persistence backend implements. is the handle over one `PackPersistence`. It reads the policy once, derives `StorageCapacities`, owns the locator cache and signature ring, and opens one Save at a time. The SQLite and PostgreSQL implementations live in -`layerfs-persistence` ([Engine: Store](../../engine/store/README.md)). Only -the Disposable profile (SQLite WAL, `synchronous=OFF`) may be run; Durable +`layerfs-persistence` ([Engine: Store](../../engine/store/README.md)). Product +paths open the Normal profile (SQLite WAL, `synchronous=NORMAL`); Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. ## What it does diff --git a/docs/architecture/engine/README.md b/docs/architecture/engine/README.md index a223f0cba6..a44a76e484 100644 --- a/docs/architecture/engine/README.md +++ b/docs/architecture/engine/README.md @@ -61,7 +61,7 @@ crate except `layerfs-project`. | Rule | Where it is held | | --- | --- | | Engine crates depend only on core and other engine crates, never on control or API crates. | [`tools/check_product_boundary.py`](../../../tools/check_product_boundary.py), [engine guide](../../../engine/AGENTS.md) | -| Disposable / WAL / synchronous=OFF is the only permitted Store profile; Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. | [Store](store/README.md), [repository guide](../../../AGENTS.md) | +| Every SQLite Store opens with the Normal profile (WAL, synchronous=NORMAL), tests and diagnostics included; Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. | [Store](store/README.md), [repository guide](../../../AGENTS.md) | | One attempted operation: no retry, busy handler or replay of a failed or uncertain call. | [Store](store/README.md), [engine guide](../../../engine/AGENTS.md) | | One global database, one writer, short holds: only the atomic publish step holds the lane. | [Store](store/README.md), [Commit](commit/README.md) | | SDK Store calls run in the caller's process on Linux; the daemon serves only Workspace calls. | [Store calls](store-calls/README.md) | diff --git a/docs/architecture/engine/bridge/README.md b/docs/architecture/engine/bridge/README.md index 2630ed88ae..f65cab8313 100644 --- a/docs/architecture/engine/bridge/README.md +++ b/docs/architecture/engine/bridge/README.md @@ -143,7 +143,7 @@ are redacted from `Debug`. Source: ```text installer (Project Init) daemon (one install per process) - StoreManifest "LFSI\x01" -----------> Request: Disposable, locator == + StoreManifest "LFSI\x01" -----------> Request: Normal, locator == configured path, no daemon_sqlite Claim: create_new temp, target absent <------------- InstallReply::Ready @@ -158,7 +158,7 @@ installer (Project Init) daemon (one install per process) | --- | --- | --- | | `provider` | `Sqlite`; `Postgres` has no sealed file and is refused by `check` | [`provision.rs`](../../../../engine/crates/layerfs-bridge/src/provision.rs) | | `locator` | Absolute path in the daemon's filesystem, at most 4 096 bytes, no NUL, no trailing `/` | same | -| `profile` | The daemon accepts only `Disposable`. Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | +| `profile` | `StoreProfile::Normal` (wire byte 2, formerly named `Disposable`); the daemon accepts only it. Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization` | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | | `binding`, `cursor_key` | Catalog authority: binding 1–128 bytes, nonzero key; only on the authenticated channel | [`provision.rs`](../../../../engine/crates/layerfs-bridge/src/provision.rs) | | `stack`, `branch`, `root` | The Init's LayerStack, first Branch and complete root | same | | `bytes`, `host_sqlite`, `daemon_sqlite` | Nonzero sealed length; SQLite versions on each side (the daemon's filled only on success) | same | diff --git a/docs/architecture/engine/daemon/README.md b/docs/architecture/engine/daemon/README.md index 3dca44653b..3bcf81a46e 100644 --- a/docs/architecture/engine/daemon/README.md +++ b/docs/architecture/engine/daemon/README.md @@ -60,7 +60,7 @@ layerfs-daemon --config | Chooses the route | `fuse` or `nfs`; macOS accepts only `nfs` | [`application/filesystem.rs`](../../../../engine/crates/layerfs-daemon/src/application/filesystem.rs) | | Starts the overlay owner | Creates and closes the overlay template (`pager_kib`, `namespaces`); every later start failure is `AfterOverlay`, keeping the owner | [`application/owner.rs`](../../../../engine/crates/layerfs-daemon/src/application/owner.rs), [Overlay](../overlay/README.md) | | Takes a fresh incarnation | `generate_keypair()`; the public half is `DaemonStatus.instance` | [`application/owner.rs`](../../../../engine/crates/layerfs-daemon/src/application/owner.rs) | -| Opens the Store | An installed SQLite file with the `Disposable` profile, or PostgreSQL; `Sqlite { install: None }` waits for an install | [`application/owner.rs`](../../../../engine/crates/layerfs-daemon/src/application/owner.rs), [`Cargo.toml`](../../../../engine/crates/layerfs-daemon/Cargo.toml) | +| Opens the Store | An installed SQLite file with the `Normal` profile, or PostgreSQL; `Sqlite { install: None }` waits for an install | [`application/owner.rs`](../../../../engine/crates/layerfs-daemon/src/application/owner.rs), [`Cargo.toml`](../../../../engine/crates/layerfs-daemon/Cargo.toml) | | Starts FUSE serving (Linux) | `/dev/fuse` to `0600`, checks the mount home, mounts a private `fusectl` tree for abort controls; if that fails, writes `LAYERFS_DAEMON_ABORT_UNBOUND` and starts without forced unmount | [`application/filesystem.rs`](../../../../engine/crates/layerfs-daemon/src/application/filesystem.rs) | | Starts NFS serving | `ExportServing`; force-unmounts client mounts a previous daemon left (`LAYERFS_NFS_RECLAIM` lines); the same reclaim deletes `/.appledouble`, the AppleDouble companions' disposable scratch area (directories `0700`, files `0600`, no fsync, no space reserved ahead), and touches nothing else under the mount home; helper overrides `LAYERFS_NFS_MOUNT`, `_UNMOUNT`, `_FORCE`, `_FLUSH` | [`application/filesystem.rs`](../../../../engine/crates/layerfs-daemon/src/application/filesystem.rs), [`export.rs`](../../../../engine/crates/layerfs-daemon/src/control/export.rs) | @@ -156,11 +156,11 @@ the port contract is in [Kernel routes](../kernel-routes/README.md). | Phase | Daemon step | On failure | Source | | --- | --- | --- | --- | | Admission | Only in `InstallPending`; phase becomes `Installing` | Second installer `Refused(Request, Exists)` | [`application/serve.rs`](../../../../engine/crates/layerfs-daemon/src/application/serve.rs) | -| `Request` | Manifest is `Disposable`, names the configured Store path, carries no `daemon_sqlite` | Protocol refusal | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | +| `Request` | Manifest is `Normal`, names the configured Store path, carries no `daemon_sqlite` | Protocol refusal | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | | `Claim` | `create_new` of the temporary name; target absent; send `Ready` | Claim name recorded before the attempt | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs), [`install_file.rs`](../../../../engine/crates/layerfs-daemon/src/install_file.rs) | | `Transfer` | Write each record until `bytes`; then `INSTALL_FINISH` | Partial file kept | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | | `Publish` | One `rename` to the Store path, no sync | — | same | -| `Open` | Open with the `Disposable` profile; check the initial Branch and root | Opened Store kept in `InstallFailure` | same | +| `Open` | Open with the `Normal` profile; check the initial Branch and root | Opened Store kept in `InstallFailure` | same | | `Reply` | `Installed(manifest + daemon_sqlite)`; build `Service`, phase `ControlReady` | Published and checked: still `ControlReady`; otherwise `Retained` | [`application/serve.rs`](../../../../engine/crates/layerfs-daemon/src/application/serve.rs) | Every failure sends one `Refused(InstallRefusal)` unless the channel itself @@ -168,7 +168,7 @@ failed; files are never removed automatically. `InstallWork` counts records, writes, bytes, sync calls and the largest record ([`install_types.rs`](../../../../engine/crates/layerfs-daemon/src/install_types.rs)). Durable execution is `NOT_RUN — disabled by owner until explicit -reauthorization`: the `Request` check refuses any non-`Disposable` manifest +reauthorization`: the `Request` check refuses any non-`Normal` manifest before the Durable sync branches in `install.rs` can run. ## Invariants @@ -178,7 +178,7 @@ before the Durable sync branches in `install.rs` can run. | The daemon launches and supervises no command; Sandbox or an external executor owns launch, streams, exit status and cancellation | [`application/cli.rs`](../../../../engine/crates/layerfs-daemon/src/application/cli.rs), [`lib.rs`](../../../../engine/crates/layerfs-daemon/src/lib.rs) | | The daemon serves no Store calls: `Fork`, `History`, `Branches` are `Invalid`; off-table SDK methods are `UnknownMethod` | [`control/operations.rs`](../../../../engine/crates/layerfs-daemon/src/control/operations.rs), [`operator/dispatch.rs`](../../../../engine/crates/layerfs-daemon/src/operator/dispatch.rs) | | Commands run as a distinct non-root identity; daemon backing files stay outside the mount home | [`application/config.rs`](../../../../engine/crates/layerfs-daemon/src/application/config.rs), [`daemon_setup.rs`](../../../../engine/crates/layerfs-bridge/src/daemon_setup.rs) | -| A Store install must be `Disposable` | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | +| A Store install must be `Normal` | [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | | No connection failure owns a slot; a stale or duplicate finish changes nothing | [`application/owner.rs`](../../../../engine/crates/layerfs-daemon/src/application/owner.rs) (`Slots::finish`) | | One attempt per operation; a stop after an effect keeps the exact owner and is reported, never retried or settled by a later read | [`control/detach.rs`](../../../../engine/crates/layerfs-daemon/src/control/detach.rs), [`control/types.rs`](../../../../engine/crates/layerfs-daemon/src/control/types.rs) | | Whole operations run outside the registry mutex; admission checks and marks inside it | [`control/registry.rs`](../../../../engine/crates/layerfs-daemon/src/control/registry.rs), [`control/operations.rs`](../../../../engine/crates/layerfs-daemon/src/control/operations.rs) | diff --git a/docs/architecture/engine/project-init/README.md b/docs/architecture/engine/project-init/README.md index 592905fc77..6a96af5c9e 100644 --- a/docs/architecture/engine/project-init/README.md +++ b/docs/architecture/engine/project-init/README.md @@ -132,7 +132,7 @@ readiness wait, not a retry ([`import/batch.rs`](../../../../engine/crates/layer | Rule | Source | | --- | --- | | Seal consumes the sole session after `Save::finish` and publication; it is never called on a live daemon's shared Store. `initialize` then builds a `StoreManifest` and returns a `SealedProject`. The lane is held across the checkpoint, the close and the sidecar check, so an opener waiting for the lane cannot create a `-wal` in the gap and turn a sealed Store into `Refused`. | [`store/seal.rs`](../../../../engine/crates/layerfs-persistence/src/store/seal.rs), [`store/init.rs`](../../../../engine/crates/layerfs-project/src/store/init.rs) | -| Install checks Disposable, file kind and length against the manifest, streams `MAX_PLAINTEXT_BYTES` records from one fixed buffer, then the finish marker; it never opens the file as a database. A reply manifest that differs from the sent one plus the daemon's SQLite version is a protocol mismatch. | [`store/install.rs`](../../../../engine/crates/layerfs-project/src/store/install.rs), [`control.rs`](../../../../engine/crates/layerfs-bridge/src/control.rs) | +| Install checks the Normal profile, file kind and length against the manifest, streams `MAX_PLAINTEXT_BYTES` records from one fixed buffer, then the finish marker; it never opens the file as a database. A reply manifest that differs from the sent one plus the daemon's SQLite version is a protocol mismatch. | [`store/install.rs`](../../../../engine/crates/layerfs-project/src/store/install.rs), [`control.rs`](../../../../engine/crates/layerfs-bridge/src/control.rs) | | On a failure after the request was attempted the caller closes its send side (the fence), unless the failure was a channel error. | [`store/install.rs`](../../../../engine/crates/layerfs-project/src/store/install.rs) | The receiving side is in [Daemon](../daemon/README.md); the wire records are @@ -163,14 +163,14 @@ PostgreSQL the release of the last operation empties the acquisition tables | The source is the complete tree; nothing is filtered. | `InitRequest::source` in [`store/init.rs`](../../../../engine/crates/layerfs-project/src/store/init.rs); [`complete_root.rs`](../../../../engine/crates/layerfs-project/tests/complete_root.rs) | | Full-root acquisition is explicit: only a `ProjectApi` call runs it; mount and Commit never do. | No production dependency on `layerfs-project` from Workspace, daemon, Store-call or NFS crates (dev-dependencies only); see each [`Cargo.toml`](../../../../engine/crates/layerfs-store-service/Cargo.toml) | | One encoder: objects come from Content and go through the Storage Save. | [`import/files.rs`](../../../../engine/crates/layerfs-project/src/import/files.rs), [`import/namespace.rs`](../../../../engine/crates/layerfs-project/src/import/namespace.rs) | -| A SQLite Store must be Disposable. | `explicit Disposable Store profile required` in [`store/init.rs`](../../../../engine/crates/layerfs-project/src/store/init.rs), [`store/live.rs`](../../../../engine/crates/layerfs-project/src/store/live.rs), [`store/install.rs`](../../../../engine/crates/layerfs-project/src/store/install.rs) | +| A SQLite Store must be Normal. | `explicit Normal Store profile required` in [`store/init.rs`](../../../../engine/crates/layerfs-project/src/store/init.rs), [`store/live.rs`](../../../../engine/crates/layerfs-project/src/store/live.rs), [`store/install.rs`](../../../../engine/crates/layerfs-project/src/store/install.rs) | | Symbolic links are stored, never followed. | [`import/source.rs`](../../../../engine/crates/layerfs-project/src/import/source.rs) | | Each host file identity is constructed once; hard links share its serial. | [`import/backing.rs`](../../../../engine/crates/layerfs-project/src/import/backing.rs), [`import/files.rs`](../../../../engine/crates/layerfs-project/src/import/files.rs) | | Working rows are removed before the tree Save finishes and before any history is published. | [`import/init.rs`](../../../../engine/crates/layerfs-project/src/import/init.rs) | | Input-sized state lives in the acquisition backing; resident buffers are fixed windows. No total file, entry or byte cap. | [`import/backing.rs`](../../../../engine/crates/layerfs-project/src/import/backing.rs); [`namespace_scaling.rs`](../../../../engine/crates/layerfs-project/tests/namespace_scaling.rs) | | Every backing call, Store write and install send is one attempt; an unknown outcome is kept, never replayed or deleted. | [`import/backing.rs`](../../../../engine/crates/layerfs-project/src/import/backing.rs), [`store/install_types.rs`](../../../../engine/crates/layerfs-project/src/store/install_types.rs) | -Disposable / WAL / synchronous=OFF is the only permitted profile. Durable +Init opens the Store with the Normal profile (WAL, `synchronous=NORMAL`). Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. ## Limits and failures @@ -203,9 +203,9 @@ a fenced owner; no product caller uses them. | Test or example | Command | Platform | Shows | | --- | --- | --- | --- | -| [`init_sqlite.rs`](../../../../engine/crates/layerfs-project/tests/init_sqlite.rs) | `cargo +1.85.1 test --locked -p layerfs-project --test init_sqlite` | macOS or Linux (elsewhere only the refusal test) | Disposable Init matches the in-memory root, passes the namespace oracle, leaves no working rows; refusals for missing acquisition tables and a Store inside the source. | +| [`init_sqlite.rs`](../../../../engine/crates/layerfs-project/tests/init_sqlite.rs) | `cargo +1.85.1 test --locked -p layerfs-project --test init_sqlite` | macOS or Linux (elsewhere only the refusal test) | Normal Init matches the in-memory root, passes the namespace oracle, leaves no working rows; refusals for missing acquisition tables and a Store inside the source. | | [`complete_root.rs`](../../../../engine/crates/layerfs-project/tests/complete_root.rs) | `cargo +1.85.1 test --locked -p layerfs-project --test complete_root` | Unix; the SQLite-backed case macOS only | `.git`, ignored files, `node_modules`, caches, outputs, hard links and symlink targets imported exactly. | | [`acquisition_custody.rs`](../../../../engine/crates/layerfs-project/tests/acquisition_custody.rs) | `cargo +1.85.1 test --locked -p layerfs-project --test acquisition_custody` | Unix | Backing placement refusal, cleanup before publish, and untouched rows on an unknown outcome. | | [`namespace_scaling.rs`](../../../../engine/crates/layerfs-project/tests/namespace_scaling.rs) | `cargo +1.85.1 test --locked -p layerfs-project --test namespace_scaling` | Unix | Backed counts grow with the tree while buffers and windows stay fixed. | | [`init_postgresql.rs`](../../../../engine/crates/layerfs-project/tests/init_postgresql.rs) | `cargo +1.85.1 test --locked -p layerfs-project --test init_postgresql` | Unix with `LAYERFS_TEST_POSTGRES_URL`; otherwise it reports NOT_RUN | The same folder in SQLite and PostgreSQL gives the same root and no leftover acquisition rows. | -| [`verify_namespace.rs`](../../../../engine/crates/layerfs-project/examples/verify_namespace.rs) | `cargo +1.85.1 run --locked -p layerfs-project --example verify_namespace -- disposable` | macOS or Linux; `LAYERFS_HISTORY_CURSOR_KEY` (hex) | Independent check of a Store's genesis root against a manifest; seals the Store at the end. Always pass `disposable`: an omitted profile selects Durable. | +| [`verify_namespace.rs`](../../../../engine/crates/layerfs-project/examples/verify_namespace.rs) | `cargo +1.85.1 run --locked -p layerfs-project --example verify_namespace -- normal` | macOS or Linux; `LAYERFS_HISTORY_CURSOR_KEY` (hex) | Independent check of a Store's genesis root against a manifest; seals the Store at the end. Always pass `disposable`: an omitted profile selects Durable. | diff --git a/docs/architecture/engine/store-calls/README.md b/docs/architecture/engine/store-calls/README.md index 15e324cea2..15f3fb9d17 100644 --- a/docs/architecture/engine/store-calls/README.md +++ b/docs/architecture/engine/store-calls/README.md @@ -35,7 +35,7 @@ Commits use; those are described under [Commit](../commit/README.md) and | | | v v v StoreService { store: Arc, owner: OwnerClient, bound <= 64 } - kernel_guard::check -> open (Disposable) -> overlay template + kernel_guard::check -> open (Normal) -> overlay template | | v v Store (SQLite file or PostgreSQL) overlay owner: one private @@ -60,7 +60,7 @@ Commits use; those are described under [Commit](../commit/README.md) and StoreService::open_direct(store, binding, cursor_key, template) 1 kernel_guard::check(store) -> Unsupported (nothing opened) 2 store.is_file() -> Missing - 3 open_store_observed(sqlite, Disposable, CALLS=64, cache 64 KiB) + 3 open_store_observed(sqlite, Normal, CALLS=64, cache 64 KiB) writer session + read-only control reader -> Busy("Store open: ..") / Failed("Store open: ..") @@ -189,7 +189,7 @@ not in `methods::call`, and in this repository only tests call it. | --- | --- | | No FUSE, socket or Sandbox in this crate; no unsafe Rust. | [`Cargo.toml`](../../../../engine/crates/layerfs-store-service/Cargo.toml), `#![forbid(unsafe_code)]` in [`lib.rs`](../../../../engine/crates/layerfs-store-service/src/lib.rs) | | The guard runs before any file is opened; a refused setup leaves the Store and template untouched. | [`kernel_guard.rs`](../../../../engine/crates/layerfs-store-service/src/kernel_guard.rs), [`store_service.rs`](../../../../engine/crates/layerfs-store-service/src/store_service.rs) | -| A SQLite Store is opened Disposable explicitly, with no busy handler, retry or fsync. | `open_direct` in [`store_service.rs`](../../../../engine/crates/layerfs-store-service/src/store_service.rs) | +| A SQLite Store is opened Normal explicitly, with no busy handler, retry or fsync. | `open_direct` in [`store_service.rs`](../../../../engine/crates/layerfs-store-service/src/store_service.rs) | | `read`, `write` and `history` know no SDK method names. | [`methods/mod.rs`](../../../../engine/crates/layerfs-store-service/src/methods/mod.rs) | | Each call runs once; no retry, replay or fallback. | [`methods/dispatch.rs`](../../../../engine/crates/layerfs-store-service/src/methods/dispatch.rs) | | Reads never take the publication lane. | [`store/open.rs`](../../../../engine/crates/layerfs-store-service/src/store/open.rs) | @@ -226,7 +226,7 @@ not in `methods::call`, and in this repository only tests call it. | [`merge_units.rs`](../../../../engine/crates/layerfs-store-service/tests/merge_units.rs) | `cargo +1.85.1 test --locked -p layerfs-store-service --test merge_units` | macOS or Linux | A unit both sides changed comes whole from the later write. | | [`write_refusals.rs`](../../../../engine/crates/layerfs-store-service/tests/write_refusals.rs) | `cargo +1.85.1 test --locked -p layerfs-store-service --test write_refusals` | macOS or Linux | A write onto a directory is `IsDirectory`, onto another non-file `NotFile`, a bad name `InvalidInput`; nothing is committed. | -The tests build a Disposable Store with Project Init in a temporary +The tests build a Normal Store with Project Init in a temporary directory ([`tests/support/sdk.rs`](../../../../engine/crates/layerfs-store-service/tests/support/sdk.rs)). ## Pages diff --git a/docs/architecture/engine/store/README.md b/docs/architecture/engine/store/README.md index d230281f2a..09b94d8232 100644 --- a/docs/architecture/engine/store/README.md +++ b/docs/architecture/engine/store/README.md @@ -133,7 +133,7 @@ own write transaction, which the one writer already orders. | Waiting for a turn is readiness, never a retry; the queue has no time limit and a holder that unwinds releases its turn | [`admission.rs`](../../../../engine/crates/layerfs-persistence/src/backend/admission.rs) | | Short holds: only head check, merge step and publish run under the lane | [`commit.rs`](../../../../engine/crates/layerfs-store-service/src/store/commit.rs) | | Reads never take the lane or the cross-process lock | [`sqlite/session/transaction.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/transaction.rs), [`read_service.rs`](../../../../engine/crates/layerfs-store-service/src/store/read_service.rs) | -| Disposable / WAL / synchronous=OFF is the only permitted SQLite profile; product openers select it explicitly and refuse anything else | [`store_service.rs`](../../../../engine/crates/layerfs-store-service/src/store_service.rs), [`init.rs`](../../../../engine/crates/layerfs-project/src/store/init.rs), [`live.rs`](../../../../engine/crates/layerfs-project/src/store/live.rs), [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | +| Normal / WAL / synchronous=NORMAL is the only SQLite profile, selected explicitly by every opener; Durable is refused | [`store_service.rs`](../../../../engine/crates/layerfs-store-service/src/store_service.rs), [`init.rs`](../../../../engine/crates/layerfs-project/src/store/init.rs), [`live.rs`](../../../../engine/crates/layerfs-project/src/store/live.rs), [`install.rs`](../../../../engine/crates/layerfs-daemon/src/install.rs) | | One attempt per operation: `busy_timeout=0`, no busy handler, no retry or replay; `Unknown` quarantines the session and every later call fails without SQL | [`records.rs`](../../../../engine/crates/layerfs-persistence/src/backend/records.rs), [`sqlite/session/transaction.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/transaction.rs) | | Published packs, units, locations and value blocks never change; a block overlapping a stored one fails its publication | Triggers and insert-only statements: [`objects.sql`](../../../../engine/crates/layerfs-persistence/sql/sqlite/objects.sql), [`sqlite/metadata/values.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/metadata/values.rs) | | Pack ids never go back; inode serials are never recycled | [`metadata/allocation.rs`](../../../../engine/crates/layerfs-persistence/src/metadata/allocation.rs), [`history/allocation.rs`](../../../../engine/crates/layerfs-persistence/src/history/allocation.rs) | @@ -144,11 +144,12 @@ own write transaction, which the one writer already orders. Durable persistence: the `Durable` SQLite variant still compiles, but its execution is `NOT_RUN — disabled by owner until explicit reauthorization`. -Every product opener selects Disposable by name, and new code must too: the +Every opener selects `Normal` by name, and new code must too: the Rust enum's `#[default]` attribute still sits on the retained `Durable` -variant, so an unnamed profile is a defect. A Disposable Store survives -process termination, -and a kernel or VM crash can lose or damage it +variant, so an unnamed profile is a defect. A Normal Store survives +process termination; a kernel or VM crash can lose the commits since the +last synchronized checkpoint, and its safety gate has not run, so no +power-loss guarantee is claimed ([`config.rs`](../../../../engine/crates/layerfs-persistence/src/store/config.rs)). A PostgreSQL Store has no profile; its write setting is `synchronous_commit`. diff --git a/docs/architecture/engine/store/diagnostics.md b/docs/architecture/engine/store/diagnostics.md index e225c7bdb9..aebc674480 100644 --- a/docs/architecture/engine/store/diagnostics.md +++ b/docs/architecture/engine/store/diagnostics.md @@ -176,7 +176,7 @@ graphs block it explicitly | Test | Command | Shows | | --- | --- | --- | -| [`store_diagnostic.rs`](../../../../engine/crates/layerfs-persistence/tests/store_diagnostic.rs) | `cargo +1.85.1 test --locked -p layerfs-persistence --test store_diagnostic` | Audits of real Disposable Stores with live WAL; damage found in full mode and named as excluded in quick mode | +| [`store_diagnostic.rs`](../../../../engine/crates/layerfs-persistence/tests/store_diagnostic.rs) | `cargo +1.85.1 test --locked -p layerfs-persistence --test store_diagnostic` | Audits of real Normal Stores with live WAL; damage found in full mode and named as excluded in quick mode | | [`diagnostic_overwrite.rs`](../../../../engine/crates/layerfs-persistence/tests/diagnostic_overwrite.rs) | `cargo +1.85.1 test --locked -p layerfs-persistence --test diagnostic_overwrite` | Exact overwrite reconstruction, including late publication and retained forks | | [`sqlite_structure_diagnostic.rs`](../../../../engine/crates/layerfs-persistence/tests/sqlite_structure_diagnostic.rs) | `cargo +1.85.1 test --locked -p layerfs-persistence --test sqlite_structure_diagnostic` | Raw structural errors stay distinct from unsupported schemas | | [`postgresql_doctor_physical.rs`](../../../../engine/crates/layerfs-persistence/tests/postgresql_doctor_physical.rs) | `LAYERFS_TEST_POSTGRES_URL=… cargo +1.85.1 test --locked -p layerfs-persistence --test postgresql_doctor_physical` | Per-relation amcheck coverage; a missing extension is `Unknown` | diff --git a/docs/architecture/engine/store/sqlite.md b/docs/architecture/engine/store/sqlite.md index ad049f325e..3fd117ea4e 100644 --- a/docs/architecture/engine/store/sqlite.md +++ b/docs/architecture/engine/store/sqlite.md @@ -28,7 +28,7 @@ The SQLite backend of the [Store](README.md): one WAL file every opener shares t | --- | --- | --- | | `sqlite_pack_layout` | `Monolithic` (`user_version` 36): whole `pack.body`; `GroupRows` (37): `control` row plus one `pack_unit` row per group; `GroupRowsIndexed` (38): adds index `pack_unit_mapping` | [`config.rs`](../../../../engine/crates/layerfs-persistence/src/store/config.rs), [`objects_units.sql`](../../../../engine/crates/layerfs-persistence/sql/sqlite/objects_units.sql) | | `sqlite_acquisition` | `Absent` (+0) or `Tables` (+6, versions 42–44, created with `auto_vacuum=INCREMENTAL`) | [`config.rs`](../../../../engine/crates/layerfs-persistence/src/store/config.rs), [`acquisition/schema.sql`](../../../../engine/crates/layerfs-persistence/sql/sqlite/acquisition/schema.sql) | -| `sqlite_profile` | `Normal` in every product opener since 2026-11-17 (see [Store](README.md)); a test may select `Disposable` | [`profile.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs) | +| `sqlite_profile` | `Normal`, the only profile a Store opens with (see [Store](README.md)) | [`profile.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs) | Every table is `STRICT`; history keys are `WITHOUT ROWID` blobs whose first byte tags the kind (`0x31` stack, `0x32` Layer, `0x12` Commit, `0x11` @@ -55,13 +55,13 @@ UPDATE and DELETE on `pack` and `pack_unit`. Open checks `application_id`, | Open | `READ_WRITE` or `READ_ONLY`, `NO_MUTEX`; statement cache 64 | [`connection.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/connection.rs) | | Guard | `busy_timeout=0`; `SQLITE_DBCONFIG_DEFENSIVE` on | same | | Settings | `profile::apply`, then read back into `ConnectionProfile`; a mismatch is `Integrity`; an existing Store not in `wal` mode is refused | [`profile.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs) | -| Checkpoint thread | writable Normal or Disposable session only: a second connection on its own thread, opened with the session's `synchronous` value and read back; failure to start it refuses the open | [`background.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/background.rs) | +| Checkpoint thread | writable Normal session only: a second connection on its own thread, opened with the session's `synchronous` value and read back; failure to start it refuses the open | [`background.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/background.rs) | | Last close | A writable session's close waits for `Writer::acquire(path)` like any write (or reuses the lane an uncertain transaction already holds), so its close, which may be SQLite's last, checkpoints and removes `-wal`/`-shm` under the lane; a pull's verify close and a restore's in-use check rely on that. If the wait itself fails (interrupted, or the directory cannot be opened), the close sets `SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE` first, so SQLite takes no exclusive lock, runs no checkpoint and removes nothing; there is no second attempt. If even that setting fails, the connection is kept until process exit. A read-only or diagnostic session cannot checkpoint or remove those files and takes no lane, so it never waits behind a writer kept after an uncertain write. The checkpoint thread's connection closes first and never takes it. One exception: an open whose checkpoint thread fails to start drops its new connection after the open's lane is released | [`lifecycle.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/lifecycle.rs) | -| Setting | Normal (Disposable where it differs) | Source | +| Setting | Normal | Source | | --- | --- | --- | -| identity | `sqlite-wal-normal-v2` (`sqlite-wal-off-v2`) | [`profile.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs) | -| `journal_mode`, `synchronous`, `fullfsync` | `wal`, 1 (NORMAL; Disposable 0, OFF), 0 | same | +| identity | `sqlite-wal-normal-v2` | [`profile.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs) | +| `journal_mode`, `synchronous`, `fullfsync` | `wal`, 1 (NORMAL), 0 | same | | `wal_autocheckpoint` | 0: the session's checkpoint thread copies the log | same | | shared | `foreign_keys=1`, `checkpoint_fullfsync=1`, `journal_size_limit=4194304`, `cache_size=-2048`, `mmap_size=0`, `temp_store=2`, `page_size=4096`, `busy_timeout=0` | same | @@ -157,7 +157,7 @@ quarantines the session and keeps the lock | --- | --- | --- | | `seal` | Consumes the sole session; never runs on a live shared Store (a daemon keeps its Store open across Saves and Commits). It holds the writer lane from its checkpoint to its sidecar check; a refused seal closes its connection under that same hold and then frees the lane. A compaction seals through the same steps under the lane it already holds (`seal_holding`), including the macOS refusal of a Store path that is a symbolic link or has a second hard link, but without the extent release below: its rename replaces the sealed file | [`seal.rs`](../../../../engine/crates/layerfs-persistence/src/store/seal.rs), [`lifecycle/seal.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/lifecycle/seal.rs) | | macOS extent release | Only in `seal`, never in a compaction. Unused extents past logical EOF move to a same-volume scratch (`F_TRANSFEREXTENTS`), which is removed; no logical byte is copied or truncated. APFS refuses the move with `ENOENT` for a file that was ever one side of a clone (`cp -c`, `clonefile`, `std::fs::copy`, a Finder duplicate; the origin as well as the copy, also after the other side is deleted or every byte is rewritten) and has blocks past its end. Measured on macOS 26.4.1 the refusal moves nothing, and the release checks that (same length and block count, empty scratch) before it removes the scratch and reports nothing released: the seal succeeds and the file keeps its allocation. Any other unknown result, or a refusal after which a block count changed, is `Uncertain` and keeps the scratch. The one module allowed `unsafe` | [`seal_allocation.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/lifecycle/seal_allocation.rs), [`file_control.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/lifecycle/file_control.rs) | -| `snapshot` | One read transaction; page size, `auto_vacuum`, `user_version` and `application_id` carry over; destination must not exist; a busy source is `Busy`, never retried; a failed copy may leave a file for the caller to remove | [`snapshot.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/snapshot.rs) | +| `snapshot` | One read transaction; the copy is written with the Store's own `synchronous` (NORMAL), never OFF; page size, `auto_vacuum`, `user_version` and `application_id` carry over; destination must not exist; a busy source is `Busy`, never retried; a failed copy may leave a file for the caller to remove | [`snapshot.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/snapshot.rs) | | Free-space guard | A pack batch must leave 64 MiB after counting its bytes twice (WAL, then file); metadata-only batches are not guarded | [`headroom.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/lifecycle/headroom.rs) | | `reclaim_space(pages)` | `1..=RECLAMATION_PAGE_LIMIT` (512) pages by `incremental_vacuum`, stepped in one short write until the free list is empty or the page budget is spent (SQLite 3.40 removes one page per statement, not `N`); only Stores created with `auto_vacuum=2` | [`reclamation.rs`](../../../../engine/crates/layerfs-persistence/src/backend/sqlite/lifecycle/reclamation.rs) | diff --git a/docs/architecture/glossary.md b/docs/architecture/glossary.md index 75aa9b8b57..dde15bb6c4 100644 --- a/docs/architecture/glossary.md +++ b/docs/architecture/glossary.md @@ -24,7 +24,6 @@ LayerFS (backend, install, scope), the row gives both. | Construction | Building canonical file and tree objects from input and saving them: Init from a native folder, a Commit from its captured generation. A Commit has one construction producer. | [Commit: construction](engine/commit/construction.md), [Project Init: construction](engine/project-init/README.md#construction), [Files: construction](core/files/README.md#construction) | | Custody | What an operation keeps after a failure whose effect is not settled (a capture, a published Commit, a retained mount owner). While it is kept, the next operation is refused instead of guessed. | [Commit: custody and settle](engine/commit/README.md#custody-and-settle) | | Daemon | `layerfs-daemon`: the process in a Sandbox that serves its Workspaces to the kernel and runs their Commits. It opens the global Store directly, supervises no commands and serves no Store calls. | [Daemon](engine/daemon/README.md) | -| Disposable profile | The only permitted SQLite Store profile: WAL journal and `synchronous=OFF`. Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. | [Store: invariants](engine/store/README.md#invariants) | | Doctor | `layerfs-control` `doctor/`: read-only checks of a home, its host, machines, Sandboxes, Stores and backups that report what is wrong and the step that fixes it. | [Doctor](control/doctor/README.md) | | Effective view | What a mounted Workspace shows: its base plus the overlay rows above the installed floor. | [Workspace: the effective view](engine/workspace/README.md#the-effective-view) | | Exec | `workspace.exec`: the Sandbox runtime runs `bash -c ` in a Workspace directory and returns its exit code and output. Optional: file access needs no Exec. | [Sandboxes: what it does](control/sandboxes/README.md#what-it-does), [Daemon channel and exec](control/sandboxes/daemon-channel-and-exec.md) | @@ -45,6 +44,7 @@ LayerFS (backend, install, scope), the row gives both. | `main` | A project's line of Layers (its LayerStack's head Layer). It is not a Branch: it is not mounted or written, only forked from and published to. | [Store calls: Branch history](engine/store-calls/README.md#branch-history) | | Manifest | The text object, uploaded last under a pieced backup's name, that records the whole file's bytes, sha256 and piece size. | [Buckets: pieces and manifest](control/backups/buckets.md#pieces-and-manifest) | | Merge | `branch.merge`: a new Branch from two sides, fast-forward or a merge Commit; also the step a Commit takes when its Branch head moved. | [Store calls: Branch history](engine/store-calls/README.md#branch-history), [Compare and merge: merge](core/compare-and-merge/merge.md) | +| Normal profile | The only SQLite Store profile (owner, 2026-11-17; the former Disposable, `synchronous=OFF`, was removed 2026-11-23), tests and diagnostics included: WAL journal with `synchronous=NORMAL`, so the log is synchronized at checkpoints, not at every COMMIT; a kernel or VM crash can lose the commits since the last synchronized checkpoint. Its safety gate has not run, so no power-loss guarantee is claimed. Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. | [Store: invariants](engine/store/README.md#invariants) | | Overlay | A Workspace's own SQLite file with its changed metadata, payload and operation records. It is copied from the daemon's template at mount and deleted at terminal unmount. | [Overlay](engine/overlay/README.md) | | Physical storage, Store, Stores and projects | Three topics in three layers. Physical storage (`layerfs-storage`, core) turns objects into pack records and reads them back. Store (`layerfs-persistence`, engine) is the one database holding those records and history, with one writer. Stores and projects (`layerfs-store`, control) keeps each Store's and project's record in the home and decides where its calls run. | [Physical storage](core/physical-storage/README.md), [Store](engine/store/README.md), [Stores and projects](control/stores-and-projects/README.md) | | Piece | One fixed-size part, `.piece-NNNNNN`, of a backup too large for one bucket object. | [Buckets: pieces and manifest](control/backups/buckets.md#pieces-and-manifest) | diff --git a/docs/general/artifact-qualification-2.0.0.md b/docs/general/artifact-qualification-2.0.0.md index 51b7342903..509fde5413 100644 --- a/docs/general/artifact-qualification-2.0.0.md +++ b/docs/general/artifact-qualification-2.0.0.md @@ -125,7 +125,7 @@ absence is reported as `Unsupported` with the missing path (seen on ## Runs from the installed artifacts Each in a fresh directory on ext4, `NODE_PATH`, `PYTHONPATH`, `LAYERFS_NATIVE` -and `LAYERFS_HOME` unset, a private mode-0700 home, Disposable profile. +and `LAYERFS_HOME` unset, a private mode-0700 home, the then-Disposable profile (`synchronous=OFF`; Stores now open Normal). | Case | Result | | --- | --- | @@ -196,7 +196,7 @@ tree these artifacts were built from (`ce9cd4144`, baseline `d4304741` plus four current base: the policy of layerfs-project#7 landed in `b919f50ea` ("permanently disable Firecracker and SSH without removing adapters", #577), which `d4304741` does not contain and `02133596a` and later do. -Checked on a debug `layerfs` command built from the current base (`02133596a`), in an empty Disposable home: +Checked on a debug `layerfs` command built from the current base (`02133596a`), in an empty home (then the Disposable profile): - `machine platforms`: `firecracker` and `ssh` are `ready: false`, reason "permanently disabled by product policy (layerfs-project#7)"; `lima` is `ready: false` ("lima runs on macOS hosts only"). diff --git a/docs/general/backups-minio-r2.md b/docs/general/backups-minio-r2.md index bf3d4898d3..1687ea0530 100644 --- a/docs/general/backups-minio-r2.md +++ b/docs/general/backups-minio-r2.md @@ -111,7 +111,7 @@ layerfs branch publish shop/api dev ``` `store create` answers -`{"name":"shop","kind":"sqlite","machine":"native","profile":"disposable",…}`. +`{"name":"shop","kind":"sqlite","machine":"native","profile":"normal",…}`. `main` is read-only; changes go on a branch and `branch publish` moves them to `main`. @@ -275,4 +275,4 @@ Delete test objects with `mc rm --recursive --force lab/layerfs-test/backups/` - A backup copies the Store as of one read transaction while writers carry on; the restored history is one consistent point (tested with 148 concurrent commits). -- Durable Stores are not run; backups were tested on Disposable Stores. +- Durable Stores are not run; backups were tested on Stores of the former Disposable profile (`synchronous=OFF`); Stores now open Normal (`synchronous=NORMAL`). diff --git a/docs/general/cas_cdc_deltaencoding_handbook.md b/docs/general/cas_cdc_deltaencoding_handbook.md index 57f859f687..5eb4de5fd6 100644 --- a/docs/general/cas_cdc_deltaencoding_handbook.md +++ b/docs/general/cas_cdc_deltaencoding_handbook.md @@ -37,7 +37,7 @@ problems and can cooperate in the same Save. Compression is another physical operation: an independent value can compress without using a base. Delta encoding and ordinary compression are not synonyms. -All three mechanisms are shared across Durable and Disposable profiles. Their +All three mechanisms are shared across the Durable and Normal profiles. Their correctness and identities do not depend on relaxing durability. ```text diff --git a/docs/general/cluster_one_handbook.md b/docs/general/cluster_one_handbook.md index dee4b2e7f0..a31fef62e6 100644 --- a/docs/general/cluster_one_handbook.md +++ b/docs/general/cluster_one_handbook.md @@ -668,16 +668,17 @@ Source: [Save lifecycle](../../core/crates/layerfs-storage/src/save/operation.rs | Choice | Current behavior | | --- | --- | | Durable | Retained WAL / FULL source may compile; execution disabled until explicit owner reauthorization | -| Disposable | Sole active profile, selected explicitly: SQLite WAL / OFF; process-crash survival, no kernel/VM-crash durability | +| Normal | Sole SQLite Store profile since 2026-11-23, selected explicitly: SQLite WAL / NORMAL; its safety gate has not run, so only process-crash survival is claimed (the former Disposable WAL / OFF profile was removed) | | Monolithic | Creation layout schema1; complete pack BLOBs | | GroupRows | Creation layout schema2; independently stored complete encoded units | | GroupRowsIndexed | Creation layout schema3; group rows with covering mapping index | Source update after `727476a4d`, 2026-10-07: Persistence now opens on macOS and Linux, using system SQLite on macOS and the existing bundled dependency on Linux. -Normal shared creation uses WAL for both profiles. Open verifies WAL without setting/converting -journal mode; old memory-journal Disposable Stores must be regenerated. Profile -identities are `sqlite-wal-full-v2` and `sqlite-wal-off-v2`. Mixed profile selection +Shared creation uses WAL for both profiles. Open verifies WAL without setting/converting +journal mode; old memory-journal Stores must be regenerated. Profile +identities are `sqlite-wal-full-v2` and `sqlite-wal-normal-v2` (the removed +Disposable profile was `sqlite-wal-off-v2`). Mixed profile selection on a shared WAL file is a provisioning fact and cannot be detected at open. Opening supports schemas1–3 and acquisition variants4–6 without migration. @@ -734,7 +735,9 @@ separate MEMORY/OFF database and receives no global-Store profile change. The [foundation checkpoint](https://github.com/Ephemeral-AI-Lab/layerfs/blob/af2ad92bce866b4e3e11365f016b12806828a53b/core/docs/issues/307/PRE-S8-F1-F4-20261007.md) owns functional evidence and remaining integration work. Durable builds but new Durable -execution is NOT_RUN — deferred by owner for Disposable-only development. All +execution is `NOT_RUN — disabled by owner until explicit reauthorization`. The +Disposable rows below were measured with the former WAL / OFF profile, removed +on 2026-11-23. All historical timing/storage failures below retain their original mechanisms, profiles, identities and verdicts. Removal of allocation is not an optimization claim or a pass of the old strict-allocation gate. diff --git a/docs/general/interface-report-2.0.0.md b/docs/general/interface-report-2.0.0.md index 5bbc5940e0..778363deee 100644 --- a/docs/general/interface-report-2.0.0.md +++ b/docs/general/interface-report-2.0.0.md @@ -46,7 +46,7 @@ what was run for this report. | Capability | Status | Evidence in the repository | Run here | | --- | --- | --- | --- | | One call table: 61 calls in nine families, generated into Node, Python (sync and `aio`) and the command | implemented | [coverage.md](../architecture/api/calls/coverage.md) (generated matrix, `gen-coverage.mjs --check`), [table.md](../architecture/api/calls/README.md) | `gen-coverage.mjs --check` exit 0; `node --test test/coverage.mjs test/contract.mjs`: 14 tests, 13 pass, 0 fail, 1 skipped (the `Unknown`/`Unresolved` case, NOT RUN) | -| Same answers and refusals in all front ends (110 steps, fresh Disposable homes) | implemented | [coverage.md: what is checked](../architecture/api/calls/coverage.md#what-is-checked-across-the-front-ends) | the run above | +| Same answers and refusals in all front ends (110 steps, fresh temporary homes) | implemented | [coverage.md: what is checked](../architecture/api/calls/coverage.md#what-is-checked-across-the-front-ends) | the run above | | Mountless file and history work (write, read, list, edit, fork, diff, merge, `commit.list`) | implemented | [examples](../versioned/2.0.0/examples/README.md), [calls](../versioned/2.0.0/calls.md) | the four example flows from installed artifacts, all exit 0 | | Installed from artifacts outside the checkout | implemented (Linux x64 only) | [artifact-qualification-2.0.0.md](artifact-qualification-2.0.0.md), [api/README.md](../../api/README.md#package-and-install) | tarball, wheel and the lone binary installed and used | | Node package `layerfs`: ES module, Node 22, MIT, typings | changed (was `@layerfs/agent`) | [node.md](../architecture/api/front-ends/bindings.md#layerfs-node) | installed from the tarball | @@ -90,7 +90,7 @@ reason and a pointer for every row, is the | Progress and events | event streams, job registry, trace feed | `on_progress` on five calls | yes | | Settings | the 1.1.0 platform settings | `LAYERFS_HOME` and records; a 1.1.0 environment is not imported | yes | | Homes | 1.1.0 layout | not converted: refused with the fix `mv .old && layerfs home init` | yes | -| Store profile | Disposable | Disposable; Durable disabled | no | +| Store profile | Disposable (`synchronous=OFF`) | Normal (`synchronous=NORMAL`), the only SQLite profile; Durable disabled | no | | Attempts | one attempt, no replay | one attempt, no replay | no | | MCP | `@layerfs/mcp` (#521) | none | yes (#521 only) | | Plugins in `plugins/` | `@layerfs/agent` and others | not migrated | yes | diff --git a/docs/general/npm-release.md b/docs/general/npm-release.md index 1a2788ba18..cf1cdc6548 100644 --- a/docs/general/npm-release.md +++ b/docs/general/npm-release.md @@ -229,7 +229,8 @@ before relying on the window. - macOS, Windows, Linux arm64 and musl: no prebuilds; npm refuses them. - Linux x64 with glibc older than 2.39: installs, then the addon fails to load; npm can check the libc family but not its version. -- Durable Stores: disabled by the owner; only Disposable/WAL runs. +- Durable Stores: disabled by the owner; a sqlite Store opens with WAL and + `synchronous=NORMAL` (no power-loss guarantee is claimed yet). - TLS: not in the default build; an `https://` remote is refused `Unsupported`. It needs `--features tls` at build time. PostgreSQL Stores are always built in. diff --git a/docs/general/optimization-handbook.md b/docs/general/optimization-handbook.md index 7d911d0b78..f9ef7c82ec 100644 --- a/docs/general/optimization-handbook.md +++ b/docs/general/optimization-handbook.md @@ -67,8 +67,9 @@ situations. - **Stop and write a proposal** for anything that changes an interface between crates, the canonical format, a persistence profile, the negotiated FUSE profile, a public contract or a threshold. Those belong to the owner. -- **Global Store profile is Disposable / WAL / synchronous=OFF only.** Durable - is `NOT_RUN — disabled by owner until explicit reauthorization`. +- **Global Store profile is Normal / WAL / synchronous=NORMAL** (owner, + 2026-11-17), the only SQLite Store profile; Disposable / WAL / OFF was + removed (owner, 2026-11-23). Durable is `NOT_RUN — disabled by owner until explicit reauthorization`. ## 3. Instruments that already exist diff --git a/docs/general/parallel-worktrees.md b/docs/general/parallel-worktrees.md index 6ab4c9e012..d1ec4f0920 100644 --- a/docs/general/parallel-worktrees.md +++ b/docs/general/parallel-worktrees.md @@ -148,7 +148,7 @@ build inside a test. From `api`, `npm run build:isolated -- ...` and Each run receives its own named Store volume, private SDK home, unique container prefix, trace and retained output directory. The SDK process opens the same local -Linux volume its daemons use. The native SDK selects Disposable explicitly; +Linux volume its daemons use. The native SDK selects Normal explicitly; Durable remains disabled. Several daemons created by one test intentionally share that run's Store. Other runs have different volumes. No fixed host port is chosen by this launcher; SDK daemon endpoint allocation keeps its existing behavior. diff --git a/docs/general/sdk.md b/docs/general/sdk.md index 0dbd46a936..6f9bde05f8 100644 --- a/docs/general/sdk.md +++ b/docs/general/sdk.md @@ -64,7 +64,7 @@ output. It retains the original eleven-field InitRequest and caller timer: sourc Store configuration, daemon locator, storage policy, catalog authority, stack and Branch identities/names, inode scope seed and explicit Init deadline. This refactor does not select new defaults or change the supported Namespace Init profile. -Every permitted new Store explicitly selects Disposable/WAL/synchronous=OFF. +Every new Store explicitly selects the Normal profile (WAL, `synchronous=NORMAL`). Init publishes its original initial Layer and Branch, seals the sole Store, and returns a closed file and the actual original acknowledgements. diff --git a/docs/general/workspace-filesystem-view.md b/docs/general/workspace-filesystem-view.md index 3857d99227..5b0d24cc29 100644 --- a/docs/general/workspace-filesystem-view.md +++ b/docs/general/workspace-filesystem-view.md @@ -181,8 +181,9 @@ directory. See the database path. Global means the committed Store shared by the relevant Workspaces, not a mandatory universal database for every project on the host. -The host Store's selected Durable/Disposable profile and the daemon's -disposable overlay profile are separate contracts. The cache and overlay do not +The host Store's Normal profile (Durable is `NOT_RUN — disabled by owner until +explicit reauthorization`) and the daemon's disposable overlay profile are +separate contracts. The cache and overlay do not inherit a durability guarantee merely because the global Store uses Durable. ## 4. What lazy FUSE access means diff --git a/docs/policy/code-review.md b/docs/policy/code-review.md index 2c59663bde..ccd662a25b 100644 --- a/docs/policy/code-review.md +++ b/docs/policy/code-review.md @@ -13,7 +13,7 @@ repeat them: | Rule | Owner | | --- | --- | | Measurement: one sample, declared cache state, speed and storage, 5 ms floor | [measurement workflow](../general/agent-measurement-policy.md), [benchmark rules](../general/benchmark_rules.md) | -| One attempted operation, no retries; Disposable only, Durable `NOT_RUN` | root [`AGENTS.md`](../../AGENTS.md) §Active persistence profile and §4; [engine guide](../../engine/AGENTS.md#failure-persistence-and-dependencies) | +| One attempted operation, no retries; SQLite Stores Normal only, Durable `NOT_RUN` | root [`AGENTS.md`](../../AGENTS.md) §Active persistence profile and §4; [engine guide](../../engine/AGENTS.md#failure-persistence-and-dependencies) | | Tests built with `--no-run` first, then each run under a 120-second wall timeout | root `AGENTS.md` §4 | | Production LOC in every commit | root `AGENTS.md` §Production LOC comparison | | 999/200-line ceilings, no tests in `src/`, unsafe allowlist | [engine guide](../../engine/AGENTS.md#production-file-size-and-responsibility) | @@ -152,7 +152,7 @@ whatever the reviewer runs again. | Performance: speed **and** storage under the measurement workflow, or a count-driven diagnostic | C: `perf` set | C: `perf` set | — | — | | Compatibility (below) | C: `risk:format` | C: `risk:format`, `risk:wire` | C: same | — | | `Docs:` topics updated, or `Docs: no architecture impact ()` | R | R | R | R | -| `Durable: NOT_RUN — disabled by owner until explicit reauthorization`; new Stores select Disposable explicitly | C: `risk:store` | C: `risk:store` | C: `risk:store` | — | +| `Durable: NOT_RUN — disabled by owner until explicit reauthorization`; every Store selects Normal explicitly | C: `risk:store` | C: `risk:store` | C: `risk:store` | — | | A test that protected data survives | C: `risk:delete` | C: `risk:delete` | C: `risk:delete` | C: `risk:delete` | | Lock order and hold described; nothing in the publication lane grows with tree, history or Branch count | C: locks or lane changed | C: same | C: same | — | | Deleted tests listed, with surviving behaviour covered again | C | C | C | C | diff --git a/docs/versioned/2.0.0/README.md b/docs/versioned/2.0.0/README.md index f0d8d07d11..66595a9db7 100644 --- a/docs/versioned/2.0.0/README.md +++ b/docs/versioned/2.0.0/README.md @@ -115,7 +115,8 @@ each old name): The Store profile changed: every sqlite Store is opened with WAL and `synchronous=NORMAL` (owner, 2026-11-17, ahead of its safety gate, so no power-loss guarantee is -claimed); its record's profile label stays `disposable` (1.1.0 used +claimed); its record's profile label is `normal`, and a record written +earlier that says `disposable` reads as `normal` (1.1.0 used `synchronous=OFF`). Durable execution is `NOT_RUN — disabled by owner until explicit reauthorization`. Every call is one attempt: there is no retry, busy handler or replay. diff --git a/docs/versioned/2.0.0/calls.md b/docs/versioned/2.0.0/calls.md index 4da50f2c66..8941ecc0a7 100644 --- a/docs/versioned/2.0.0/calls.md +++ b/docs/versioned/2.0.0/calls.md @@ -1479,7 +1479,7 @@ $ layerfs store list $ layerfs store get shop {"engine":"sqlite","state":"ready","machine":"native"} $ layerfs store get shop --with live --detail -{"engine":"sqlite","state":"ready","machine":"native","auth":null,"connections":null,"projects":[],"projects_count":null,"backups":[],"op":null,"blocked_by":null,"reason":null,"fix":null,"observed_at":"2026-11-18T15:35:10Z","store":"shop","profile":"disposable","synchronous_commit":null,"sqlite_version":"3.53.2","created_at":"2026-11-18T15:35:10Z","last_transfer":null,"live":{"holders":[],"phases":null,"behind":[],"server_version":null,"latency_ms":null}} +{"engine":"sqlite","state":"ready","machine":"native","auth":null,"connections":null,"projects":[],"projects_count":null,"backups":[],"op":null,"blocked_by":null,"reason":null,"fix":null,"observed_at":"2026-11-18T15:35:10Z","store":"shop","profile":"normal","synchronous_commit":null,"sqlite_version":"3.53.2","created_at":"2026-11-18T15:35:10Z","last_transfer":null,"live":{"holders":[],"phases":null,"behind":[],"server_version":null,"latency_ms":null}} $ layerfs store list --with stats {"items":[{"store":"shop","engine":"sqlite","machine":"native","size":270336}]} $ layerfs store compact shop diff --git a/docs/versioned/2.0.0/examples/README.md b/docs/versioned/2.0.0/examples/README.md index 54ade7dd2e..0f69291e8a 100644 --- a/docs/versioned/2.0.0/examples/README.md +++ b/docs/versioned/2.0.0/examples/README.md @@ -17,7 +17,7 @@ was run too, in Node and Python (the shell run is in | [`python_sync_flow.py`](python_sync_flow.py) | Python, synchronous | | [`python_async_flow.py`](python_async_flow.py) | Python, `layerfs.aio` | -Every file makes its own Disposable home and project folder in a temporary +Every file makes its own temporary home and project folder in a temporary directory and removes them. On Linux the temporary directory must be on a filesystem with SQLite locks (ext4, xfs, btrfs; set `TMPDIR` if `/tmp` is not). diff --git a/docs/versioned/2.0.0/home.md b/docs/versioned/2.0.0/home.md index a1671644a0..7bb22ad51d 100644 --- a/docs/versioned/2.0.0/home.md +++ b/docs/versioned/2.0.0/home.md @@ -287,7 +287,7 @@ The first call on an empty or missing folder creates it with ```console $ export LAYERFS_HOME=/tmp/lfs-new $ layerfs store create shop -{"name":"shop","kind":"sqlite","machine":"native","profile":"disposable",…} +{"name":"shop","kind":"sqlite","machine":"native","profile":"normal",…} $ cat /tmp/lfs-new/layerfs.json {"layout":3,"id":"2f51a567b6f153b6e914393cab0904b6"} ``` diff --git a/docs/versioned/2.0.0/machines-and-stores.md b/docs/versioned/2.0.0/machines-and-stores.md index be2321d229..7a8c7cd2d4 100644 --- a/docs/versioned/2.0.0/machines-and-stores.md +++ b/docs/versioned/2.0.0/machines-and-stores.md @@ -298,7 +298,7 @@ A sqlite Store is one file on one machine at a time. A postgresql Store is one database. There is no conversion between the two kinds (D2). Every sqlite Store is opened with WAL and `synchronous=NORMAL` (owner, 2026-11-17, ahead of its safety gate: no power-loss guarantee is claimed); its record's -profile label stays `disposable`. A PostgreSQL Store's write setting is +profile label is `normal` (a record that says `disposable` reads as `normal`). A PostgreSQL Store's write setting is `synchronous_commit`. ### sqlite Stores diff --git a/docs/versioned/2.0.0/migration.md b/docs/versioned/2.0.0/migration.md index 1976941d3c..971e1a1b1e 100644 --- a/docs/versioned/2.0.0/migration.md +++ b/docs/versioned/2.0.0/migration.md @@ -491,7 +491,7 @@ A Workspace is a mounted side Branch where ordinary commands run. The route is | a single-project MCP session that unmounted at end of input or on a signal (#521) | nothing commits or unmounts for you | **Removed.** `workspace.unmount` is `Dirty` while changes are uncommitted, unless `discard`; `sandbox.remove` is `InUse` while a Workspace is mounted, unless `force` | | `mount` of `main` | refused `InvalidInput`: fork a Branch from it | **Changed** | | `commit` | one Commit; merges first when the Branch moved since the mount, `force` publishes over a moved head; a conflict writes markers and commits nothing (`Conflict`) | unchanged in meaning | -| the Store profile | WAL with `synchronous=NORMAL` (the record's label stays `disposable`); Durable is disabled by the owner | **Changed** from 1.1.0's `synchronous=OFF` (owner, 2026-11-17); no power-loss guarantee is claimed yet | +| the Store profile | WAL with `synchronous=NORMAL`, the only SQLite profile (record label `normal`; a record that says `disposable` reads as `normal` and is never rewritten); Durable is disabled by the owner | **Changed** from 1.1.0's `synchronous=OFF` (owner, 2026-11-17; OFF removed 2026-11-23); no power-loss guarantee is claimed yet | Run for this page on macOS `native` with a daemon of the same build, in the shell, Node and Python ([quickstart](quickstart.md#4-a-sandbox-a-workspace-and-a-commit), diff --git a/engine/AGENTS.md b/engine/AGENTS.md index 89ddb82dfe..0a28a10ec0 100644 --- a/engine/AGENTS.md +++ b/engine/AGENTS.md @@ -228,11 +228,12 @@ is the working procedure. A docs-only change needs no campaign. uncertain custody: no resend, rollback, deletion or success claim from an unfenced read. An unsupported required platform or capability fails explicitly, never as a silent no-op or fallback. -- **Product paths open SQLite Stores Normal/WAL/NORMAL**, on macOS and Linux +- **Every SQLite Store opens Normal/WAL/NORMAL**, on macOS and Linux, tests + and diagnostics included ([profile](../AGENTS.md#active-persistence-profile--owner-direction-2026-11-17)); - tests may still select Disposable/WAL/OFF. Select a profile explicitly, - never by default argument. Both claim process-crash survival only until - Normal's safety gate is run. Open verifies WAL and never converts an existing + the Disposable/WAL/OFF profile was removed (owner, 2026-11-23). Select the + profile explicitly, never by default argument. Claim process-crash survival + only until Normal's safety gate is run. Open verifies WAL and never converts an existing Store; select profile and layout before open. WAL stays on throughout Init and Commit (owner supersession 2026-10-07): no private MEMORY import or journal promotion. Checkpointing is described on the diff --git a/engine/crates/layerfs-bridge/src/provision.rs b/engine/crates/layerfs-bridge/src/provision.rs index 46b6ddf7ba..6d8bd809e0 100644 --- a/engine/crates/layerfs-bridge/src/provision.rs +++ b/engine/crates/layerfs-bridge/src/provision.rs @@ -15,10 +15,9 @@ pub enum ProviderKind { pub enum StoreProfile { /// WAL with FULL synchronization. Durable, - /// The non-durable WAL Store. Its wire byte and name predate the Normal - /// profile: every product opener now opens such a Store with NORMAL - /// synchronization (owner, 2026-11-17); only a test selects OFF. - Disposable, + /// The WAL Store opened with NORMAL synchronization (owner, 2026-11-17). + /// Its wire byte (2) is the one the former `Disposable` label used. + Normal, } /// Bounded control metadata. File bytes are streamed separately without a size cap. #[derive(Clone, Eq, PartialEq)] diff --git a/engine/crates/layerfs-bridge/src/provision_wire.rs b/engine/crates/layerfs-bridge/src/provision_wire.rs index 54beea9f11..fec0a69ed2 100644 --- a/engine/crates/layerfs-bridge/src/provision_wire.rs +++ b/engine/crates/layerfs-bridge/src/provision_wire.rs @@ -16,7 +16,7 @@ impl StoreManifest { })?; out.byte(match self.profile { StoreProfile::Durable => 1, - StoreProfile::Disposable => 2, + StoreProfile::Normal => 2, })?; out.blob(self.locator.as_bytes())?; out.blob(&self.binding)?; @@ -39,7 +39,7 @@ impl StoreManifest { }; let profile = match input.byte()? { 1 => StoreProfile::Durable, - 2 => StoreProfile::Disposable, + 2 => StoreProfile::Normal, _ => return Err(ControlError("Store profile")), }; let locator = input.text(4096)?; diff --git a/engine/crates/layerfs-bridge/src/store.rs b/engine/crates/layerfs-bridge/src/store.rs index 7440924d19..934d65032a 100644 --- a/engine/crates/layerfs-bridge/src/store.rs +++ b/engine/crates/layerfs-bridge/src/store.rs @@ -74,8 +74,8 @@ impl DaemonStore { } if let Some(m) = install { m.check().map_err(ControlError)?; - if &m.locator != locator || m.profile != StoreProfile::Disposable { - return Err(ControlError("explicit existing Disposable Store")); + if &m.locator != locator || m.profile != StoreProfile::Normal { + return Err(ControlError("explicit existing Normal Store")); } } Ok(()) diff --git a/engine/crates/layerfs-bridge/tests/daemon_setup_records.rs b/engine/crates/layerfs-bridge/tests/daemon_setup_records.rs index 55aced0beb..feda16662e 100644 --- a/engine/crates/layerfs-bridge/tests/daemon_setup_records.rs +++ b/engine/crates/layerfs-bridge/tests/daemon_setup_records.rs @@ -7,7 +7,7 @@ fn manifest() -> StoreManifest { StoreManifest { provider: ProviderKind::Sqlite, locator: "/layerfs-store/global/store.sqlite".into(), - profile: StoreProfile::Disposable, + profile: StoreProfile::Normal, binding: vec![7; 32], cursor_key: [9; 32], stack: [0; 17], diff --git a/engine/crates/layerfs-bridge/tests/install_records.rs b/engine/crates/layerfs-bridge/tests/install_records.rs index 38300f601c..4a5a19c7c1 100644 --- a/engine/crates/layerfs-bridge/tests/install_records.rs +++ b/engine/crates/layerfs-bridge/tests/install_records.rs @@ -7,7 +7,7 @@ fn manifest() -> StoreManifest { StoreManifest { provider: ProviderKind::Sqlite, locator: "/store/store.sqlite".into(), - profile: StoreProfile::Disposable, + profile: StoreProfile::Normal, binding: b"install-records".to_vec(), cursor_key: [7; 32], stack: [0x31; 17], diff --git a/engine/crates/layerfs-daemon/examples/resource_growth.rs b/engine/crates/layerfs-daemon/examples/resource_growth.rs index 1b9770f852..035b400e19 100644 --- a/engine/crates/layerfs-daemon/examples/resource_growth.rs +++ b/engine/crates/layerfs-daemon/examples/resource_growth.rs @@ -53,7 +53,7 @@ fn main() { .create_new(true) .open(&args[2]) .unwrap(); - writeln!(out,"{{\"schema\":\"pre-s8-growth-start-v1\",\"mode\":\"{mode}\",\"files\":{names},\"amount\":{amount},\"profile\":\"sqlite-wal-off-v2\",\"allocation_scope\":\"all-process Rust requested live bytes; excludes C, slack, stack and kernel\"}}").unwrap(); + writeln!(out,"{{\"schema\":\"pre-s8-growth-start-v1\",\"mode\":\"{mode}\",\"files\":{names},\"amount\":{amount},\"profile\":\"sqlite-wal-normal-v2\",\"allocation_scope\":\"all-process Rust requested live bytes; excludes C, slack, stack and kernel\"}}").unwrap(); observe::phase("clone"); let f = fixture::Fixture::prepared_wide(Path::new(&args[3])); println!("STORE_ARTIFACT_DIRECTORY {}", f.directory.display()); diff --git a/engine/crates/layerfs-daemon/examples/resource_prepare.rs b/engine/crates/layerfs-daemon/examples/resource_prepare.rs index bf5d34aada..eba5c554a9 100644 --- a/engine/crates/layerfs-daemon/examples/resource_prepare.rs +++ b/engine/crates/layerfs-daemon/examples/resource_prepare.rs @@ -38,7 +38,7 @@ fn main() { InitRequest { source: source.clone(), store: PersistenceConfig::sqlite(folder.join("prepared.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), locator: folder.join("installed.sqlite").to_str().unwrap().into(), policy: StoragePolicy::frozen_default(), catalog: HistoryCatalogConfig { diff --git a/engine/crates/layerfs-daemon/src/install.rs b/engine/crates/layerfs-daemon/src/install.rs index b6984b9616..a406cac262 100644 --- a/engine/crates/layerfs-daemon/src/install.rs +++ b/engine/crates/layerfs-daemon/src/install.rs @@ -63,9 +63,9 @@ fn install_manifest( let result = (|| { let mut manifest = manifest?; retained.manifest = Some(manifest.clone()); - if manifest.profile != StoreProfile::Disposable { + if manifest.profile != StoreProfile::Normal { return Err(InstallError::Protocol(ControlError( - "explicit Disposable Store profile required", + "explicit Normal Store profile required", ))); } if Path::new(&manifest.locator) != destination || manifest.daemon_sqlite.is_some() { @@ -135,7 +135,7 @@ fn install_manifest( let profile = match manifest.profile { StoreProfile::Durable => SqlitePersistenceProfile::Durable, // The manifest's non-durable label; its connections open Normal. - StoreProfile::Disposable => SqlitePersistenceProfile::Normal, + StoreProfile::Normal => SqlitePersistenceProfile::Normal, }; retained.opened = Some( open_store_observed( diff --git a/engine/crates/layerfs-daemon/tests/forced_producers.rs b/engine/crates/layerfs-daemon/tests/forced_producers.rs index 3e351c3c6b..e6a419de85 100644 --- a/engine/crates/layerfs-daemon/tests/forced_producers.rs +++ b/engine/crates/layerfs-daemon/tests/forced_producers.rs @@ -231,7 +231,7 @@ fn row(directory: &str) -> Option { .map(str::to_owned) } -/// One installed Disposable Store, opened once and kept open, and one real +/// One installed Normal Store, opened once and kept open, and one real /// kernel serving assembly over it: `Harness::new`, as `rig::Rig` uses it. struct Fx { fixture: installed::Fixture, @@ -384,7 +384,7 @@ impl Fx { owner.stop().unwrap(); } println!( - "FORCED_RIG store_opened=1 sealed=0 reopened=0 profile=Disposable clean_stop={clean} handles_after_stop={}", + "FORCED_RIG store_opened=1 sealed=0 reopened=0 profile=Normal clean_stop={clean} handles_after_stop={}", Arc::strong_count(&store) ); drop(store); diff --git a/engine/crates/layerfs-daemon/tests/fp27_reader_health.rs b/engine/crates/layerfs-daemon/tests/fp27_reader_health.rs index d12a15bf4c..0abdd3f43a 100644 --- a/engine/crates/layerfs-daemon/tests/fp27_reader_health.rs +++ b/engine/crates/layerfs-daemon/tests/fp27_reader_health.rs @@ -30,7 +30,7 @@ //! The Store is composed from the public pieces `open_store` composes, with //! no object cache, so that the test keeps each read session's provider and //! every base demand reaches it. Every call is forwarded to the real -//! provider; nothing is injected. Global Store profile: Disposable, selected +//! provider; nothing is injected. Global Store profile: Normal, selected //! explicitly by the fixture and asserted. //! //! NOT in scope here (plan section 6): a poisoned reader, a release after a @@ -139,7 +139,7 @@ fn quiet(harness: &Harness, token: WorkspaceToken) -> bool { }) } -/// One installed Disposable Store, opened once and kept open, with no object +/// One installed Normal Store, opened once and kept open, with no object /// cache, and one real kernel serving assembly over it. The test keeps the /// provider of each read session. struct Fx { @@ -165,9 +165,9 @@ impl Fx { assert!( matches!( fixture.config.sqlite_profile, - SqlitePersistenceProfile::Disposable + SqlitePersistenceProfile::Normal ), - "the global Store profile is Disposable, selected explicitly" + "the global Store profile is Normal, selected explicitly" ); let config = || fixture.config.clone(); let writer = @@ -238,7 +238,7 @@ impl Fx { } drop(readers); println!( - "FP-27 RIG store_opened=1 sealed=0 reopened=0 profile=Disposable clean_stop={clean} handles_after_stop={}", + "FP-27 RIG store_opened=1 sealed=0 reopened=0 profile=Normal clean_stop={clean} handles_after_stop={}", Arc::strong_count(&store) ); drop(store); diff --git a/engine/crates/layerfs-daemon/tests/mounted_changed_activity.rs b/engine/crates/layerfs-daemon/tests/mounted_changed_activity.rs index 442f82f82c..e6c49e9c0d 100644 --- a/engine/crates/layerfs-daemon/tests/mounted_changed_activity.rs +++ b/engine/crates/layerfs-daemon/tests/mounted_changed_activity.rs @@ -2,7 +2,7 @@ //! Workspace's changes and its activity (word, phase, start), which ride //! there rather than in the Status record so that record keeps the bytes //! other builds read (RF re-check N-A). A path no Workspace is mounted at -//! is refused. Disposable profile. +//! is refused. Normal profile. #![cfg(target_os = "linux")] #[allow(dead_code)] #[path = "support/installed_store.rs"] diff --git a/engine/crates/layerfs-daemon/tests/mounted_commit_failures.rs b/engine/crates/layerfs-daemon/tests/mounted_commit_failures.rs index 6e9dc3f323..2e4a395214 100644 --- a/engine/crates/layerfs-daemon/tests/mounted_commit_failures.rs +++ b/engine/crates/layerfs-daemon/tests/mounted_commit_failures.rs @@ -283,7 +283,7 @@ enum Kept { /// refused before effect. ResolutionRefused, } -/// One installed Disposable Store, opened once and kept open, and one real +/// One installed Normal Store, opened once and kept open, and one real /// kernel serving assembly over it: `Harness::new`, as `rig::Rig` uses it. struct Fx { fixture: installed::Fixture, @@ -339,9 +339,9 @@ impl Fx { assert!( matches!( fixture.config.sqlite_profile, - SqlitePersistenceProfile::Disposable + SqlitePersistenceProfile::Normal ), - "the global Store profile is Disposable, selected explicitly" + "the global Store profile is Normal, selected explicitly" ); let mut publishing = None; let store = match staging { @@ -450,7 +450,7 @@ impl Fx { owner.stop().unwrap(); } println!( - "F_RIG store_opened=1 sealed=0 reopened=0 profile=Disposable clean_stop={clean} handles_after_stop={}", + "F_RIG store_opened=1 sealed=0 reopened=0 profile=Normal clean_stop={clean} handles_after_stop={}", Arc::strong_count(&store) ); drop(store); diff --git a/engine/crates/layerfs-daemon/tests/mounted_failure_scope.rs b/engine/crates/layerfs-daemon/tests/mounted_failure_scope.rs index e1b0ac7250..88f1c698dc 100644 --- a/engine/crates/layerfs-daemon/tests/mounted_failure_scope.rs +++ b/engine/crates/layerfs-daemon/tests/mounted_failure_scope.rs @@ -236,7 +236,7 @@ fn cold_tree(source: &Path) { stamp_tree(source); } -/// One installed Disposable Store, opened once and kept open, and one real +/// One installed Normal Store, opened once and kept open, and one real /// kernel serving assembly over it. The test keeps the writable session, the /// provider of each read session and the counted catalog. struct Fx { @@ -256,9 +256,9 @@ impl Fx { assert!( matches!( fixture.config.sqlite_profile, - SqlitePersistenceProfile::Disposable + SqlitePersistenceProfile::Normal ), - "the global Store profile is Disposable, selected explicitly" + "the global Store profile is Normal, selected explicitly" ); let config = || fixture.config.clone(); let writer = Arc::new( @@ -357,7 +357,7 @@ impl Fx { } drop((history, readers, writer)); println!( - "P2_RIG store_opened=1 sealed=0 reopened=0 profile=Disposable clean_stop={clean} handles_after_stop={}", + "P2_RIG store_opened=1 sealed=0 reopened=0 profile=Normal clean_stop={clean} handles_after_stop={}", Arc::strong_count(&store) ); drop(store); diff --git a/engine/crates/layerfs-daemon/tests/mounted_low_water.rs b/engine/crates/layerfs-daemon/tests/mounted_low_water.rs index 464c5fec92..c846d811c2 100644 --- a/engine/crates/layerfs-daemon/tests/mounted_low_water.rs +++ b/engine/crates/layerfs-daemon/tests/mounted_low_water.rs @@ -229,7 +229,7 @@ fn engine(fx: &Fx, token: WorkspaceToken, limit: Duration) -> (bool, Option ) } -/// One installed Disposable Store, opened once and kept open, with the given +/// One installed Normal Store, opened once and kept open, with the given /// explicit serial low-water, and one real kernel serving assembly over it. /// The test keeps the writable session and the counted catalog. struct Fx { @@ -255,9 +255,9 @@ impl Fx { assert!( matches!( fixture.config.sqlite_profile, - SqlitePersistenceProfile::Disposable + SqlitePersistenceProfile::Normal ), - "the global Store profile is Disposable, selected explicitly" + "the global Store profile is Normal, selected explicitly" ); let config = || fixture.config.clone(); let writer = Arc::new( @@ -360,7 +360,7 @@ impl Fx { } drop((history, writer)); println!( - "PA_RIG store_opened=1 sealed=0 reopened=0 profile=Disposable clean_stop={clean} handles_after_stop={}", + "PA_RIG store_opened=1 sealed=0 reopened=0 profile=Normal clean_stop={clean} handles_after_stop={}", Arc::strong_count(&store) ); drop(store); diff --git a/engine/crates/layerfs-daemon/tests/mounted_sequential_read.rs b/engine/crates/layerfs-daemon/tests/mounted_sequential_read.rs index 9bc02acfd3..db2b55a184 100644 --- a/engine/crates/layerfs-daemon/tests/mounted_sequential_read.rs +++ b/engine/crates/layerfs-daemon/tests/mounted_sequential_read.rs @@ -7,7 +7,7 @@ //! `LAYERFS_TEST_POSTGRES_URL` is set. //! The line also carries the resident set when the read starts and the //! process's resident peak during it (the daemon serves in this process). -//! Disposable profile; the daemon's 64 MiB object cache. +//! Normal profile; the daemon's 64 MiB object cache. #![cfg(target_os = "linux")] #[allow(dead_code)] #[path = "support/installed_store.rs"] diff --git a/engine/crates/layerfs-daemon/tests/mounted_serial_admission.rs b/engine/crates/layerfs-daemon/tests/mounted_serial_admission.rs index 21eba2cce3..c704ee1950 100644 --- a/engine/crates/layerfs-daemon/tests/mounted_serial_admission.rs +++ b/engine/crates/layerfs-daemon/tests/mounted_serial_admission.rs @@ -122,7 +122,7 @@ fn serial_writer_hold_has_a_real_inclusive_upper_observation() { let rig = Rig::new("issue319-writer-upper"); assert_eq!( rig.fixture.config.sqlite_profile, - SqlitePersistenceProfile::Disposable + SqlitePersistenceProfile::Normal ); let handles = SqliteHandles::open_writable( rig.fixture.config.clone(), diff --git a/engine/crates/layerfs-daemon/tests/mounted_storage_reads.rs b/engine/crates/layerfs-daemon/tests/mounted_storage_reads.rs index 74bae23e1a..044cca7baa 100644 --- a/engine/crates/layerfs-daemon/tests/mounted_storage_reads.rs +++ b/engine/crates/layerfs-daemon/tests/mounted_storage_reads.rs @@ -2,7 +2,7 @@ //! Workspace's overlay database, never the base tree from the Store (#508). //! State reads call it for every mounted Workspace; walking a large base tree //! there cost minutes of Store reads per call and saturated the daemon. -//! `list_changes` still names the changed paths on request. Disposable profile. +//! `list_changes` still names the changed paths on request. Normal profile. #![cfg(target_os = "linux")] #[allow(dead_code)] #[path = "support/installed_store.rs"] diff --git a/engine/crates/layerfs-daemon/tests/r5_10_producer_profile.rs b/engine/crates/layerfs-daemon/tests/r5_10_producer_profile.rs index 9fa7d8eed2..1ab573fdff 100644 --- a/engine/crates/layerfs-daemon/tests/r5_10_producer_profile.rs +++ b/engine/crates/layerfs-daemon/tests/r5_10_producer_profile.rs @@ -1,7 +1,7 @@ //! Real kernel mounts: every product control Commit has one construction //! producer, the one Store session stays open across Commits, and that -//! writer session's own read-back profile is Disposable / WAL / -//! synchronous=OFF (row R5-10). +//! writer session's own read-back profile is Normal / WAL / +//! synchronous=NORMAL (row R5-10). //! //! The Store is composed from the same public pieces `open_store` composes, //! so that the writable `SqliteHandles` stay in the test's hands: `open_store` @@ -264,10 +264,10 @@ fn r5_10_each_mounted_commit_has_one_producer_on_the_one_open_disposable_writer_ base_tree(source); Model::host(source).1 }); - // The profile is selected explicitly, and it is Disposable. + // The profile is selected explicitly, and it is Normal. assert_eq!( fixture.config.sqlite_profile, - SqlitePersistenceProfile::Disposable + SqlitePersistenceProfile::Normal ); let config = || fixture.config.clone(); let database = fixture.config.path.clone(); @@ -278,9 +278,9 @@ fn r5_10_each_mounted_commit_has_one_producer_on_the_one_open_disposable_writer_ ); // Its own read-back: what this session read from itself when it opened. let profile = handles.profile().clone(); - assert_eq!(profile.persistence, SqlitePersistenceProfile::Disposable); + assert_eq!(profile.persistence, SqlitePersistenceProfile::Normal); assert_eq!(profile.journal_mode, "wal"); - assert_eq!(profile.synchronous, 0, "synchronous=OFF"); + assert_eq!(profile.synchronous, 1, "synchronous=NORMAL"); assert_eq!(profile.fullfsync, 0); println!( "{name} WRITER_PROFILE session=writable(SqliteHandles::open_writable) selected={:?} readback(persistence={:?} identity={} journal_mode={} synchronous={} fullfsync={} mmap_size={} busy_timeout={} sqlite={}) durable=NOT_RUN", @@ -451,7 +451,7 @@ fn r5_10_each_mounted_commit_has_one_producer_on_the_one_open_disposable_writer_ read_back.journal_mode.as_str(), read_back.synchronous ), - (SqlitePersistenceProfile::Disposable, "wal", 0) + (SqlitePersistenceProfile::Normal, "wal", 1) ); // The Commit is exact, with its predecessor as parent. @@ -495,7 +495,7 @@ fn r5_10_each_mounted_commit_has_one_producer_on_the_one_open_disposable_writer_ quiet(&harness, ready.token); harness.unmount(&ready); println!( - "{name} RESULT commits={} mounts=2 producers_per_commit=1 store=one_arc_never_dropped session=one_writable_never_sealed_or_reopened profile=Disposable/wal/synchronous=0 durable=NOT_RUN composing_calls={:?} LAYERFS_CONSTRUCTION_WORKERS=not_read_by_engine/crates/*/src", + "{name} RESULT commits={} mounts=2 producers_per_commit=1 store=one_arc_never_dropped session=one_writable_never_sealed_or_reopened profile=Normal/wal/synchronous=0 durable=NOT_RUN composing_calls={:?} LAYERFS_CONSTRUCTION_WORKERS=not_read_by_engine/crates/*/src", records.len(), composing.iter().map(|seen| seen.port).collect::>() ); diff --git a/engine/crates/layerfs-daemon/tests/shared_cache_pressure.rs b/engine/crates/layerfs-daemon/tests/shared_cache_pressure.rs index 1fe7625eb8..9ff2cd9bc5 100644 --- a/engine/crates/layerfs-daemon/tests/shared_cache_pressure.rs +++ b/engine/crates/layerfs-daemon/tests/shared_cache_pressure.rs @@ -11,7 +11,7 @@ //! Workspace scans its whole tree in a loop, the other keeps completing //! reads. //! -//! Counts only; nothing is timed. Real Disposable Store, real owner, no +//! Counts only; nothing is timed. Real Normal Store, real owner, no //! mount. Public API only; every wait is bounded. #[allow(dead_code)] #[path = "support/captured_drive.rs"] diff --git a/engine/crates/layerfs-daemon/tests/support/captured_drive.rs b/engine/crates/layerfs-daemon/tests/support/captured_drive.rs index ae1625b127..3bb3f35034 100644 --- a/engine/crates/layerfs-daemon/tests/support/captured_drive.rs +++ b/engine/crates/layerfs-daemon/tests/support/captured_drive.rs @@ -40,7 +40,7 @@ pub fn job( ) -> T { command(owner, route).unwrap_or_else(|error| panic!("{error:?}")) } -/// A sealed, installed Disposable Store whose base is the model of the kernel +/// A sealed, installed Normal Store whose base is the model of the kernel /// source it was initialized from, plus one local owner. pub struct Rig { pub f: support::Fixture, diff --git a/engine/crates/layerfs-daemon/tests/support/complete_fixture.rs b/engine/crates/layerfs-daemon/tests/support/complete_fixture.rs index 6c2deb7ee3..7e9d37b806 100644 --- a/engine/crates/layerfs-daemon/tests/support/complete_fixture.rs +++ b/engine/crates/layerfs-daemon/tests/support/complete_fixture.rs @@ -194,7 +194,7 @@ impl Fixture { InitRequest { source: source.clone(), store: PersistenceConfig::sqlite(directory.join("sealed.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), locator: destination.to_str().unwrap().into(), policy: StoragePolicy::frozen_default(), catalog: HistoryCatalogConfig { @@ -276,7 +276,7 @@ impl Fixture { .unwrap(); assert_eq!( manifest.profile, - layerfs_bridge::provision::StoreProfile::Disposable + layerfs_bridge::provision::StoreProfile::Normal ); let expected = fs::read_to_string(prepared.join("expected-metadata.txt")).unwrap(); let fields = expected.split_whitespace().collect::>(); @@ -314,7 +314,7 @@ impl Fixture { let cache_bytes = 8 * 1024 * 1024; let opened = open_store_observed( PersistenceConfig::sqlite(&database) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), &manifest.binding, manifest.cursor_key, 4, diff --git a/engine/crates/layerfs-daemon/tests/support/host_install.rs b/engine/crates/layerfs-daemon/tests/support/host_install.rs index e0af45269a..107fcafbdd 100644 --- a/engine/crates/layerfs-daemon/tests/support/host_install.rs +++ b/engine/crates/layerfs-daemon/tests/support/host_install.rs @@ -75,7 +75,7 @@ impl Fixture { InitRequest { source, store: PersistenceConfig::sqlite(directory.join("sealed.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), locator: locator .map(str::to_owned) .unwrap_or_else(|| directory.join("store.sqlite").to_str().unwrap().into()), @@ -250,7 +250,7 @@ pub fn commits( use layerfs_history::HistoryCatalog; let handles = layerfs_persistence::SqliteHandles::open_read_only( PersistenceConfig::sqlite(&manifest.locator) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), &manifest.binding, manifest.cursor_key, ) diff --git a/engine/crates/layerfs-daemon/tests/support/installed_store.rs b/engine/crates/layerfs-daemon/tests/support/installed_store.rs index 166b02dc24..8a65bc368e 100644 --- a/engine/crates/layerfs-daemon/tests/support/installed_store.rs +++ b/engine/crates/layerfs-daemon/tests/support/installed_store.rs @@ -61,7 +61,7 @@ impl Fixture { let count = build(&source); let sealed = store_directory.join("sealed.sqlite"); let config = PersistenceConfig::sqlite(&sealed) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables); let handles = SqliteHandles::create( config.clone(), diff --git a/engine/crates/layerfs-daemon/tests/support/long_branch_rig.rs b/engine/crates/layerfs-daemon/tests/support/long_branch_rig.rs index 8148127ae6..1fada1235c 100644 --- a/engine/crates/layerfs-daemon/tests/support/long_branch_rig.rs +++ b/engine/crates/layerfs-daemon/tests/support/long_branch_rig.rs @@ -1,6 +1,6 @@ //! A branch with many earlier Commits, kept as a Store file that later test //! invocations extend and measure. The history is made by the product: every -//! Commit is `BoundWorkspace::commit_captured` over a real Disposable Store +//! Commit is `BoundWorkspace::commit_captured` over a real Normal Store //! and the real local owner, from a Workspace that is closed and replaced //! after `SESSION` Commits, without a mount. Nothing here reads a benchmark //! size or path; the shapes are this file's own. @@ -221,7 +221,7 @@ pub fn copy_store(from: &Path, to: &Path) { } pub fn config(store: &Path) -> PersistenceConfig { PersistenceConfig::sqlite(store) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables) } diff --git a/engine/crates/layerfs-daemon/tests/support/mounted_commit.rs b/engine/crates/layerfs-daemon/tests/support/mounted_commit.rs index 61f0cc4682..386227beda 100644 --- a/engine/crates/layerfs-daemon/tests/support/mounted_commit.rs +++ b/engine/crates/layerfs-daemon/tests/support/mounted_commit.rs @@ -1,4 +1,4 @@ -//! Rig for mounted live Commit proofs: one sealed Disposable Store built from a +//! Rig for mounted live Commit proofs: one sealed Normal Store built from a //! kernel base tree, opened once and kept open, one real kernel serving //! assembly over it, commands launched outside the daemon, the product control //! Commit and three independent readings of a tree (ordinary syscalls, the diff --git a/engine/crates/layerfs-daemon/tests/support/shared_cache_rig.rs b/engine/crates/layerfs-daemon/tests/support/shared_cache_rig.rs index a606e468d3..52eb168fa9 100644 --- a/engine/crates/layerfs-daemon/tests/support/shared_cache_rig.rs +++ b/engine/crates/layerfs-daemon/tests/support/shared_cache_rig.rs @@ -1,5 +1,5 @@ //! Several Workspaces of one daemon on branches forked from one Layer, over -//! a real sealed Disposable Store and the real local owner, without a mount. +//! a real sealed Normal Store and the real local owner, without a mount. //! A daemon here is one opened Store with its one shared canonical cache and //! one owner; stopping it and opening another gives an empty cache over the //! same Store file. Every wait is bounded. diff --git a/engine/crates/layerfs-nfs/tests/support/rig.rs b/engine/crates/layerfs-nfs/tests/support/rig.rs index a5a8cbc801..6b1a282898 100644 --- a/engine/crates/layerfs-nfs/tests/support/rig.rs +++ b/engine/crates/layerfs-nfs/tests/support/rig.rs @@ -55,7 +55,7 @@ impl Rig { std::fs::create_dir_all(directory).unwrap(); let sealed = directory.join("sealed.sqlite"); let config = PersistenceConfig::sqlite(&sealed) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables); let handles = SqliteHandles::create( config.clone(), diff --git a/engine/crates/layerfs-persistence/examples/gc_bench.rs b/engine/crates/layerfs-persistence/examples/gc_bench.rs index f0d1c46710..bda6e986da 100644 --- a/engine/crates/layerfs-persistence/examples/gc_bench.rs +++ b/engine/crates/layerfs-persistence/examples/gc_bench.rs @@ -35,7 +35,7 @@ //! the caller launched the harness in. A refused method is recorded as warm, //! never as cold. `--keep` keeps the temporary Store. //! -//! Only the Disposable (WAL/synchronous=OFF) profile is measured; owner +//! Only the Normal (WAL/synchronous=NORMAL) profile is measured; owner //! direction 2026-10-07 disabled Durable execution indefinitely. #[path = "gc_bench/gc_fixture.rs"] @@ -1584,7 +1584,7 @@ fn run() -> Result<()> { out, "{{\n \"schema\": \"{SCHEMA}\",\n \"generatedAtUnixMs\": {generated},\n \ \"notRun\": false,\n \"scale\": \"{}\",\n \"ownerOnly\": {},\n \ - \"runsPerArm\": {},\n \"profile\": \"SqlitePersistenceProfile::Disposable (WAL/OFF)\",\n \ + \"runsPerArm\": {},\n \"profile\": \"SqlitePersistenceProfile::Normal (WAL/NORMAL)\",\n \ \"host\": {},\n \"cache\": {{\n \"requested\": {},\n \"method\": \"{}\",\n \ \"applied\": {},\n \"refused\": {},\n \"state\": {},\n \"note\": {}\n }},\n \ \"fixture\": {{\n \"groups\": {},\n \"stacks\": {},\n \ diff --git a/engine/crates/layerfs-persistence/examples/gc_bench/gc_fixture.rs b/engine/crates/layerfs-persistence/examples/gc_bench/gc_fixture.rs index eca10221ab..78a4cc99d9 100644 --- a/engine/crates/layerfs-persistence/examples/gc_bench/gc_fixture.rs +++ b/engine/crates/layerfs-persistence/examples/gc_bench/gc_fixture.rs @@ -31,7 +31,7 @@ //! pack` stays the exact pack-byte population and the section 11 dead-byte //! bound/refined fields can be checked against it. //! -//! Only the Disposable (WAL/synchronous=OFF) profile is built and measured: +//! Only the Normal (WAL/synchronous=NORMAL) profile is built and measured: //! owner direction 2026-10-07 disabled Durable execution indefinitely. use layerfs_content::filesystem::attributes::PortableMetadata; @@ -243,7 +243,7 @@ pub struct BuildReport { pub fn create_store(path: &Path) -> SqliteHandles { SqliteHandles::create( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: BINDING.to_vec(), @@ -257,7 +257,7 @@ pub fn create_store(path: &Path) -> SqliteHandles { pub fn reopen(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, CURSOR_KEY, ) diff --git a/engine/crates/layerfs-persistence/examples/gc_profile.rs b/engine/crates/layerfs-persistence/examples/gc_profile.rs index 60645476b4..b35312ff3f 100644 --- a/engine/crates/layerfs-persistence/examples/gc_profile.rs +++ b/engine/crates/layerfs-persistence/examples/gc_profile.rs @@ -49,7 +49,7 @@ fn open(store: &Path) -> SqliteHandles { .expect("GC_CURSOR_HEX is 32 bytes"); SqliteHandles::open_writable( PersistenceConfig::sqlite(store.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), &unhex("GC_BINDING_HEX", &binding), cursor, ) diff --git a/engine/crates/layerfs-persistence/examples/issue327_counters_v2.rs b/engine/crates/layerfs-persistence/examples/issue327_counters_v2.rs index bad4454f57..827ca6305e 100644 --- a/engine/crates/layerfs-persistence/examples/issue327_counters_v2.rs +++ b/engine/crates/layerfs-persistence/examples/issue327_counters_v2.rs @@ -19,7 +19,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn fixture() -> Vec> { let mut seed = 327u64; diff --git a/engine/crates/layerfs-persistence/examples/issue327_counters_v3.rs b/engine/crates/layerfs-persistence/examples/issue327_counters_v3.rs index ffd1e9ae4e..237c97bc10 100644 --- a/engine/crates/layerfs-persistence/examples/issue327_counters_v3.rs +++ b/engine/crates/layerfs-persistence/examples/issue327_counters_v3.rs @@ -19,7 +19,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn fixture() -> Vec> { let mut seed = 327u64; diff --git a/engine/crates/layerfs-persistence/examples/issue327_counters_v4.rs b/engine/crates/layerfs-persistence/examples/issue327_counters_v4.rs index 738c667648..2245058b5a 100644 --- a/engine/crates/layerfs-persistence/examples/issue327_counters_v4.rs +++ b/engine/crates/layerfs-persistence/examples/issue327_counters_v4.rs @@ -19,7 +19,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn fixture() -> Vec> { let mut seed = 327u64; diff --git a/engine/crates/layerfs-persistence/examples/issue327_counters_v5.rs b/engine/crates/layerfs-persistence/examples/issue327_counters_v5.rs index f340b446c5..8434a0296f 100644 --- a/engine/crates/layerfs-persistence/examples/issue327_counters_v5.rs +++ b/engine/crates/layerfs-persistence/examples/issue327_counters_v5.rs @@ -19,7 +19,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn fixture() -> Vec> { let mut seed = 327u64; diff --git a/engine/crates/layerfs-persistence/examples/issue327_readonly_diagnostic.rs b/engine/crates/layerfs-persistence/examples/issue327_readonly_diagnostic.rs index ab86bce136..4a72c80847 100644 --- a/engine/crates/layerfs-persistence/examples/issue327_readonly_diagnostic.rs +++ b/engine/crates/layerfs-persistence/examples/issue327_readonly_diagnostic.rs @@ -7,7 +7,7 @@ fn main() { ) .unwrap(); for sql in [ - "PRAGMA synchronous=OFF", + "PRAGMA synchronous=NORMAL", "PRAGMA fullfsync=0", "PRAGMA journal_mode", "PRAGMA user_version", diff --git a/engine/crates/layerfs-persistence/examples/metadata_allocation_probe.rs b/engine/crates/layerfs-persistence/examples/metadata_allocation_probe.rs index 3574c5a963..cad36f14fd 100644 --- a/engine/crates/layerfs-persistence/examples/metadata_allocation_probe.rs +++ b/engine/crates/layerfs-persistence/examples/metadata_allocation_probe.rs @@ -85,7 +85,7 @@ fn main() -> Result<(), Box> { drop(query); drop(db); let h = SqliteHandles::open_read_only( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), b"layerfs/issue286/retained-history/v3", [0x28; 32], )?; diff --git a/engine/crates/layerfs-persistence/src/backend/sqlite/exclusion.rs b/engine/crates/layerfs-persistence/src/backend/sqlite/exclusion.rs index 9e198e56d1..403908e47a 100644 --- a/engine/crates/layerfs-persistence/src/backend/sqlite/exclusion.rs +++ b/engine/crates/layerfs-persistence/src/backend/sqlite/exclusion.rs @@ -18,7 +18,7 @@ const MAX_ENTRIES: usize = 100_000; /// True when a process other than this one already holds the Store at `store` /// open, through its main file or a sidecar. The compaction's own connections -/// (its session and, on a Disposable profile, the checkpoint thread) are in +/// (its session and, on a Normal profile, the checkpoint thread) are in /// this process and are not evidence; a caller that keeps another in-process /// connection open is still caught by the seal's sidecar fence. #[cfg(target_os = "linux")] diff --git a/engine/crates/layerfs-persistence/src/backend/sqlite/session/background.rs b/engine/crates/layerfs-persistence/src/backend/sqlite/session/background.rs index 3866ef906d..6f1cdbc999 100644 --- a/engine/crates/layerfs-persistence/src/backend/sqlite/session/background.rs +++ b/engine/crates/layerfs-persistence/src/backend/sqlite/session/background.rs @@ -1,4 +1,4 @@ -//! A Disposable Store's WAL checkpoints, off the commit path (owner +//! A Normal Store's WAL checkpoints, off the commit path (owner //! approval, 2026-11-07). The writing connection runs with //! `wal_autocheckpoint=0`, so a COMMIT only appends its frames to the log. //! When a write leaves the log longer than `journal_size_limit` (about the diff --git a/engine/crates/layerfs-persistence/src/backend/sqlite/session/connection.rs b/engine/crates/layerfs-persistence/src/backend/sqlite/session/connection.rs index dcffe6025f..e5dd259e22 100644 --- a/engine/crates/layerfs-persistence/src/backend/sqlite/session/connection.rs +++ b/engine/crates/layerfs-persistence/src/backend/sqlite/session/connection.rs @@ -32,7 +32,7 @@ pub struct ConnectionProfile { pub compile_options: Vec, /// Selected journal mode, checked on every relevant connection. pub journal_mode: String, - /// FULL is 2; OFF is 0 for Disposable. + /// FULL is 2 (Durable); NORMAL is 1 (Normal). pub synchronous: i64, /// Foreign keys must be enabled. pub foreign_keys: i64, @@ -157,7 +157,7 @@ pub(crate) struct State { } pub(crate) struct Session { pub(crate) diagnostic: bool, - /// A writable Disposable session's checkpoint thread; dropped first, so + /// A writable Normal session's checkpoint thread; dropped first, so /// it ends before the session's own connection closes. pub(crate) background: Option, pub(crate) admission: crate::backend::admission::Admission, @@ -195,7 +195,7 @@ impl Session { path, false, false, - SqlitePersistenceProfile::Disposable, + SqlitePersistenceProfile::Normal, crate::SqlitePackLayout::Monolithic, crate::SqliteAcquisitionSchema::Absent, true, diff --git a/engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs b/engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs index 6458b9673a..2102c3c641 100644 --- a/engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs +++ b/engine/crates/layerfs-persistence/src/backend/sqlite/session/profile.rs @@ -8,7 +8,6 @@ impl SqlitePersistenceProfile { pub(crate) fn identity(self) -> &'static str { match self { Self::Durable => "sqlite-wal-full-v2", - Self::Disposable => "sqlite-wal-off-v2", Self::Normal => "sqlite-wal-normal-v2", } } @@ -18,20 +17,19 @@ impl SqlitePersistenceProfile { pub(crate) fn synchronous(self) -> i64 { match self { Self::Durable => 2, - Self::Disposable => 0, Self::Normal => 1, } } pub(crate) fn fullfsync(self) -> i64 { i64::from(self == Self::Durable) } - /// Pages after which a COMMIT checkpoints the log itself. Disposable and - /// Normal leave it to their session's checkpoint thread, off the commit + /// Pages after which a COMMIT checkpoints the log itself. Normal leaves + /// it to its session's checkpoint thread, off the commit /// path (`background.rs`; owner approval, 2026-11-07). pub(crate) fn wal_autocheckpoint(self) -> i64 { match self { Self::Durable => 1000, - Self::Disposable | Self::Normal => 0, + Self::Normal => 0, } } /// Whether a writable session of this profile runs the checkpoint thread. diff --git a/engine/crates/layerfs-persistence/src/backend/sqlite/snapshot.rs b/engine/crates/layerfs-persistence/src/backend/sqlite/snapshot.rs index 8a57baec50..84a3a1fad8 100644 --- a/engine/crates/layerfs-persistence/src/backend/sqlite/snapshot.rs +++ b/engine/crates/layerfs-persistence/src/backend/sqlite/snapshot.rs @@ -67,9 +67,10 @@ impl Session { ) .map_err(rows::error)?; source.busy_timeout(Duration::ZERO).map_err(rows::error)?; - // Disposable copy: VACUUM INTO writes its output with the source - // connection's synchronous setting, so nothing is synced. - query::run(&source, "PRAGMA synchronous=0", vec![], &work)?; + // VACUUM INTO writes its output with the source connection's + // synchronous setting: the Store's own (NORMAL), never OFF. + let synchronous = self.profile.persistence.synchronous(); + query::run(&source, &format!("PRAGMA synchronous={synchronous}"), vec![], &work)?; let page_size = u64::try_from(integer(&source, "PRAGMA page_size", &work)?) .map_err(|_| PersistenceError::Malformed)?; let pages = u64::try_from(integer(&source, "PRAGMA page_count", &work)?) @@ -104,7 +105,7 @@ impl Session { ) .map_err(rows::error)?; copy.busy_timeout(Duration::ZERO).map_err(rows::error)?; - query::run(©, "PRAGMA synchronous=0", vec![], &work)?; + query::run(©, &format!("PRAGMA synchronous={synchronous}"), vec![], &work)?; let mode = query::run(©, "PRAGMA journal_mode=wal", vec![], &work)? .first() .ok_or(PersistenceError::Malformed)? diff --git a/engine/crates/layerfs-persistence/src/lib.rs b/engine/crates/layerfs-persistence/src/lib.rs index c59c5d557b..67824ded63 100644 --- a/engine/crates/layerfs-persistence/src/lib.rs +++ b/engine/crates/layerfs-persistence/src/lib.rs @@ -1,5 +1,5 @@ -//! The global Store: embedded SQLite (explicit Durable and disk-backed -//! Disposable profiles) or PostgreSQL (#506). +//! The global Store: embedded SQLite (the Normal profile; Durable is +//! disabled by the owner) or PostgreSQL (#506). #![deny(unsafe_code)] #![deny(missing_docs)] mod backend; diff --git a/engine/crates/layerfs-persistence/src/store/config.rs b/engine/crates/layerfs-persistence/src/store/config.rs index 27ecf8d63c..718b70a742 100644 --- a/engine/crates/layerfs-persistence/src/store/config.rs +++ b/engine/crates/layerfs-persistence/src/store/config.rs @@ -105,21 +105,17 @@ pub enum SqlitePersistenceProfile { /// WAL/FULL; macOS additionally requests full synchronization. #[default] Durable, - /// WAL/OFF; survives process termination, without kernel-crash durability. - /// A kernel or VM crash can corrupt the Store or lose acknowledged data. - /// Tests and diagnostics may still select it; the product opens Normal. - Disposable, /// WAL/NORMAL: the log is synchronized before each checkpoint and after a /// log restart, not at every COMMIT. A kernel or VM crash can lose the - /// commits since the last synchronized checkpoint. The profile every - /// product opener selects (owner, 2026-11-17). + /// commits since the last synchronized checkpoint. The only profile a + /// Store is opened with (owner, 2026-11-17; OFF was removed 2026-11-23). Normal, } impl SqlitePersistenceProfile { - /// Whether a product path may open a Store with this profile: Normal, or - /// Disposable for a test or diagnostic. Durable stays disabled. + /// Whether a Store may be opened with this profile: Normal only. + /// Durable stays disabled. pub const fn permitted(self) -> bool { - matches!(self, Self::Normal | Self::Disposable) + matches!(self, Self::Normal) } } /// Explicit physical layout for a newly created embedded Store. diff --git a/engine/crates/layerfs-persistence/src/store/open.rs b/engine/crates/layerfs-persistence/src/store/open.rs index c1c0fe2d9c..1c393d9686 100644 --- a/engine/crates/layerfs-persistence/src/store/open.rs +++ b/engine/crates/layerfs-persistence/src/store/open.rs @@ -62,7 +62,7 @@ impl SqliteHandles { Self::open(config, binding, cursor_key, false) } /// Opens for diagnosis without changing journal/checkpoint settings or - /// migrating the source. Uses the explicitly Disposable execution policy. + /// migrating the source. Uses the Normal profile, read-only. pub fn open_diagnostic( path: &std::path::Path, binding: &[u8], diff --git a/engine/crates/layerfs-persistence/tests/acquisition_batching.rs b/engine/crates/layerfs-persistence/tests/acquisition_batching.rs index 790c7c924c..895b476e9f 100644 --- a/engine/crates/layerfs-persistence/tests/acquisition_batching.rs +++ b/engine/crates/layerfs-persistence/tests/acquisition_batching.rs @@ -96,7 +96,7 @@ fn symlink(position: u64) -> NewEntry { #[test] fn non_host_windows_skip_the_host_insert_without_losing_targets_or_charges() { let temp = Temp::new("acquisition-non-host-window"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries(owner, &[directory(None, b"", 0)]).unwrap(); @@ -210,7 +210,7 @@ fn narrow_bindings_preserve_mixed_payloads_after_an_existing_alias_boundary() { fn directory_uniqueness_and_host_evidence_keep_the_first_refusal_after_a_prefix() { use layerfs_storage::port::PersistenceError; let temp = Temp::new("acquisition-mixed-refusal-order"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries( @@ -302,7 +302,7 @@ fn windows_amortize_execution_without_losing_aliases_or_atomic_completion() { #[test] fn missing_and_repeated_roots_roll_back_the_window_and_report_first_failure() { let temp = Temp::new("acquisition-root-window-atomic"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries(owner, &[directory(None, b"", 0)]).unwrap(); @@ -371,7 +371,7 @@ fn missing_and_repeated_roots_roll_back_the_window_and_report_first_failure() { #[test] fn directory_completion_uses_only_directory_positions_and_is_atomic() { let temp = Temp::new("acquisition-directory-window"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries( @@ -407,7 +407,7 @@ fn root_window_index_work_ignores_unrelated_population() { let mut work = Vec::new(); for population in [2000_u64, 20000] { let temp = Temp::new("acquisition-root-index-work"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries(owner, &[directory(None, b"", 0)]).unwrap(); @@ -447,7 +447,7 @@ fn independent_entries_share_executions_and_population_work_stays_indexed() { let mut work = Vec::new(); for population in [2000_u64, 20000] { let temp = Temp::new("acquisition-entry-index-work"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries(owner, &[directory(None, b"", 0)]).unwrap(); @@ -492,7 +492,7 @@ fn independent_entries_share_executions_and_population_work_stays_indexed() { fn entry_refusal_order_and_full_unit_rollback_survive_execution_windows() { use layerfs_storage::port::PersistenceError; let temp = Temp::new("acquisition-entry-refusal-order"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries(owner, &[directory(None, b"", 0), file(1, 1)]) @@ -550,11 +550,11 @@ fn entry_refusal_order_and_full_unit_rollback_survive_execution_windows() { ); } -/// Owner direction 2026-10-07: Disposable is the sole active development +/// Owner direction 2026-11-23: Normal is the sole active development /// verification profile. Durable execution of these bodies is NOT_RUN — -/// deferred by owner for Disposable-only development. Durable support and its +/// deferred by owner for Normal-only development. Durable support and its /// retained historical receipts are unchanged. -const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Disposable]; +const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Normal]; #[test] fn a_metadata_value_outside_the_portable_grammar_is_refused_and_never_read() { @@ -564,7 +564,7 @@ fn a_metadata_value_outside_the_portable_grammar_is_refused_and_never_read() { // outside the grammar or with nonzero padding; that is checked by changing // a stored row out of band. let temp = Temp::new("acquisition-metadata-refusal"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let owner = begin(&handles); let mut bad = symlink(1); bad.metadata.mode = 0o644; diff --git a/engine/crates/layerfs-persistence/tests/acquisition_disposal.rs b/engine/crates/layerfs-persistence/tests/acquisition_disposal.rs index 0bce32f50e..06328f558b 100644 --- a/engine/crates/layerfs-persistence/tests/acquisition_disposal.rs +++ b/engine/crates/layerfs-persistence/tests/acquisition_disposal.rs @@ -134,7 +134,7 @@ fn final_bounded_disposal_releases_in_one_ack_and_preserves_another_owner() { #[test] fn zero_budget_retains_work_and_can_release_an_empty_owner() { let temp = Temp::new("acquisition-zero-disposal"); - let handles = create(&temp, SqlitePersistenceProfile::Disposable); + let handles = create(&temp, SqlitePersistenceProfile::Normal); let port = &handles.acquisition; let owner = begin(&handles); port.put_entries(owner, &[root()]).unwrap(); @@ -160,8 +160,8 @@ fn zero_budget_retains_work_and_can_release_an_empty_owner() { assert_eq!(port.work(owner), Err(AcquisitionError::Stale)); } -/// Owner direction 2026-10-07: Disposable is the sole active development +/// Owner direction 2026-11-23: Normal is the sole active development /// verification profile. Durable execution of these bodies is NOT_RUN — -/// deferred by owner for Disposable-only development. Durable support and its +/// deferred by owner for Normal-only development. Durable support and its /// retained historical receipts are unchanged. -const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Disposable]; +const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Normal]; diff --git a/engine/crates/layerfs-persistence/tests/acquisition_reads.rs b/engine/crates/layerfs-persistence/tests/acquisition_reads.rs index dfe3d9bd4b..bba3891316 100644 --- a/engine/crates/layerfs-persistence/tests/acquisition_reads.rs +++ b/engine/crates/layerfs-persistence/tests/acquisition_reads.rs @@ -180,7 +180,7 @@ fn typed_reads_and_narrow_bindings_preserve_operation_isolation_order_and_bounds let temp = Temp::new("owned-window-reads"); let handles = create( &temp.join("store.sqlite"), - SqlitePersistenceProfile::Disposable, + SqlitePersistenceProfile::Normal, ); let port = &handles.acquisition; let first = begin(&handles); @@ -290,8 +290,8 @@ fn typed_reads_and_narrow_bindings_preserve_operation_isolation_order_and_bounds assert_eq!(port.job(other, 3).unwrap(), None); } -/// Owner direction 2026-10-07: Disposable is the sole active development +/// Owner direction 2026-11-23: Normal is the sole active development /// verification profile. Durable execution of these bodies is NOT_RUN — -/// deferred by owner for Disposable-only development. Durable support and its +/// deferred by owner for Normal-only development. Durable support and its /// retained historical receipts are unchanged. -const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Disposable]; +const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Normal]; diff --git a/engine/crates/layerfs-persistence/tests/admission.rs b/engine/crates/layerfs-persistence/tests/admission.rs index feb9c15269..d66eb1ea00 100644 --- a/engine/crates/layerfs-persistence/tests/admission.rs +++ b/engine/crates/layerfs-persistence/tests/admission.rs @@ -16,7 +16,7 @@ const BINDING: &[u8] = b"gc-admission"; const CURSOR: [u8; 32] = [47; 32]; fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn catalog(temp: &Temp) -> layerfs_persistence::HistoryProvider { diff --git a/engine/crates/layerfs-persistence/tests/background_checkpoint.rs b/engine/crates/layerfs-persistence/tests/background_checkpoint.rs index 7c56a69d84..803f03b9c4 100644 --- a/engine/crates/layerfs-persistence/tests/background_checkpoint.rs +++ b/engine/crates/layerfs-persistence/tests/background_checkpoint.rs @@ -1,4 +1,4 @@ -//! A Normal or Disposable session's checkpoint thread (owner approval, +//! A Normal session's checkpoint thread (owner approval, //! 2026-11-07; Normal since 2026-11-17): COMMIT does not checkpoint //! (`wal_autocheckpoint=0`); a log longer than 4 MiB is copied into the Store //! file while the session stays open, with no idle checkpoint, seal or close. @@ -47,12 +47,7 @@ fn size(path: &Path) -> u64 { std::fs::metadata(path).map_or(0, |m| m.len()) } -#[test] -fn a_long_log_is_copied_into_the_store_while_the_session_stays_open() { - copied(SqlitePersistenceProfile::Disposable, 0); -} - -/// The product profile: the session and its checkpoint thread run at +/// The Store profile: the session and its checkpoint thread run at /// `synchronous=1` (NORMAL), and the log is still copied off the commit path. #[test] fn a_normal_session_copies_its_log_with_normal_synchronization() { diff --git a/engine/crates/layerfs-persistence/tests/branch_removal.rs b/engine/crates/layerfs-persistence/tests/branch_removal.rs index 35700d1996..d82ff50843 100644 --- a/engine/crates/layerfs-persistence/tests/branch_removal.rs +++ b/engine/crates/layerfs-persistence/tests/branch_removal.rs @@ -18,7 +18,7 @@ const BINDING: &[u8] = b"branch-removal"; const CURSOR: [u8; 32] = [37; 32]; fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn catalog(temp: &Temp) -> layerfs_persistence::HistoryProvider { diff --git a/engine/crates/layerfs-persistence/tests/compact_metrics.rs b/engine/crates/layerfs-persistence/tests/compact_metrics.rs index 6bdf8641a5..5115bf655d 100644 --- a/engine/crates/layerfs-persistence/tests/compact_metrics.rs +++ b/engine/crates/layerfs-persistence/tests/compact_metrics.rs @@ -26,7 +26,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(path.clone()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &layerfs_history::HistoryCatalogConfig { binding_key: BINDING.to_vec(), @@ -41,7 +41,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { fn reopen(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/concurrent_first_installs.rs b/engine/crates/layerfs-persistence/tests/concurrent_first_installs.rs index 5c01efb8da..6be985be7e 100644 --- a/engine/crates/layerfs-persistence/tests/concurrent_first_installs.rs +++ b/engine/crates/layerfs-persistence/tests/concurrent_first_installs.rs @@ -27,7 +27,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } /// A whole-file object for `raw`, built the way C1 frames small files. diff --git a/engine/crates/layerfs-persistence/tests/concurrent_pooled_saves.rs b/engine/crates/layerfs-persistence/tests/concurrent_pooled_saves.rs index c21c5d40a8..2715d3987b 100644 --- a/engine/crates/layerfs-persistence/tests/concurrent_pooled_saves.rs +++ b/engine/crates/layerfs-persistence/tests/concurrent_pooled_saves.rs @@ -38,7 +38,7 @@ fn earlier_reserved_save_finishes_after_a_higher_block_was_published() { let temp = support::Temp::new("concurrent-pooled-saves"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(temp.join("store.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: b"concurrent-pooled-saves".to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/diagnostic_inventory.rs b/engine/crates/layerfs-persistence/tests/diagnostic_inventory.rs index d4bfc58bef..ff188c8fda 100644 --- a/engine/crates/layerfs-persistence/tests/diagnostic_inventory.rs +++ b/engine/crates/layerfs-persistence/tests/diagnostic_inventory.rs @@ -21,7 +21,7 @@ impl Fixture { let temp = support::Temp::new("diagnostic-inventory"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(temp.join("store.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables), StoragePolicy::frozen_default(), &HistoryCatalogConfig { diff --git a/engine/crates/layerfs-persistence/tests/diagnostic_overwrite.rs b/engine/crates/layerfs-persistence/tests/diagnostic_overwrite.rs index 719ba54c70..6e7a35f476 100644 --- a/engine/crates/layerfs-persistence/tests/diagnostic_overwrite.rs +++ b/engine/crates/layerfs-persistence/tests/diagnostic_overwrite.rs @@ -95,7 +95,7 @@ fn local_merges_late_publication_and_separate_stacks_have_exact_counts() { let temp = support::Temp::new("doctor-overwrite"); let path = temp.join("db"); let handles = SqliteHandles::create( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: support::BINDING.to_vec(), @@ -230,7 +230,7 @@ fn cancellation_interrupts_large_scratch_publication_analysis_and_joins() { let temp = support::Temp::new("doctor-overwrite-cancel"); let path = temp.join("db"); let handles = SqliteHandles::create( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: support::BINDING.to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/diagnostic_schema.rs b/engine/crates/layerfs-persistence/tests/diagnostic_schema.rs index 82f2434153..d61a89045e 100644 --- a/engine/crates/layerfs-persistence/tests/diagnostic_schema.rs +++ b/engine/crates/layerfs-persistence/tests/diagnostic_schema.rs @@ -9,7 +9,7 @@ use layerfs_storage::StoragePolicy; fn create(path: &std::path::Path) -> SqliteHandles { SqliteHandles::create( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: b"doctor-schema".to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/diagnostic_snapshot.rs b/engine/crates/layerfs-persistence/tests/diagnostic_snapshot.rs index 7ac6f7a6ec..271e42310b 100644 --- a/engine/crates/layerfs-persistence/tests/diagnostic_snapshot.rs +++ b/engine/crates/layerfs-persistence/tests/diagnostic_snapshot.rs @@ -19,7 +19,7 @@ fn authority() -> HistoryCatalogConfig { } fn create(path: &std::path::Path) -> SqliteHandles { SqliteHandles::create( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &authority(), ) diff --git a/engine/crates/layerfs-persistence/tests/diagnostics_during_lane.rs b/engine/crates/layerfs-persistence/tests/diagnostics_during_lane.rs index af017cde25..3ad3ba6558 100644 --- a/engine/crates/layerfs-persistence/tests/diagnostics_during_lane.rs +++ b/engine/crates/layerfs-persistence/tests/diagnostics_during_lane.rs @@ -18,7 +18,7 @@ const LIMIT: Duration = Duration::from_millis(750); fn counters_are_read_while_the_lane_is_held() { let temp = Temp::new("diagnostics-during-lane"); let mut config = PersistenceConfig::sqlite(temp.join("store")); - config.sqlite_profile = SqlitePersistenceProfile::Disposable; + config.sqlite_profile = SqlitePersistenceProfile::Normal; let handles = SqliteHandles::create( config, StoragePolicy::frozen_default(), diff --git a/engine/crates/layerfs-persistence/tests/disposable_startup_sync.rs b/engine/crates/layerfs-persistence/tests/disposable_startup_sync.rs deleted file mode 100644 index f4e388b309..0000000000 --- a/engine/crates/layerfs-persistence/tests/disposable_startup_sync.rs +++ /dev/null @@ -1,448 +0,0 @@ -//! Public Disposable startup/seal must never synchronize its backing files. -//! The observer delegates the public SQLite VFS ABI, preserving every callback. -#![cfg(any(target_os = "macos", target_os = "linux"))] - -use layerfs_content::{FinalizedObject, ObjectRole}; -use layerfs_history::HistoryCatalogConfig; -use layerfs_persistence::{ - PersistenceConfig, SqliteAcquisitionSchema, SqliteHandles, SqlitePackLayout, - SqlitePersistenceProfile, -}; -use layerfs_storage::{Storage, StoragePolicy}; -use rusqlite::ffi; -use std::{ - ffi::{c_char, c_int, c_void, CStr, CString}, - fs, - mem::{align_of, size_of}, - path::PathBuf, - ptr, - sync::atomic::{AtomicU64, Ordering}, -}; - -struct Counters { - opens: [AtomicU64; 4], - writes: [AtomicU64; 4], - syncs: [AtomicU64; 4], - closes: [AtomicU64; 4], - sync_flags: AtomicU64, - errors: AtomicU64, -} -impl Counters { - fn new() -> Self { - Self { - opens: std::array::from_fn(|_| AtomicU64::new(0)), - writes: std::array::from_fn(|_| AtomicU64::new(0)), - syncs: std::array::from_fn(|_| AtomicU64::new(0)), - closes: std::array::from_fn(|_| AtomicU64::new(0)), - sync_flags: AtomicU64::new(0), - errors: AtomicU64::new(0), - } - } - fn reset(&self) { - for counters in [&self.opens, &self.writes, &self.syncs, &self.closes] { - for value in counters { - value.store(0, Ordering::Relaxed); - } - } - self.sync_flags.store(0, Ordering::Relaxed); - self.errors.store(0, Ordering::Relaxed); - } - fn report(&self, phase: &str) -> u64 { - let values = |c: &[AtomicU64; 4]| c.each_ref().map(|v| v.load(Ordering::Relaxed)); - let syncs = values(&self.syncs); - eprintln!( - "DISPOSABLE_VFS phase={phase} classes=main,wal,journal,other opens={:?} writes={:?} syncs={syncs:?} closes={:?} flags={} errors={}", - values(&self.opens), values(&self.writes), values(&self.closes), - self.sync_flags.load(Ordering::Relaxed), self.errors.load(Ordering::Relaxed) - ); - syncs.iter().sum() - } -} -struct Context { - original: *mut ffi::sqlite3_vfs, - counts: Counters, -} -#[repr(C)] -struct ObservedFile { - base: ffi::sqlite3_file, - inner: *mut ffi::sqlite3_file, - context: *const Context, - kind: usize, - methods: ffi::sqlite3_io_methods, -} -fn offset() -> usize { - size_of::().next_multiple_of(align_of::()) -} -unsafe fn file(p: *mut ffi::sqlite3_file) -> &'static mut ObservedFile { - &mut *p.cast::() -} -unsafe fn original(v: *mut ffi::sqlite3_vfs) -> *mut ffi::sqlite3_vfs { - (*(*v).pAppData.cast::()).original -} - -macro_rules! file_delegate { - ($name:ident, $field:ident, ($($arg:ident: $ty:ty),*) -> $ret:ty) => { - unsafe extern "C" fn $name(p: *mut ffi::sqlite3_file, $($arg: $ty),*) -> $ret { - let f = file(p); - ((*(*f.inner).pMethods).$field.unwrap())(f.inner, $($arg),*) - } - }; -} -file_delegate!(read_file, xRead, (b: *mut c_void, n: c_int, at: i64) -> c_int); -file_delegate!(truncate_file, xTruncate, (n: i64) -> c_int); -file_delegate!(size_file, xFileSize, (n: *mut i64) -> c_int); -file_delegate!(lock_file, xLock, (n: c_int) -> c_int); -file_delegate!(unlock_file, xUnlock, (n: c_int) -> c_int); -file_delegate!(reserved_file, xCheckReservedLock, (n: *mut c_int) -> c_int); -file_delegate!(control_file, xFileControl, (n: c_int, b: *mut c_void) -> c_int); -file_delegate!(sector_file, xSectorSize, () -> c_int); -file_delegate!(device_file, xDeviceCharacteristics, () -> c_int); -file_delegate!(map_file, xShmMap, (a: c_int, b: c_int, c: c_int, d: *mut *mut c_void) -> c_int); -file_delegate!(shm_lock, xShmLock, (a: c_int, b: c_int, c: c_int) -> c_int); -file_delegate!(barrier_file, xShmBarrier, () -> ()); -file_delegate!(unmap_file, xShmUnmap, (a: c_int) -> c_int); -file_delegate!(fetch_file, xFetch, (a: i64, b: c_int, c: *mut *mut c_void) -> c_int); -file_delegate!(unfetch_file, xUnfetch, (a: i64, b: *mut c_void) -> c_int); - -unsafe extern "C" fn close_file(p: *mut ffi::sqlite3_file) -> c_int { - let f = file(p); - let result = ((*(*f.inner).pMethods).xClose.unwrap())(f.inner); - (*f.context).counts.closes[f.kind].fetch_add(1, Ordering::Relaxed); - if result != ffi::SQLITE_OK { - (*f.context).counts.errors.fetch_add(1, Ordering::Relaxed); - } - f.base.pMethods = ptr::null(); - result -} -unsafe extern "C" fn write_file( - p: *mut ffi::sqlite3_file, - b: *const c_void, - n: c_int, - at: i64, -) -> c_int { - let f = file(p); - (*f.context).counts.writes[f.kind].fetch_add(1, Ordering::Relaxed); - ((*(*f.inner).pMethods).xWrite.unwrap())(f.inner, b, n, at) -} -unsafe extern "C" fn sync_file(p: *mut ffi::sqlite3_file, flags: c_int) -> c_int { - let f = file(p); - (*f.context).counts.syncs[f.kind].fetch_add(1, Ordering::Relaxed); - (*f.context) - .counts - .sync_flags - .fetch_or(flags as u64, Ordering::Relaxed); - let result = ((*(*f.inner).pMethods).xSync.unwrap())(f.inner, flags); - if result != ffi::SQLITE_OK { - (*f.context).counts.errors.fetch_add(1, Ordering::Relaxed); - } - result -} -unsafe extern "C" fn open_file( - v: *mut ffi::sqlite3_vfs, - name: *const c_char, - p: *mut ffi::sqlite3_file, - flags: c_int, - out: *mut c_int, -) -> c_int { - let context = (*v).pAppData.cast::(); - let f = file(p); - f.inner = p.cast::().add(offset()).cast(); - f.context = context; - f.kind = if flags & ffi::SQLITE_OPEN_WAL != 0 { - 1 - } else if flags & ffi::SQLITE_OPEN_MAIN_DB != 0 { - 0 - } else if flags & ffi::SQLITE_OPEN_MAIN_JOURNAL != 0 { - 2 - } else { - 3 - }; - let prior = (*context).original; - let result = ((*prior).xOpen.unwrap())(prior, name, f.inner, flags, out); - if !(*f.inner).pMethods.is_null() { - let m = &*(*f.inner).pMethods; - if !(1..=3).contains(&m.iVersion) { - (m.xClose.unwrap())(f.inner); - return ffi::SQLITE_CANTOPEN; - } - f.methods = std::mem::zeroed(); - f.methods.iVersion = m.iVersion; - macro_rules! wrap { - ($field:ident, $callback:ident) => { - f.methods.$field = m.$field.map(|_| $callback as _); - }; - } - wrap!(xClose, close_file); - wrap!(xRead, read_file); - wrap!(xWrite, write_file); - wrap!(xTruncate, truncate_file); - wrap!(xSync, sync_file); - wrap!(xFileSize, size_file); - wrap!(xLock, lock_file); - wrap!(xUnlock, unlock_file); - wrap!(xCheckReservedLock, reserved_file); - wrap!(xFileControl, control_file); - wrap!(xSectorSize, sector_file); - wrap!(xDeviceCharacteristics, device_file); - if m.iVersion >= 2 { - wrap!(xShmMap, map_file); - wrap!(xShmLock, shm_lock); - wrap!(xShmBarrier, barrier_file); - wrap!(xShmUnmap, unmap_file); - } - if m.iVersion >= 3 { - wrap!(xFetch, fetch_file); - wrap!(xUnfetch, unfetch_file); - } - f.base.pMethods = &f.methods; - (*context).counts.opens[f.kind].fetch_add(1, Ordering::Relaxed); - } - result -} -macro_rules! vfs_delegate { - ($name:ident, $field:ident, ($($arg:ident: $ty:ty),*) -> $ret:ty) => { - unsafe extern "C" fn $name(v: *mut ffi::sqlite3_vfs, $($arg: $ty),*) -> $ret { - let prior = original(v); - ((*prior).$field.unwrap())(prior, $($arg),*) - } - }; -} -type DlSymbol = Option; -vfs_delegate!(delete_vfs, xDelete, (n: *const c_char, s: c_int) -> c_int); -vfs_delegate!(access_vfs, xAccess, (n: *const c_char, f: c_int, r: *mut c_int) -> c_int); -vfs_delegate!(path_vfs, xFullPathname, (n: *const c_char, s: c_int, r: *mut c_char) -> c_int); -vfs_delegate!(dlopen_vfs, xDlOpen, (n: *const c_char) -> *mut c_void); -vfs_delegate!(dlerror_vfs, xDlError, (n: c_int, r: *mut c_char) -> ()); -vfs_delegate!(dlsym_vfs, xDlSym, (h: *mut c_void, n: *const c_char) -> DlSymbol); -vfs_delegate!(dlclose_vfs, xDlClose, (h: *mut c_void) -> ()); -vfs_delegate!(random_vfs, xRandomness, (n: c_int, r: *mut c_char) -> c_int); -vfs_delegate!(sleep_vfs, xSleep, (n: c_int) -> c_int); -vfs_delegate!(time_vfs, xCurrentTime, (r: *mut f64) -> c_int); -vfs_delegate!(error_vfs, xGetLastError, (n: c_int, r: *mut c_char) -> c_int); -vfs_delegate!(time64_vfs, xCurrentTimeInt64, (r: *mut i64) -> c_int); -vfs_delegate!(setcall_vfs, xSetSystemCall, (n: *const c_char, p: ffi::sqlite3_syscall_ptr) -> c_int); -vfs_delegate!(getcall_vfs, xGetSystemCall, (n: *const c_char) -> ffi::sqlite3_syscall_ptr); -vfs_delegate!(nextcall_vfs, xNextSystemCall, (n: *const c_char) -> *const c_char); - -struct Observer { - proxy: Box, - context: Box, -} -impl Observer { - fn new() -> Self { - unsafe { - let prior = ffi::sqlite3_vfs_find(ptr::null()); - assert!(!prior.is_null()); - assert!((1..=3).contains(&(*prior).iVersion)); - let mut context = Box::new(Context { - original: prior, - counts: Counters::new(), - }); - let mut proxy = Box::new(*prior); - proxy.zName = c"layerfs-disposable-sync-observer".as_ptr(); - proxy.pNext = ptr::null_mut(); - proxy.pAppData = (&mut *context as *mut Context).cast(); - proxy.szOsFile = proxy.szOsFile.checked_add(offset() as c_int).unwrap(); - proxy.xOpen = Some(open_file); - macro_rules! wrap { - ($field:ident, $callback:ident) => { - proxy.$field = (*prior).$field.map(|_| $callback as _); - }; - } - wrap!(xDelete, delete_vfs); - wrap!(xAccess, access_vfs); - wrap!(xFullPathname, path_vfs); - wrap!(xDlOpen, dlopen_vfs); - wrap!(xDlError, dlerror_vfs); - wrap!(xDlSym, dlsym_vfs); - wrap!(xDlClose, dlclose_vfs); - wrap!(xRandomness, random_vfs); - wrap!(xSleep, sleep_vfs); - wrap!(xCurrentTime, time_vfs); - wrap!(xGetLastError, error_vfs); - if proxy.iVersion >= 2 { - wrap!(xCurrentTimeInt64, time64_vfs); - } - if proxy.iVersion >= 3 { - wrap!(xSetSystemCall, setcall_vfs); - wrap!(xGetSystemCall, getcall_vfs); - wrap!(xNextSystemCall, nextcall_vfs); - } - assert_eq!(ffi::sqlite3_vfs_register(&mut *proxy, 1), ffi::SQLITE_OK); - eprintln!( - "DISPOSABLE_VFS sqlite={} underlying={}", - CStr::from_ptr(ffi::sqlite3_libversion()).to_string_lossy(), - CStr::from_ptr((*prior).zName).to_string_lossy() - ); - Self { proxy, context } - } - } - fn calibrate(&self, path: &std::path::Path) { - // This control file is not a Store or Disposable backing. It proves - // the observer counts and forwards xSync rather than suppressing it. - let name = CString::new(path.to_str().unwrap()).unwrap(); - unsafe { - let p = ffi::sqlite3_malloc(self.proxy.szOsFile).cast::(); - assert!(!p.is_null()); - ptr::write_bytes(p.cast::(), 0, self.proxy.szOsFile as usize); - let mut flags = 0; - let result = (self.proxy.xOpen.unwrap())( - (&*self.proxy as *const ffi::sqlite3_vfs).cast_mut(), - name.as_ptr(), - p, - ffi::SQLITE_OPEN_MAIN_DB | ffi::SQLITE_OPEN_READWRITE | ffi::SQLITE_OPEN_CREATE, - &mut flags, - ); - assert_eq!(result, ffi::SQLITE_OK); - let m = &*(*p).pMethods; - assert_eq!( - (m.xWrite.unwrap())(p, b"control".as_ptr().cast(), 7, 0), - ffi::SQLITE_OK - ); - assert_eq!( - (m.xSync.unwrap())(p, ffi::SQLITE_SYNC_NORMAL), - ffi::SQLITE_OK - ); - assert_eq!((m.xClose.unwrap())(p), ffi::SQLITE_OK); - ffi::sqlite3_free(p.cast()); - } - assert_eq!(self.context.counts.report("observer-control"), 1); - self.context.counts.reset(); - fs::remove_file(path).unwrap(); - } -} -impl Drop for Observer { - fn drop(&mut self) { - unsafe { - assert_eq!( - ffi::sqlite3_vfs_register(self.context.original, 1), - ffi::SQLITE_OK - ); - assert_eq!( - ffi::sqlite3_vfs_unregister(&mut *self.proxy), - ffi::SQLITE_OK - ); - } - } -} -struct Fixture(PathBuf); -impl Fixture { - fn new() -> Self { - let path = std::env::temp_dir().join(format!( - "layerfs-disposable-startup-sync-{}", - std::process::id() - )); - fs::create_dir(&path).unwrap(); - eprintln!("DISPOSABLE_SYNC_FIXTURE {}", path.display()); - Self(path) - } -} -impl Drop for Fixture { - fn drop(&mut self) { - if std::thread::panicking() { - eprintln!( - "RETAINED_FAILED_DISPOSABLE_SYNC_FIXTURE {}", - self.0.display() - ); - } else { - fs::remove_dir_all(&self.0).unwrap(); - } - } -} - -#[test] -fn disposable_create_save_reopen_seal_never_calls_vfs_sync() { - let fixture = Fixture::new(); - let observer = Observer::new(); - observer.calibrate(&fixture.0.join("non-store-observer-control")); - let authority = HistoryCatalogConfig { - binding_key: b"disposable-startup-sync".to_vec(), - cursor_key: [73; 32], - incarnation: 9, - }; - let counts = &observer.context.counts; - let mut opens = [0; 4]; - let mut writes = [0; 4]; - let mut closes = [0; 4]; - let mut errors = 0; - let mut syncs = 0; - let mut observe = |phase: &str| { - for kind in 0..4 { - opens[kind] += counts.opens[kind].load(Ordering::Relaxed); - writes[kind] += counts.writes[kind].load(Ordering::Relaxed); - closes[kind] += counts.closes[kind].load(Ordering::Relaxed); - } - errors += counts.errors.load(Ordering::Relaxed); - syncs += counts.report(phase); - counts.reset(); - }; - for layout in [ - SqlitePackLayout::Monolithic, - SqlitePackLayout::GroupRows, - SqlitePackLayout::GroupRowsIndexed, - ] { - for acquisition in [ - SqliteAcquisitionSchema::Absent, - SqliteAcquisitionSchema::Tables, - ] { - let path = fixture.0.join(format!("{layout:?}-{acquisition:?}.sqlite")); - let config = PersistenceConfig::sqlite(&path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) - .with_sqlite_pack_layout(layout) - .with_sqlite_acquisition(acquisition); - let handles = - SqliteHandles::create(config.clone(), StoragePolicy::frozen_default(), &authority) - .unwrap(); - assert_eq!( - handles.profile().persistence, - SqlitePersistenceProfile::Disposable - ); - assert_eq!(handles.profile().synchronous, 0); - assert_eq!(handles.profile().fullfsync, 0); - assert_eq!(handles.profile().journal_mode, "wal"); - observe(&format!("create-{layout:?}-{acquisition:?}")); - let storage = Storage::new(handles.storage.clone()).unwrap(); - let object = FinalizedObject::new( - ObjectRole::FileState, - layerfs_content::object::codec::encode_bytes_object(b"Disposable canonical object") - .unwrap(), - ) - .unwrap(); - let save = storage.begin_save().unwrap(); - save.accept(object.clone()).unwrap(); - save.finish().unwrap(); - drop(storage); - observe(&format!("save-{layout:?}-{acquisition:?}")); - handles.seal().unwrap(); - observe(&format!("seal-{layout:?}-{acquisition:?}")); - for suffix in ["-wal", "-shm", "-journal"] { - assert!(!PathBuf::from(format!("{}{suffix}", path.display())).exists()); - } - let reopened = - SqliteHandles::open_writable(config, &authority.binding_key, authority.cursor_key) - .unwrap(); - observe(&format!("reopen-{layout:?}-{acquisition:?}")); - let storage = Storage::new(reopened.storage.clone()).unwrap(); - assert_eq!( - storage - .reader() - .unwrap() - .read_objects(&[object.id()]) - .unwrap(), - vec![object.canonical().to_vec()] - ); - drop(storage); - reopened.seal().unwrap(); - observe(&format!("reopen-seal-{layout:?}-{acquisition:?}")); - } - } - assert!(opens[0] >= 12); - assert!(writes[0] > 0); - assert!(writes[1] > 0); - assert_eq!(opens, closes, "every observed file must be closed"); - assert_eq!(errors, 0); - assert_eq!( - syncs, 0, - "public Disposable startup/save/seal issued actual delegated VFS xSync" - ); -} diff --git a/engine/crates/layerfs-persistence/tests/epoch_fence.rs b/engine/crates/layerfs-persistence/tests/epoch_fence.rs index 48dabe8a29..6e8462c475 100644 --- a/engine/crates/layerfs-persistence/tests/epoch_fence.rs +++ b/engine/crates/layerfs-persistence/tests/epoch_fence.rs @@ -22,7 +22,7 @@ const BINDING: &[u8] = b"epoch-fence"; const CURSOR: [u8; 32] = [53; 32]; fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn catalog(temp: &Temp) -> layerfs_persistence::HistoryProvider { diff --git a/engine/crates/layerfs-persistence/tests/file_lengths.rs b/engine/crates/layerfs-persistence/tests/file_lengths.rs index 46f71af646..7be6ffbf1b 100644 --- a/engine/crates/layerfs-persistence/tests/file_lengths.rs +++ b/engine/crates/layerfs-persistence/tests/file_lengths.rs @@ -10,7 +10,7 @@ use support::Temp; fn handles(temp: &Temp) -> SqliteHandles { let mut config = PersistenceConfig::sqlite(temp.join("store")); - config.sqlite_profile = SqlitePersistenceProfile::Disposable; + config.sqlite_profile = SqlitePersistenceProfile::Normal; SqliteHandles::create( config, StoragePolicy::frozen_default(), diff --git a/engine/crates/layerfs-persistence/tests/gc_backfill.rs b/engine/crates/layerfs-persistence/tests/gc_backfill.rs index 8322b21e16..ac659a54b0 100644 --- a/engine/crates/layerfs-persistence/tests/gc_backfill.rs +++ b/engine/crates/layerfs-persistence/tests/gc_backfill.rs @@ -18,7 +18,7 @@ use support::{branch_id, name, root, stack, Temp, BINDING}; const NEXT_SERIAL: &str = " next_history_serial INTEGER NOT NULL DEFAULT 1,\n"; fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn create(path: &std::path::Path) -> SqliteHandles { diff --git a/engine/crates/layerfs-persistence/tests/heads.rs b/engine/crates/layerfs-persistence/tests/heads.rs index 57b1bf2f9f..c5420eb05c 100644 --- a/engine/crates/layerfs-persistence/tests/heads.rs +++ b/engine/crates/layerfs-persistence/tests/heads.rs @@ -21,7 +21,7 @@ const CURSOR: [u8; 32] = [41; 32]; fn config(path: std::path::PathBuf) -> PersistenceConfig { PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(SqlitePackLayout::GroupRowsIndexed) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables) } diff --git a/engine/crates/layerfs-persistence/tests/idle_checkpoint.rs b/engine/crates/layerfs-persistence/tests/idle_checkpoint.rs index 9f1c0a6c4f..f9f2dddfc6 100644 --- a/engine/crates/layerfs-persistence/tests/idle_checkpoint.rs +++ b/engine/crates/layerfs-persistence/tests/idle_checkpoint.rs @@ -18,7 +18,7 @@ const BINDING: &[u8] = b"idle-checkpoint"; const CURSOR: [u8; 32] = [86; 32]; fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn create(path: &Path) -> SqliteHandles { diff --git a/engine/crates/layerfs-persistence/tests/immutable_reads_under_reclamation.rs b/engine/crates/layerfs-persistence/tests/immutable_reads_under_reclamation.rs index f40ca6874f..05a6d1f498 100644 --- a/engine/crates/layerfs-persistence/tests/immutable_reads_under_reclamation.rs +++ b/engine/crates/layerfs-persistence/tests/immutable_reads_under_reclamation.rs @@ -24,7 +24,7 @@ const ROUNDS: usize = 20_000; fn config(path: &std::path::Path) -> PersistenceConfig { PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables) } fn history() -> HistoryCatalogConfig { diff --git a/engine/crates/layerfs-persistence/tests/inode_branch_delta_custody.rs b/engine/crates/layerfs-persistence/tests/inode_branch_delta_custody.rs index c79bf1dff9..c455efb7fe 100644 --- a/engine/crates/layerfs-persistence/tests/inode_branch_delta_custody.rs +++ b/engine/crates/layerfs-persistence/tests/inode_branch_delta_custody.rs @@ -117,7 +117,7 @@ fn expected(versions: &[u64]) -> Vec> { fn create(temp: &support::Temp) -> SqliteHandles { SqliteHandles::create( PersistenceConfig::sqlite(temp.join("store.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables), StoragePolicy::frozen_default(), &HistoryCatalogConfig { diff --git a/engine/crates/layerfs-persistence/tests/interleaved_saves.rs b/engine/crates/layerfs-persistence/tests/interleaved_saves.rs index 825a398456..bb2b181960 100644 --- a/engine/crates/layerfs-persistence/tests/interleaved_saves.rs +++ b/engine/crates/layerfs-persistence/tests/interleaved_saves.rs @@ -13,7 +13,7 @@ use support::Temp; fn scoped_registry_interleaves_pending_reads_finish_abort_and_slot_reuse() { let temp = Temp::new("interleaved-saves"); let mut config = PersistenceConfig::sqlite(temp.join("store")); - config.sqlite_profile = SqlitePersistenceProfile::Disposable; + config.sqlite_profile = SqlitePersistenceProfile::Normal; let handles = SqliteHandles::create( config, StoragePolicy::frozen_default(), diff --git a/engine/crates/layerfs-persistence/tests/kept_node.rs b/engine/crates/layerfs-persistence/tests/kept_node.rs index 501e9dca70..5d65fc5ca2 100644 --- a/engine/crates/layerfs-persistence/tests/kept_node.rs +++ b/engine/crates/layerfs-persistence/tests/kept_node.rs @@ -17,7 +17,7 @@ use layerfs_storage::StoragePolicy; use support::{branch_id, name, root, stack, Temp, BINDING}; fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn create(path: &std::path::Path) -> SqliteHandles { diff --git a/engine/crates/layerfs-persistence/tests/kept_node_closure.rs b/engine/crates/layerfs-persistence/tests/kept_node_closure.rs index 541a64a5ea..ab3e646520 100644 --- a/engine/crates/layerfs-persistence/tests/kept_node_closure.rs +++ b/engine/crates/layerfs-persistence/tests/kept_node_closure.rs @@ -20,7 +20,7 @@ use layerfs_storage::StoragePolicy; use support::{branch_id, name, root, stack, Temp, BINDING}; fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn create(path: &std::path::Path) -> SqliteHandles { diff --git a/engine/crates/layerfs-persistence/tests/kept_objects.rs b/engine/crates/layerfs-persistence/tests/kept_objects.rs index 4d2068dc57..c25913fae4 100644 --- a/engine/crates/layerfs-persistence/tests/kept_objects.rs +++ b/engine/crates/layerfs-persistence/tests/kept_objects.rs @@ -137,7 +137,7 @@ fn request(op: u8) -> CompactRequest { fn reopen(store: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(store.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), b"doctor-adversarial", [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/kept_objects_bounded.rs b/engine/crates/layerfs-persistence/tests/kept_objects_bounded.rs index aa39c68fc4..09e04e6b52 100644 --- a/engine/crates/layerfs-persistence/tests/kept_objects_bounded.rs +++ b/engine/crates/layerfs-persistence/tests/kept_objects_bounded.rs @@ -207,7 +207,7 @@ fn a_mark_finds_its_objects_among_many_blocks_of_locators() { .unwrap(); assert_eq!(receipt.path, CompactPath::Rebuild); let reopened = SqliteHandles::open_writable( - PersistenceConfig::sqlite(store).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(store).with_sqlite_profile(SqlitePersistenceProfile::Normal), b"doctor-adversarial", [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/kept_objects_edges.rs b/engine/crates/layerfs-persistence/tests/kept_objects_edges.rs index f36e0d6c06..bbc998ecbc 100644 --- a/engine/crates/layerfs-persistence/tests/kept_objects_edges.rs +++ b/engine/crates/layerfs-persistence/tests/kept_objects_edges.rs @@ -327,7 +327,7 @@ fn a_rebuild_at_block_edges_keeps_exactly_the_roots() { assert_eq!(receipt.path, CompactPath::Rebuild); let reopened = SqliteHandles::open_writable( PersistenceConfig::sqlite(store) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), b"doctor-adversarial", [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/kept_objects_sort_files.rs b/engine/crates/layerfs-persistence/tests/kept_objects_sort_files.rs index c5d97c6988..07a495c5ff 100644 --- a/engine/crates/layerfs-persistence/tests/kept_objects_sort_files.rs +++ b/engine/crates/layerfs-persistence/tests/kept_objects_sort_files.rs @@ -193,7 +193,7 @@ fn many_commits_and_packs_are_marked_through_bounded_lists() { .unwrap(); assert_eq!(receipt.path, CompactPath::Rebuild); let reopened = SqliteHandles::open_writable( - PersistenceConfig::sqlite(store).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(store).with_sqlite_profile(SqlitePersistenceProfile::Normal), b"doctor-adversarial", [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/layerstack_removal.rs b/engine/crates/layerfs-persistence/tests/layerstack_removal.rs index 19e7404b08..60e2b84f71 100644 --- a/engine/crates/layerfs-persistence/tests/layerstack_removal.rs +++ b/engine/crates/layerfs-persistence/tests/layerstack_removal.rs @@ -22,7 +22,7 @@ const CURSOR: [u8; 32] = [31; 32]; fn sqlite(path: std::path::PathBuf) -> PersistenceConfig { PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(SqlitePackLayout::GroupRowsIndexed) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables) } diff --git a/engine/crates/layerfs-persistence/tests/lineage_backfill.rs b/engine/crates/layerfs-persistence/tests/lineage_backfill.rs index d3f30df93d..8397172abb 100644 --- a/engine/crates/layerfs-persistence/tests/lineage_backfill.rs +++ b/engine/crates/layerfs-persistence/tests/lineage_backfill.rs @@ -101,7 +101,7 @@ fn make_old(path: &std::path::Path) { fn writable(path: &std::path::Path) -> SqliteHandles { SqliteHandles::open_writable( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/lineage_backfill_measure.rs b/engine/crates/layerfs-persistence/tests/lineage_backfill_measure.rs index b1691dcf78..8394f534af 100644 --- a/engine/crates/layerfs-persistence/tests/lineage_backfill_measure.rs +++ b/engine/crates/layerfs-persistence/tests/lineage_backfill_measure.rs @@ -12,7 +12,7 @@ fn open(path: &str, binding: &[u8]) -> f64 { let start = Instant::now(); let handles = SqliteHandles::open_writable( PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables), binding, [53; 32], @@ -34,5 +34,5 @@ fn backfill_on_a_store_copy() { .collect(); let migrating = open(&path, &binding); let plain = open(&path, &binding); - println!("LINEAGE_BACKFILL open_with_backfill_ms={migrating:.1} open_after_ms={plain:.1} profile=Disposable samples=1"); + println!("LINEAGE_BACKFILL open_with_backfill_ms={migrating:.1} open_after_ms={plain:.1} profile=Normal samples=1"); } diff --git a/engine/crates/layerfs-persistence/tests/merge_records.rs b/engine/crates/layerfs-persistence/tests/merge_records.rs index 5504d8493f..b75167c67b 100644 --- a/engine/crates/layerfs-persistence/tests/merge_records.rs +++ b/engine/crates/layerfs-persistence/tests/merge_records.rs @@ -16,7 +16,7 @@ use support::*; fn writable(path: &std::path::Path) -> SqliteHandles { SqliteHandles::open_writable( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/old_format_columns.rs b/engine/crates/layerfs-persistence/tests/old_format_columns.rs index 25de101ee1..db5990ce93 100644 --- a/engine/crates/layerfs-persistence/tests/old_format_columns.rs +++ b/engine/crates/layerfs-persistence/tests/old_format_columns.rs @@ -74,7 +74,7 @@ fn writable( path: &std::path::Path, ) -> Result { SqliteHandles::open_writable( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/old_format_open.rs b/engine/crates/layerfs-persistence/tests/old_format_open.rs index 1af9b679d7..2edc44cbdb 100644 --- a/engine/crates/layerfs-persistence/tests/old_format_open.rs +++ b/engine/crates/layerfs-persistence/tests/old_format_open.rs @@ -86,7 +86,7 @@ fn writable( path: &std::path::Path, ) -> Result { SqliteHandles::open_writable( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/pg_doctor/mod.rs b/engine/crates/layerfs-persistence/tests/pg_doctor/mod.rs index deb3e8cc2e..d8cd6d7ed8 100644 --- a/engine/crates/layerfs-persistence/tests/pg_doctor/mod.rs +++ b/engine/crates/layerfs-persistence/tests/pg_doctor/mod.rs @@ -42,7 +42,7 @@ impl Fixture { std::process::id(), NEXT.fetch_add(1, Ordering::Relaxed) ); - // The doctor fixture is a Disposable Store: it selects the commit mode + // The doctor fixture is a Normal Store: it selects the commit mode // itself instead of taking the product default, which is `local`. let selection = PostgresSelection::new(url, &schema) .with_synchronous_commit(layerfs_persistence::SynchronousCommit::Off); @@ -59,7 +59,7 @@ impl Fixture { assert_eq!( selection.synchronous_commit, layerfs_persistence::SynchronousCommit::Off, - "Disposable fixture" + "Normal fixture" ); let admin = Client::connect(&selection.url, NoTls).unwrap(); Some(Self { diff --git a/engine/crates/layerfs-persistence/tests/postgresql_commit_round_trips.rs b/engine/crates/layerfs-persistence/tests/postgresql_commit_round_trips.rs index 5e1615afef..9515ce1e28 100644 --- a/engine/crates/layerfs-persistence/tests/postgresql_commit_round_trips.rs +++ b/engine/crates/layerfs-persistence/tests/postgresql_commit_round_trips.rs @@ -318,7 +318,7 @@ fn commit_store_calls_are_counted_on_both_engines() { let temp = Temp::new("commit-round-trips"); let sqlite = SqliteHandles::create( PersistenceConfig::sqlite(temp.join("store")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &catalog(), ) diff --git a/engine/crates/layerfs-persistence/tests/postgresql_identical_ids.rs b/engine/crates/layerfs-persistence/tests/postgresql_identical_ids.rs index 4082e99748..000ce2ea39 100644 --- a/engine/crates/layerfs-persistence/tests/postgresql_identical_ids.rs +++ b/engine/crates/layerfs-persistence/tests/postgresql_identical_ids.rs @@ -28,7 +28,7 @@ const CURSOR: [u8; 32] = [29; 32]; fn sqlite(path: std::path::PathBuf) -> PersistenceConfig { PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(SqlitePackLayout::GroupRowsIndexed) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables) } diff --git a/engine/crates/layerfs-persistence/tests/seal_allocation.rs b/engine/crates/layerfs-persistence/tests/seal_allocation.rs index ca8b60a3de..5489e02a0d 100644 --- a/engine/crates/layerfs-persistence/tests/seal_allocation.rs +++ b/engine/crates/layerfs-persistence/tests/seal_allocation.rs @@ -77,7 +77,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn open(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( diff --git a/engine/crates/layerfs-persistence/tests/semantic_admission.rs b/engine/crates/layerfs-persistence/tests/semantic_admission.rs index 81bf8b11d9..6ed968e7d5 100644 --- a/engine/crates/layerfs-persistence/tests/semantic_admission.rs +++ b/engine/crates/layerfs-persistence/tests/semantic_admission.rs @@ -22,7 +22,7 @@ use support::Temp; fn handles(temp: &Temp) -> SqliteHandles { let mut config = PersistenceConfig::sqlite(temp.join("store")); - config.sqlite_profile = SqlitePersistenceProfile::Disposable; + config.sqlite_profile = SqlitePersistenceProfile::Normal; SqliteHandles::create( config, StoragePolicy::frozen_default(), diff --git a/engine/crates/layerfs-persistence/tests/serverless_store.rs b/engine/crates/layerfs-persistence/tests/serverless_store.rs index 0df655b938..c9cbd5f0e3 100644 --- a/engine/crates/layerfs-persistence/tests/serverless_store.rs +++ b/engine/crates/layerfs-persistence/tests/serverless_store.rs @@ -1,4 +1,4 @@ -//! Disposable serverless Store proofs through the real public provider. +//! Normal serverless Store proofs through the real public provider. mod support; use layerfs_content::{FinalizedObject, ObjectId, ObjectRole}; use layerfs_history::{HistoryCatalog, HistoryCatalogConfig, HistoryError, ReserveRequest}; @@ -25,7 +25,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn create(path: &Path) -> SqliteHandles { SqliteHandles::create(config(path), StoragePolicy::frozen_default(), &authority()).unwrap() @@ -172,14 +172,14 @@ fn disposable_create_publish_seal_and_reopen_all_layouts() { ) .unwrap(); let profile = handles.profile(); - assert_eq!(profile.identity, "sqlite-wal-off-v2"); + assert_eq!(profile.identity, "sqlite-wal-normal-v2"); assert_eq!( ( &*profile.journal_mode, profile.synchronous, profile.busy_timeout ), - ("wal", 0, 0) + ("wal", 1, 0) ); assert_eq!( ( diff --git a/engine/crates/layerfs-persistence/tests/signature_ring_order.rs b/engine/crates/layerfs-persistence/tests/signature_ring_order.rs index f6070ad543..9403c79c2d 100644 --- a/engine/crates/layerfs-persistence/tests/signature_ring_order.rs +++ b/engine/crates/layerfs-persistence/tests/signature_ring_order.rs @@ -55,7 +55,7 @@ fn a_wrapped_ring_reads_back_in_stamp_order_and_proposes_its_newest_entries() { let temp = support::Temp::new("signature-ring-order"); let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: b"signature-ring-order".to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/snapshot.rs b/engine/crates/layerfs-persistence/tests/snapshot.rs index db2d5687e8..10f7e4f12c 100644 --- a/engine/crates/layerfs-persistence/tests/snapshot.rs +++ b/engine/crates/layerfs-persistence/tests/snapshot.rs @@ -17,7 +17,7 @@ const CURSOR: [u8; 32] = [23; 32]; fn config(path: std::path::PathBuf) -> PersistenceConfig { PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(SqlitePackLayout::GroupRowsIndexed) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables) } @@ -83,7 +83,7 @@ fn live_store_snapshot_opens_with_exactly_the_saved_state() { assert_eq!(reported.last(), Some(&(snapshot.bytes, snapshot.bytes))); assert!(reported.iter().all(|(done, total)| done <= total)); assert_eq!(snapshot.path, temp.join("copy")); - assert_eq!(snapshot.profile, SqlitePersistenceProfile::Disposable); + assert_eq!(snapshot.profile, SqlitePersistenceProfile::Normal); assert_eq!( snapshot.bytes, std::fs::metadata(temp.join("copy")).unwrap().len() diff --git a/engine/crates/layerfs-persistence/tests/space_reclamation.rs b/engine/crates/layerfs-persistence/tests/space_reclamation.rs index c47c69d4c5..7cbe19a514 100644 --- a/engine/crates/layerfs-persistence/tests/space_reclamation.rs +++ b/engine/crates/layerfs-persistence/tests/space_reclamation.rs @@ -156,7 +156,7 @@ fn bounded_reclamation_preserves_another_live_operation_and_survives_reopen() { fn old_non_reclaimable_stores_are_opened_without_implicit_conversion() { let temp = Temp::new("old-reclamation-mode"); let path = temp.join("store.sqlite"); - let profile = SqlitePersistenceProfile::Disposable; + let profile = SqlitePersistenceProfile::Normal; let handles = SqliteHandles::create( config(&path, profile), StoragePolicy::frozen_default(), @@ -189,7 +189,7 @@ fn path_windows_use_actual_lengths_without_exceeding_column_or_row_budgets() { let temp = Temp::new("path-windows"); let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( - config(&path, SqlitePersistenceProfile::Disposable), + config(&path, SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &history(), ) @@ -236,8 +236,8 @@ fn path_windows_use_actual_lengths_without_exceeding_column_or_row_budgets() { assert_eq!(one.len(), 1); } -/// Owner direction 2026-10-07: Disposable is the sole active development +/// Owner direction 2026-11-23: Normal is the sole active development /// verification profile. Durable execution of these bodies is NOT_RUN — -/// deferred by owner for Disposable-only development. Durable support and its +/// deferred by owner for Normal-only development. Durable support and its /// retained historical receipts are unchanged. -const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Disposable]; +const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Normal]; diff --git a/engine/crates/layerfs-persistence/tests/sqlite_compact.rs b/engine/crates/layerfs-persistence/tests/sqlite_compact.rs index e4d6374a36..6a2a4c735b 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_compact.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_compact.rs @@ -28,7 +28,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(path.clone()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: BINDING.to_vec(), @@ -43,7 +43,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { fn reopen(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) @@ -1350,7 +1350,7 @@ fn create_with( let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(path.clone()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(layout) .with_sqlite_acquisition(acquisition), StoragePolicy::frozen_default(), diff --git a/engine/crates/layerfs-persistence/tests/sqlite_compact_capacity.rs b/engine/crates/layerfs-persistence/tests/sqlite_compact_capacity.rs index c93379f156..6e42e59402 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_compact_capacity.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_compact_capacity.rs @@ -20,7 +20,7 @@ //! `CAPACITY_DEAD_OBJECTS` (initial dead objects, default 6770), //! `CAPACITY_OBJECT_BYTES` (default 131071, the largest whole-file //! payload), `CAPACITY_RUNS` (default 3 per arm), `CAPACITY_DURABLE=1` (adds -//! one WAL/FULL rebuild after the WAL/OFF runs), `CAPACITY_KEEP=1` (keeps the +//! one WAL/FULL rebuild after the WAL/NORMAL runs), `CAPACITY_KEEP=1` (keeps the //! temporary Store) and `CAPACITY_OUT` (fixture path override). //! //! Fixture shape: every live file is the largest whole-file object (131071 B) @@ -74,7 +74,6 @@ fn env_u64(key: &str, default: u64) -> u64 { fn profile_label(profile: SqlitePersistenceProfile) -> &'static str { match profile { SqlitePersistenceProfile::Durable => "SqlitePersistenceProfile::Durable (WAL/FULL)", - SqlitePersistenceProfile::Disposable => "SqlitePersistenceProfile::Disposable (WAL/OFF)", SqlitePersistenceProfile::Normal => "SqlitePersistenceProfile::Normal (WAL/NORMAL)", } } @@ -523,7 +522,7 @@ fn capacity_measure() { // Build the live payload through the public APIs: whole-file objects reached // through an inode leaf and a filesystem root, published as a stack genesis. - let handles = create_store(&store, SqlitePersistenceProfile::Disposable); + let handles = create_store(&store, SqlitePersistenceProfile::Normal); let build_started = Instant::now(); let mut seed = 0u64; for group in 0..groups { @@ -562,7 +561,7 @@ fn capacity_measure() { // The `none` path at ~9%: mark only, repeated for the E3 median and range. let mut none_runs = Vec::new(); for run in 0..u8::try_from(runs_per_arm).expect("run count") { - let measured = measured(&store, SqlitePersistenceProfile::Disposable, 90 + run, 0); + let measured = measured(&store, SqlitePersistenceProfile::Normal, 90 + run, 0); assert_eq!(measured.path, "none", "~9% dead takes the none path"); eprintln!( "capacity_measure: none run {} -> {} us, dead {} B, shrink {} B", @@ -582,7 +581,7 @@ fn capacity_measure() { for run in 0..u8::try_from(runs_per_arm).expect("run count") { let (_crossed, added, seed) = cross_ten( &store, - SqlitePersistenceProfile::Disposable, + SqlitePersistenceProfile::Normal, dead_bytes, dead_seed, object_bytes, @@ -590,7 +589,7 @@ fn capacity_measure() { dead_seed = seed; let measured = measured( &store, - SqlitePersistenceProfile::Disposable, + SqlitePersistenceProfile::Normal, 100 + run, added, ); @@ -683,7 +682,7 @@ fn capacity_measure() { none_total, rebuild_dead, rebuild_total, - profile_label(SqlitePersistenceProfile::Disposable), + profile_label(SqlitePersistenceProfile::Normal), std::env::consts::OS, std::env::consts::ARCH, rustc_version(), @@ -851,7 +850,7 @@ fn the_peak_temp_receipt_covers_the_fresh_store_and_the_visited_scratch() { let temp = Temp::new("sqlite-compact-peak-temp"); let store = temp.join("store.sqlite"); - let handles = create_store(&store, SqlitePersistenceProfile::Disposable); + let handles = create_store(&store, SqlitePersistenceProfile::Normal); let mut seed = 0u64; for group in 0..GROUPS { let payloads: Vec> = (0..GROUP) @@ -865,7 +864,7 @@ fn the_peak_temp_receipt_covers_the_fresh_store_and_the_visited_scratch() { drop(handles); let sampler = FootprintSampler::start(&store); - let handles = reopen(&store, SqlitePersistenceProfile::Disposable); + let handles = reopen(&store, SqlitePersistenceProfile::Normal); let receipt = handles.compact(&request(0x7a)).expect("compaction"); let footprint = sampler.finish(); diff --git a/engine/crates/layerfs-persistence/tests/sqlite_compact_crash.rs b/engine/crates/layerfs-persistence/tests/sqlite_compact_crash.rs index 1bf8b72f77..ea4f8ae1b7 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_compact_crash.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_compact_crash.rs @@ -50,7 +50,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(path.clone()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: BINDING.to_vec(), @@ -65,7 +65,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { fn reopen(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/sqlite_compact_fixtures.rs b/engine/crates/layerfs-persistence/tests/sqlite_compact_fixtures.rs index e41df92b70..194d52d48f 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_compact_fixtures.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_compact_fixtures.rs @@ -87,7 +87,7 @@ fn request(op: u8) -> CompactRequest { fn reopen(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, CURSOR, ) diff --git a/engine/crates/layerfs-persistence/tests/sqlite_compact_matrix.rs b/engine/crates/layerfs-persistence/tests/sqlite_compact_matrix.rs index 5b7679fd38..d85c08b4b2 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_compact_matrix.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_compact_matrix.rs @@ -74,7 +74,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(path.clone()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: BINDING.to_vec(), @@ -89,7 +89,7 @@ fn create_store() -> (Temp, SqliteHandles, PathBuf) { fn reopen(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), BINDING, [71; 32], ) @@ -883,7 +883,7 @@ fn arm_measurement() { \"minMicros\": {},\n \"maxMicros\": {},\n \"deadBytesBound\": {},\n \ \"physicalShrink\": {},\n \"peakTempBytes\": {},\n \ \"liveRoots\": 20,\n \"deadPacks\": 20,\n \ - \"profile\": \"SqlitePersistenceProfile::Disposable (WAL/OFF)\",\n \ + \"profile\": \"SqlitePersistenceProfile::Normal (WAL/NORMAL)\",\n \ \"platform\": \"{}-{}\",\n \"rustc\": \"{}\"\n}}\n", runs.len(), runs[0].0, diff --git a/engine/crates/layerfs-persistence/tests/sqlite_compact_repack.rs b/engine/crates/layerfs-persistence/tests/sqlite_compact_repack.rs index 82a563e10e..2f432576b0 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_compact_repack.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_compact_repack.rs @@ -46,7 +46,7 @@ fn create(layout: SqlitePackLayout) -> (Temp, SqliteHandles, PathBuf) { let path = temp.join("store.sqlite"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(path.clone()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(layout) .with_sqlite_acquisition(SqliteAcquisitionSchema::default()), StoragePolicy::frozen_default(), @@ -63,7 +63,7 @@ fn create(layout: SqlitePackLayout) -> (Temp, SqliteHandles, PathBuf) { fn reopen(path: &Path, layout: SqlitePackLayout) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(layout) .with_sqlite_acquisition(SqliteAcquisitionSchema::default()), BINDING, diff --git a/engine/crates/layerfs-persistence/tests/sqlite_compact_values.rs b/engine/crates/layerfs-persistence/tests/sqlite_compact_values.rs index 9286d42cfe..c7eb4bb88d 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_compact_values.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_compact_values.rs @@ -257,7 +257,7 @@ fn initialize(handles: &SqliteHandles, tag: u8, genesis: ObjectId) { fn reopen(path: &Path) -> SqliteHandles { SqliteHandles::open_writable( PersistenceConfig::sqlite(path.to_path_buf()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), b"doctor-adversarial", [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/sqlite_group_rows.rs b/engine/crates/layerfs-persistence/tests/sqlite_group_rows.rs index 8bd188b028..cf0d0c0c7a 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_group_rows.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_group_rows.rs @@ -22,7 +22,7 @@ fn config() -> HistoryCatalogConfig { fn create(path: &std::path::Path) -> SqliteHandles { SqliteHandles::create( PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(SqlitePackLayout::GroupRows), StoragePolicy::frozen_default(), &config(), @@ -120,7 +120,7 @@ fn explicit_creation_reopens_declared_units_and_keeps_sparse_canonical_order() { drop(storage); drop(h); let reopened = SqliteHandles::open_read_only( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), &config().binding_key, config().cursor_key, ) diff --git a/engine/crates/layerfs-persistence/tests/sqlite_group_rows_indexed.rs b/engine/crates/layerfs-persistence/tests/sqlite_group_rows_indexed.rs index 1ebae4678e..4519b8505e 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_group_rows_indexed.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_group_rows_indexed.rs @@ -22,7 +22,7 @@ fn config() -> HistoryCatalogConfig { fn create(path: &std::path::Path, layout: SqlitePackLayout) -> SqliteHandles { SqliteHandles::create( PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(layout), StoragePolicy::frozen_default(), &config(), @@ -92,7 +92,7 @@ fn declared_layouts_reopen_without_mutating_or_promoting_their_schema() { let before = std::fs::read(&path).unwrap(); let h = SqliteHandles::open_read_only( PersistenceConfig::sqlite(&path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_pack_layout(SqlitePackLayout::GroupRowsIndexed), &config().binding_key, config().cursor_key, @@ -169,7 +169,7 @@ fn missing_covering_index_is_refused_at_open_without_automatic_repair() { drop(db); let before = std::fs::read(&path).unwrap(); assert!(SqliteHandles::open_read_only( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), &config().binding_key, config().cursor_key ) diff --git a/engine/crates/layerfs-persistence/tests/sqlite_inode_values.rs b/engine/crates/layerfs-persistence/tests/sqlite_inode_values.rs index 08e8ce0aff..0183744aef 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_inode_values.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_inode_values.rs @@ -20,7 +20,7 @@ use support::Temp; const BINDING: &[u8] = b"inode-values"; fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn create(path: &std::path::Path) -> SqliteHandles { SqliteHandles::create( diff --git a/engine/crates/layerfs-persistence/tests/sqlite_lock_custody.rs b/engine/crates/layerfs-persistence/tests/sqlite_lock_custody.rs index 2c9c480002..38f3f35f0f 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_lock_custody.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_lock_custody.rs @@ -69,7 +69,7 @@ impl Drop for RawWriter { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn reserve() -> Reserve { Reserve { diff --git a/engine/crates/layerfs-persistence/tests/sqlite_ordinal_lookahead.rs b/engine/crates/layerfs-persistence/tests/sqlite_ordinal_lookahead.rs index d424d9c04c..903f89e898 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_ordinal_lookahead.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_ordinal_lookahead.rs @@ -12,7 +12,7 @@ use layerfs_storage::{Storage, StoragePolicy}; fn create(path: &std::path::Path) -> SqliteHandles { SqliteHandles::create( PersistenceConfig::sqlite(path) - .with_sqlite_profile(layerfs_persistence::SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(layerfs_persistence::SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: b"ordinal-lookahead".to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/sqlite_publication.rs b/engine/crates/layerfs-persistence/tests/sqlite_publication.rs index 213756e959..317b9dd2bb 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_publication.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_publication.rs @@ -525,7 +525,7 @@ fn explicit_profiles_keep_atomic_publication_and_matching_reopen_contracts() { let profile = h.profile(); assert_eq!(profile.persistence, selected); assert_eq!(profile.journal_mode, "wal"); - assert_eq!(profile.synchronous, if selected == Durable { 2 } else { 0 }); + assert_eq!(profile.synchronous, if selected == Durable { 2 } else { 1 }); assert_eq!(profile.fullfsync, i64::from(selected == Durable)); assert_eq!((profile.checkpoint_fullfsync, profile.temp_store), (1, 2)); assert_eq!( @@ -635,9 +635,9 @@ fn multi_page_publication_preserves_first_wins_loss_order_and_late_failure_atomi } } -/// Owner direction 2026-10-07: Disposable is the sole active development +/// Owner direction 2026-11-23: Normal is the sole active development /// verification profile. Durable execution of these bodies is NOT_RUN — -/// deferred by owner for Disposable-only development. Durable support and its +/// deferred by owner for Normal-only development. Durable support and its /// retained historical receipts are unchanged. const DEVELOPMENT_PROFILES: [layerfs_persistence::SqlitePersistenceProfile; 1] = - [layerfs_persistence::SqlitePersistenceProfile::Disposable]; + [layerfs_persistence::SqlitePersistenceProfile::Normal]; diff --git a/engine/crates/layerfs-persistence/tests/sqlite_transaction_units.rs b/engine/crates/layerfs-persistence/tests/sqlite_transaction_units.rs index 1fc0582f28..a794f2bd26 100644 --- a/engine/crates/layerfs-persistence/tests/sqlite_transaction_units.rs +++ b/engine/crates/layerfs-persistence/tests/sqlite_transaction_units.rs @@ -7,7 +7,7 @@ use layerfs_storage::{Storage, StoragePolicy}; fn create(path: &std::path::Path) -> SqliteHandles { SqliteHandles::create( PersistenceConfig::sqlite(path) - .with_sqlite_profile(layerfs_persistence::SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(layerfs_persistence::SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: b"transaction-units".to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/store_diagnostic.rs b/engine/crates/layerfs-persistence/tests/store_diagnostic.rs index 99709111f6..379489242a 100644 --- a/engine/crates/layerfs-persistence/tests/store_diagnostic.rs +++ b/engine/crates/layerfs-persistence/tests/store_diagnostic.rs @@ -1,4 +1,4 @@ -//! Integrity diagnosis against real Disposable databases, including live WAL. +//! Integrity diagnosis against real Normal databases, including live WAL. mod support; use layerfs_content::{encode_whole_file_payload, FinalizedObject, ObjectRole}; use layerfs_history::HistoryCatalogConfig; @@ -18,7 +18,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &std::path::Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn observations(handles: &SqliteHandles, quick: bool) -> Vec { let mut result = Vec::new(); diff --git a/engine/crates/layerfs-persistence/tests/store_headroom.rs b/engine/crates/layerfs-persistence/tests/store_headroom.rs index fa5d46c8f5..3572afa6df 100644 --- a/engine/crates/layerfs-persistence/tests/store_headroom.rs +++ b/engine/crates/layerfs-persistence/tests/store_headroom.rs @@ -66,7 +66,7 @@ fn a_pack_batch_is_refused_while_the_margin_is_still_free() { ); let path = root.join("headroom-store.sqlite"); let h = SqliteHandles::create( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &config(), ) diff --git a/engine/crates/layerfs-persistence/tests/support/doctor.rs b/engine/crates/layerfs-persistence/tests/support/doctor.rs index f21e7de896..6923ce7210 100644 --- a/engine/crates/layerfs-persistence/tests/support/doctor.rs +++ b/engine/crates/layerfs-persistence/tests/support/doctor.rs @@ -1,4 +1,4 @@ -//! Persisted Disposable Doctor fixtures bypassing trusted Save only for corruption setup. +//! Persisted Normal Doctor fixtures bypassing trusted Save only for corruption setup. #![allow(dead_code)] use super::Temp; use layerfs_content::{FinalizedObject, ObjectId, ObjectRole}; @@ -29,7 +29,7 @@ impl Fixture { let temp = Temp::new("doctor-adversarial"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(temp.join("store.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), policy, &HistoryCatalogConfig { binding_key: b"doctor-adversarial".to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/support/marks.rs b/engine/crates/layerfs-persistence/tests/support/marks.rs index b3eb0a7a37..96473d0265 100644 --- a/engine/crates/layerfs-persistence/tests/support/marks.rs +++ b/engine/crates/layerfs-persistence/tests/support/marks.rs @@ -204,7 +204,7 @@ pub struct UnderBudget { fn open(path: &std::path::Path) -> SqliteHandles { SqliteHandles::open_writable( - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal), b"doctor-adversarial", [71; 32], ) diff --git a/engine/crates/layerfs-persistence/tests/support/mod.rs b/engine/crates/layerfs-persistence/tests/support/mod.rs index a3e20b280b..5eb3dac684 100644 --- a/engine/crates/layerfs-persistence/tests/support/mod.rs +++ b/engine/crates/layerfs-persistence/tests/support/mod.rs @@ -116,7 +116,7 @@ pub mod sqlite { ) -> HistoryResult { SqliteHandles::create( PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), config, ) @@ -130,7 +130,7 @@ pub mod sqlite { ) -> HistoryResult { SqliteHandles::open_read_only( PersistenceConfig::sqlite(path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), binding, cursor, ) diff --git a/engine/crates/layerfs-persistence/tests/thread_work.rs b/engine/crates/layerfs-persistence/tests/thread_work.rs index 3fd5d5090a..bf8587f4db 100644 --- a/engine/crates/layerfs-persistence/tests/thread_work.rs +++ b/engine/crates/layerfs-persistence/tests/thread_work.rs @@ -41,7 +41,7 @@ fn each_thread_counts_only_its_own_sql_work() { let temp = support::Temp::new("thread-work"); let handles = SqliteHandles::create( PersistenceConfig::sqlite(temp.join("store.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), StoragePolicy::frozen_default(), &HistoryCatalogConfig { binding_key: b"thread-work".to_vec(), diff --git a/engine/crates/layerfs-persistence/tests/writer_admission.rs b/engine/crates/layerfs-persistence/tests/writer_admission.rs index 96a8bf1122..c2e230eede 100644 --- a/engine/crates/layerfs-persistence/tests/writer_admission.rs +++ b/engine/crates/layerfs-persistence/tests/writer_admission.rs @@ -21,7 +21,7 @@ fn authority() -> HistoryCatalogConfig { } } fn config(path: &Path) -> PersistenceConfig { - PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Disposable) + PersistenceConfig::sqlite(path).with_sqlite_profile(SqlitePersistenceProfile::Normal) } fn create(path: &Path) -> SqliteHandles { SqliteHandles::create(config(path), StoragePolicy::frozen_default(), &authority()).unwrap() diff --git a/engine/crates/layerfs-project/examples/acquisition_profile.rs b/engine/crates/layerfs-project/examples/acquisition_profile.rs index 4862be4246..0d9c433ed2 100644 --- a/engine/crates/layerfs-project/examples/acquisition_profile.rs +++ b/engine/crates/layerfs-project/examples/acquisition_profile.rs @@ -115,7 +115,7 @@ fn main() -> Result<(), Box> { } let selected = match args[3].as_str() { "durable" => SqlitePersistenceProfile::Durable, - "disposable" => SqlitePersistenceProfile::Disposable, + "disposable" => SqlitePersistenceProfile::Normal, _ => return Err("explicit profile required".into()), }; let handles = SqliteHandles::create( diff --git a/engine/crates/layerfs-project/examples/benchmark_init.rs b/engine/crates/layerfs-project/examples/benchmark_init.rs index 3aeda8ca4c..72f1a961f7 100644 --- a/engine/crates/layerfs-project/examples/benchmark_init.rs +++ b/engine/crates/layerfs-project/examples/benchmark_init.rs @@ -46,7 +46,7 @@ fn main() -> Result<(), Box> { } let selected = match args.get(4).map(String::as_str).unwrap_or("durable") { "durable" => SqlitePersistenceProfile::Durable, - "disposable" => SqlitePersistenceProfile::Disposable, + "disposable" => SqlitePersistenceProfile::Normal, _ => return Err("explicit durable/disposable profile required".into()), }; let deadline_seconds = args diff --git a/engine/crates/layerfs-project/examples/durable_init_costs.rs b/engine/crates/layerfs-project/examples/durable_init_costs.rs index 26dd4daaa0..f0aaaddefe 100644 --- a/engine/crates/layerfs-project/examples/durable_init_costs.rs +++ b/engine/crates/layerfs-project/examples/durable_init_costs.rs @@ -120,7 +120,7 @@ fn main() -> Result<(), Box> { vfs::initialize(args.len() == 5)?; let selected = match args[3].as_str() { "durable" => SqlitePersistenceProfile::Durable, - "disposable" => SqlitePersistenceProfile::Disposable, + "disposable" => SqlitePersistenceProfile::Normal, _ => return Err("explicit profile required".into()), }; let creation = Instant::now(); diff --git a/engine/crates/layerfs-project/examples/verify_namespace.rs b/engine/crates/layerfs-project/examples/verify_namespace.rs index 8d93b64c04..f6114a396d 100644 --- a/engine/crates/layerfs-project/examples/verify_namespace.rs +++ b/engine/crates/layerfs-project/examples/verify_namespace.rs @@ -227,7 +227,7 @@ fn main() -> Result<(), Box> { let args: Vec<_> = std::env::args().collect(); if !matches!(args.len(), 7 | 8) { return Err( - "store history root-hex stack-body-hex manifest-tsv manifest-sha256 [durable|disposable] required".into(), + "store history root-hex stack-body-hex manifest-tsv manifest-sha256 [durable|normal] required".into(), ); } let raw = fs::read(&args[5])?; @@ -252,8 +252,8 @@ fn main() -> Result<(), Box> { .map_err(|_| "cursor key width")?; let selected = match args.get(7).map(String::as_str).unwrap_or("durable") { "durable" => SqlitePersistenceProfile::Durable, - "disposable" => SqlitePersistenceProfile::Disposable, - _ => return Err("explicit durable/disposable profile required".into()), + "normal" => SqlitePersistenceProfile::Normal, + _ => return Err("explicit durable/normal profile required".into()), }; let config = PersistenceConfig::sqlite(&args[1]).with_sqlite_profile(selected); // Provisioning order: a writable opener establishes missing WAL sidecars diff --git a/engine/crates/layerfs-project/src/store/init.rs b/engine/crates/layerfs-project/src/store/init.rs index 9ad3c57c53..446659e1f8 100644 --- a/engine/crates/layerfs-project/src/store/init.rs +++ b/engine/crates/layerfs-project/src/store/init.rs @@ -111,7 +111,7 @@ pub(crate) fn initialize( let result = (|| { if !request.store.sqlite_profile.permitted() { return Err(InitError::Manifest( - "explicit Normal or Disposable Store profile required", + "explicit Normal Store profile required", )); } check_destination( @@ -185,8 +185,8 @@ pub(crate) fn initialize( locator: request.locator.clone(), profile: match request.store.sqlite_profile { SqlitePersistenceProfile::Durable => StoreProfile::Durable, - SqlitePersistenceProfile::Disposable | SqlitePersistenceProfile::Normal => { - StoreProfile::Disposable + SqlitePersistenceProfile::Normal => { + StoreProfile::Normal } }, binding: request.catalog.binding_key.clone(), @@ -228,7 +228,7 @@ impl ProjectApi { Self } /// Imports the complete supported host tree, publishes genesis/Branch and seals. - /// An explicit Disposable profile is required before any Store creation. + /// An explicit Normal profile is required before any Store creation. pub fn init( &self, request: InitRequest, diff --git a/engine/crates/layerfs-project/src/store/install.rs b/engine/crates/layerfs-project/src/store/install.rs index c65ff1cb4a..c8e2e446ba 100644 --- a/engine/crates/layerfs-project/src/store/install.rs +++ b/engine/crates/layerfs-project/src/store/install.rs @@ -32,9 +32,9 @@ pub fn install_file( let mut accepted = false; let mut acknowledged = None; let result = (|| { - if manifest.profile != StoreProfile::Disposable || !store.profile.permitted() { + if manifest.profile != StoreProfile::Normal || !store.profile.permitted() { return Err(InstallError::Protocol(ControlError( - "explicit Normal or Disposable Store profile required", + "explicit Normal Store profile required", ))); } if manifest.daemon_sqlite.is_some() { diff --git a/engine/crates/layerfs-project/src/store/live.rs b/engine/crates/layerfs-project/src/store/live.rs index 1e3194edf5..3a8fdc9ccd 100644 --- a/engine/crates/layerfs-project/src/store/live.rs +++ b/engine/crates/layerfs-project/src/store/live.rs @@ -28,7 +28,7 @@ use std::{path::PathBuf, sync::Arc, time::Instant}; /// projects can be added to it later. #[derive(Debug)] pub struct CreateRequest { - /// New Store file, explicit Disposable profile; must not exist. For + /// New Store file, explicit Normal profile; must not exist. For /// [`super::ProjectApi::create_postgresql_store`], the PostgreSQL /// selection whose schema must not exist. pub store: StoreSelection, @@ -43,7 +43,7 @@ pub struct CreateRequest { pub struct AddRequest { /// Complete source directory, with no Git-ignore filtering. pub source: PathBuf, - /// The live Store: a SQLite file with the explicit Disposable profile, + /// The live Store: a SQLite file with the explicit Normal profile, /// or a PostgreSQL schema ([`StoreSelection::Postgres`]). pub store: StoreSelection, /// The Store's binding key. @@ -94,15 +94,15 @@ impl std::fmt::Display for AddFailure { } impl std::error::Error for AddFailure {} -/// The profile rule (Normal, or Disposable in a test) applies to a SQLite +/// The profile rule (Normal only) applies to a SQLite /// Store only; a PostgreSQL Store has no SQLite profile and passes. -fn disposable(store: &StoreSelection) -> Result<(), InitError> { +fn normal_profile(store: &StoreSelection) -> Result<(), InitError> { let StoreSelection::Sqlite(store) = store else { return Ok(()); }; if !store.sqlite_profile.permitted() { return Err(InitError::Manifest( - "explicit Normal or Disposable Store profile required", + "explicit Normal Store profile required", )); } Ok(()) @@ -110,7 +110,7 @@ fn disposable(store: &StoreSelection) -> Result<(), InitError> { /// Creates and seals one Store holding no project. pub(crate) fn create(request: CreateRequest) -> Result { - disposable(&request.store)?; + normal_profile(&request.store)?; let StoreSelection::Sqlite(config) = request.store else { return Err(InitError::Manifest("a Store file selection required")); }; @@ -128,7 +128,7 @@ pub(crate) fn add( ) -> Result> { let mut initialized = None; let result = (|| { - disposable(&request.store)?; + normal_profile(&request.store)?; let handles = Opened::writable(&request.store, &request.binding, request.cursor_key)?; let history = handles.history(); // A held name (live, retired or deleted) is refused before the folder diff --git a/engine/crates/layerfs-project/tests/complete_root.rs b/engine/crates/layerfs-project/tests/complete_root.rs index d1a3eb620b..c81d28d07d 100644 --- a/engine/crates/layerfs-project/tests/complete_root.rs +++ b/engine/crates/layerfs-project/tests/complete_root.rs @@ -226,9 +226,9 @@ fn real_host_profiles_acquire_and_reuse_the_exact_complete_root() { } } -/// Owner direction 2026-10-07: Disposable is the sole active development +/// Owner direction 2026-11-23: Normal is the sole active development /// verification profile. Durable execution of these bodies is NOT_RUN — -/// deferred by owner for Disposable-only development. Durable support and its +/// deferred by owner for Normal-only development. Durable support and its /// retained historical receipts are unchanged. #[cfg(target_os = "macos")] -const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Disposable]; +const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Normal]; diff --git a/engine/crates/layerfs-project/tests/init_postgresql.rs b/engine/crates/layerfs-project/tests/init_postgresql.rs index e4a2b43b0f..9a7112665d 100644 --- a/engine/crates/layerfs-project/tests/init_postgresql.rs +++ b/engine/crates/layerfs-project/tests/init_postgresql.rs @@ -132,7 +132,7 @@ fn a_folder_inits_into_postgresql_with_the_root_sqlite_gives() { let sqlite = || { StoreSelection::Sqlite( PersistenceConfig::sqlite(&file) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), ) }; api.create_store(CreateRequest { diff --git a/engine/crates/layerfs-project/tests/init_sqlite.rs b/engine/crates/layerfs-project/tests/init_sqlite.rs index bf8d74416a..5a732c91e3 100644 --- a/engine/crates/layerfs-project/tests/init_sqlite.rs +++ b/engine/crates/layerfs-project/tests/init_sqlite.rs @@ -177,8 +177,8 @@ fn a_store_inside_the_source_is_refused_before_an_operation_begins() { assert_eq!((owner.operation, owner.epoch), (1, 1)); } -/// Owner direction 2026-10-07: Disposable is the sole active development +/// Owner direction 2026-11-23: Normal is the sole active development /// verification profile. Durable execution of these bodies is NOT_RUN — -/// deferred by owner for Disposable-only development. Durable support and its +/// deferred by owner for Normal-only development. Durable support and its /// retained historical receipts are unchanged. -const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Disposable]; +const DEVELOPMENT_PROFILES: [SqlitePersistenceProfile; 1] = [SqlitePersistenceProfile::Normal]; diff --git a/engine/crates/layerfs-store-service/src/install.rs b/engine/crates/layerfs-store-service/src/install.rs index 33fbd23c5b..b6804aac41 100644 --- a/engine/crates/layerfs-store-service/src/install.rs +++ b/engine/crates/layerfs-store-service/src/install.rs @@ -209,8 +209,8 @@ pub fn install_local( cause: String::new(), }; let result = (|| { - if manifest.profile != StoreProfile::Disposable || manifest.daemon_sqlite.is_some() { - return Err("a sealed, not yet installed, Disposable Store is required".to_owned()); + if manifest.profile != StoreProfile::Normal || manifest.daemon_sqlite.is_some() { + return Err("a sealed, not yet installed, Normal Store is required".to_owned()); } let text = |error: io::Error| error.to_string(); prepare(destination)?; diff --git a/engine/crates/layerfs-store-service/src/store_service.rs b/engine/crates/layerfs-store-service/src/store_service.rs index 52085dc8d2..5cbdbb5c05 100644 --- a/engine/crates/layerfs-store-service/src/store_service.rs +++ b/engine/crates/layerfs-store-service/src/store_service.rs @@ -88,7 +88,7 @@ impl StoreService { /// Opens the installed Store at `store` for this process's Store calls. /// The kernel guard runs first, before any file is opened; then the - /// Store, selected Disposable explicitly, and the overlay template at + /// Store, selected Normal explicitly, and the overlay template at /// `template` (a local file, created here) for the calls' private /// Workspaces. No busy handler, retry or fsync: one more opener, as a /// daemon is. diff --git a/engine/crates/layerfs-store-service/tests/diff_replay.rs b/engine/crates/layerfs-store-service/tests/diff_replay.rs index f3fc5cff61..104d69139d 100644 --- a/engine/crates/layerfs-store-service/tests/diff_replay.rs +++ b/engine/crates/layerfs-store-service/tests/diff_replay.rs @@ -58,7 +58,7 @@ fn diff_replay() { permissions.set_readonly(false); std::fs::set_permissions(&path, permissions).unwrap(); let opened = open_store_observed( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), &binding, installed::CURSOR, OwnerConfig::default().namespaces, diff --git a/engine/crates/layerfs-store-service/tests/history_diff_oracle.rs b/engine/crates/layerfs-store-service/tests/history_diff_oracle.rs index 0423ad06ed..179d221a07 100644 --- a/engine/crates/layerfs-store-service/tests/history_diff_oracle.rs +++ b/engine/crates/layerfs-store-service/tests/history_diff_oracle.rs @@ -440,7 +440,7 @@ fn change_walk_equals_the_full_walk() { } } println!( - "DIFF_ORACLE seed={seed} diffs={} entries={} named_alike={} profile=Disposable", + "DIFF_ORACLE seed={seed} diffs={} entries={} named_alike={} profile=Normal", compared.0, compared.1, compared.2 ); drop(reader); diff --git a/engine/crates/layerfs-store-service/tests/merge_metadata_only.rs b/engine/crates/layerfs-store-service/tests/merge_metadata_only.rs index 94fe0eba05..ba123ceb01 100644 --- a/engine/crates/layerfs-store-service/tests/merge_metadata_only.rs +++ b/engine/crates/layerfs-store-service/tests/merge_metadata_only.rs @@ -115,7 +115,7 @@ fn view(fixture: &Fixture, branch: &str) -> BTreeMap { /// read through one fresh Store reader. fn branch_delta_applies(fixture: &Fixture, root: &str) -> u64 { let config = PersistenceConfig::sqlite(&fixture.host.config.path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable); + .with_sqlite_profile(SqlitePersistenceProfile::Normal); let handles = SqliteHandles::open_read_only(config, installed::BINDING, installed::CURSOR).unwrap(); let storage = Storage::new(handles.storage).unwrap(); diff --git a/engine/crates/layerfs-store-service/tests/merge_mixed_forms.rs b/engine/crates/layerfs-store-service/tests/merge_mixed_forms.rs index da556a2157..c04d8bd065 100644 --- a/engine/crates/layerfs-store-service/tests/merge_mixed_forms.rs +++ b/engine/crates/layerfs-store-service/tests/merge_mixed_forms.rs @@ -87,7 +87,7 @@ fn branch_root(fixture: &Fixture, branch: &str) -> String { /// Each path's metadata form, `inline` or `root`. fn forms(fixture: &Fixture, root: &str) -> BTreeMap { let config = PersistenceConfig::sqlite(&fixture.host.config.path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable); + .with_sqlite_profile(SqlitePersistenceProfile::Normal); let handles = SqliteHandles::open_read_only(config, installed::BINDING, installed::CURSOR).unwrap(); let storage = Storage::new(handles.storage).unwrap(); @@ -134,7 +134,7 @@ fn view(fixture: &Fixture, root: &str) -> BTreeMap { /// read through one fresh Store reader. fn branch_delta_applies(fixture: &Fixture, root: &str) -> u64 { let config = PersistenceConfig::sqlite(&fixture.host.config.path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable); + .with_sqlite_profile(SqlitePersistenceProfile::Normal); let handles = SqliteHandles::open_read_only(config, installed::BINDING, installed::CURSOR).unwrap(); let storage = Storage::new(handles.storage).unwrap(); diff --git a/engine/crates/layerfs-store-service/tests/operator_history.rs b/engine/crates/layerfs-store-service/tests/operator_history.rs index f668b8e5cb..8ec18badff 100644 --- a/engine/crates/layerfs-store-service/tests/operator_history.rs +++ b/engine/crates/layerfs-store-service/tests/operator_history.rs @@ -3,7 +3,7 @@ //! daemon, so the dsh project page starts no Sandbox to show a project. It //! lists the Branches, their Commits and the Layers, names the Branches the //! Workspaces are mounted on, and `since` its version answers `unchanged` -//! until what it shows moves. Disposable profile. +//! until what it shows moves. Normal profile. #[path = "support/installed_store.rs"] #[allow(dead_code)] mod installed; diff --git a/engine/crates/layerfs-store-service/tests/postgresql_round_trips.rs b/engine/crates/layerfs-store-service/tests/postgresql_round_trips.rs index 84fcbc81aa..13ac05db87 100644 --- a/engine/crates/layerfs-store-service/tests/postgresql_round_trips.rs +++ b/engine/crates/layerfs-store-service/tests/postgresql_round_trips.rs @@ -61,7 +61,7 @@ const READ: u32 = 128 * 1024; fn sqlite_statement_counts() { let dir = scratch("sqlite"); let config = PersistenceConfig::sqlite(dir.join("store.sqlite")) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables); let handles = SqliteHandles::create(config.clone(), StoragePolicy::frozen_default(), &catalog()).unwrap(); @@ -70,7 +70,7 @@ fn sqlite_statement_counts() { drop(storage); let sealed = handles.seal().unwrap(); let config = PersistenceConfig::sqlite(&sealed.path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable); + .with_sqlite_profile(SqlitePersistenceProfile::Normal); let session = SqliteHandles::open_read_only(config.clone(), BINDING, CURSOR).unwrap(); let work = session.storage.diagnostics().unwrap(); drop(session); diff --git a/engine/crates/layerfs-store-service/tests/refresh_lookups.rs b/engine/crates/layerfs-store-service/tests/refresh_lookups.rs index 0874986666..418c40e977 100644 --- a/engine/crates/layerfs-store-service/tests/refresh_lookups.rs +++ b/engine/crates/layerfs-store-service/tests/refresh_lookups.rs @@ -110,7 +110,7 @@ fn refresh_lookups() { let open = |overlay: &str| { let opened = open_store_observed( PersistenceConfig::sqlite(&path) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), &binding, installed::CURSOR, OwnerConfig::default().namespaces, diff --git a/engine/crates/layerfs-store-service/tests/relink_commit.rs b/engine/crates/layerfs-store-service/tests/relink_commit.rs index 6f32920fd2..9535e0d8b1 100644 --- a/engine/crates/layerfs-store-service/tests/relink_commit.rs +++ b/engine/crates/layerfs-store-service/tests/relink_commit.rs @@ -244,7 +244,7 @@ fn clean_relink_commit() { permissions.set_readonly(false); std::fs::set_permissions(&path, permissions).unwrap(); let opened = open_store_observed( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), &binding, installed::CURSOR, OwnerConfig::default().namespaces, diff --git a/engine/crates/layerfs-store-service/tests/replay_merges.rs b/engine/crates/layerfs-store-service/tests/replay_merges.rs index de2fbba4e6..945124dac1 100644 --- a/engine/crates/layerfs-store-service/tests/replay_merges.rs +++ b/engine/crates/layerfs-store-service/tests/replay_merges.rs @@ -96,7 +96,7 @@ fn recorded_branch_merges_merge_again() { .collect() }; let config = - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable); + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal); let owner_config = OwnerConfig::default(); let opened = open_store_observed( config, diff --git a/engine/crates/layerfs-store-service/tests/saved_branch_queries.rs b/engine/crates/layerfs-store-service/tests/saved_branch_queries.rs index 655836a6c8..68e8c37731 100644 --- a/engine/crates/layerfs-store-service/tests/saved_branch_queries.rs +++ b/engine/crates/layerfs-store-service/tests/saved_branch_queries.rs @@ -1,4 +1,4 @@ -//! Saved branch reads exercise actual Disposable Store history and provenance. +//! Saved branch reads exercise actual Normal Store history and provenance. #[path = "support/installed_store.rs"] #[allow(dead_code)] mod installed; diff --git a/engine/crates/layerfs-store-service/tests/scale_lineage_cap.rs b/engine/crates/layerfs-store-service/tests/scale_lineage_cap.rs index 3ddde057f1..0f9a45b8e3 100644 --- a/engine/crates/layerfs-store-service/tests/scale_lineage_cap.rs +++ b/engine/crates/layerfs-store-service/tests/scale_lineage_cap.rs @@ -5,7 +5,7 @@ //! (b) Layers between two sides; //! (c) fork from a Commit deep on its Branch's first-parent chain. //! Long histories are built through the catalog with real roots alternating, -//! so the SDK merge and publish at the end read real trees. Disposable profile. +//! so the SDK merge and publish at the end read real trees. Normal profile. #[path = "support/installed_store.rs"] #[allow(dead_code)] mod installed; @@ -239,7 +239,7 @@ fn a_commits_since_the_layer() { publishes.push((count, work)); } println!( - "SCALE_353a ancestry={walks:?} merge={merges:?} elapsed_ms={} profile=Disposable", + "SCALE_353a ancestry={walks:?} merge={merges:?} elapsed_ms={} profile=Normal", start.elapsed().as_millis() ); flat("ancestry", &walks); @@ -372,7 +372,7 @@ fn b_layers_between_two_sides() { let tail = operator::dispatch(&fixture.service, &call).unwrap(); assert_eq!(support::items(&tail).len(), 10, "{tail:?}"); assert_eq!(tail.get("hasMore"), Some(&SdkValue::Bool(false))); - println!("SCALE_353b ancestry={walks:?} merge={merges:?} publish_probe={publishes:?} publish_x={work:?} overwroteCount={:?} profile=Disposable", published.get("overwroteCount")); + println!("SCALE_353b ancestry={walks:?} merge={merges:?} publish_probe={publishes:?} publish_x={work:?} overwroteCount={:?} profile=Normal", published.get("overwroteCount")); flat("ancestry", &walks); flat("merge", &merges); flat("publish", &publishes); @@ -413,7 +413,7 @@ fn c_fork_from_a_deep_commit() { ); forks.push((count, fixture.since(before))); } - println!("SCALE_353c first_parent_depth={COUNTS:?} fork={forks:?} profile=Disposable"); + println!("SCALE_353c first_parent_depth={COUNTS:?} fork={forks:?} profile=Normal"); flat("fork", &forks); fixture.cleanup(); } diff --git a/engine/crates/layerfs-store-service/tests/sdk_branch_count.rs b/engine/crates/layerfs-store-service/tests/sdk_branch_count.rs index a924376a25..0be2e7c991 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_branch_count.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_branch_count.rs @@ -42,7 +42,7 @@ fn fork_and_branch_reads_are_independent_of_branch_count() { let stat = stat(); let read = fixture.since(before); assert_eq!(stat.get_text("type"), Some("file")); - println!("SDK_BRANCH_COUNT branches={count} fork={fork:?} stat={read:?} profile=Disposable cache=warm-repeat diagnostic_count_gate=true"); + println!("SDK_BRANCH_COUNT branches={count} fork={fork:?} stat={read:?} profile=Normal cache=warm-repeat diagnostic_count_gate=true"); observed.push((count, fork, read)); } let (_, fork_few, read_few) = observed[0]; diff --git a/engine/crates/layerfs-store-service/tests/sdk_compare.rs b/engine/crates/layerfs-store-service/tests/sdk_compare.rs index eec2ee0e76..b55da21915 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_compare.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_compare.rs @@ -49,7 +49,7 @@ fn wide_diff_pages_have_bounded_store_demand() { let beyond_work = fixture.since(before); assert!(items(&beyond).is_empty()); assert!(!beyond.get_bool("hasMore")); - println!("SDK_DIFF_WIDE files={count} first={first_work:?} second={second_work:?} beyond={beyond_work:?} profile=Disposable cache=uncontrolled diagnostic_count_gate=true"); + println!("SDK_DIFF_WIDE files={count} first={first_work:?} second={second_work:?} beyond={beyond_work:?} profile=Normal cache=uncontrolled diagnostic_count_gate=true"); observed.push((count, first_work, second_work, beyond_work)); fixture.cleanup(); } @@ -79,7 +79,7 @@ fn equal_roots_require_no_namespace_scan() { let demand = fixture.since(before); assert!(items(&result).is_empty()); assert!(!result.get_bool("hasMore")); - println!("SDK_DIFF_EQUAL files=2048 work={demand:?} profile=Disposable"); + println!("SDK_DIFF_EQUAL files=2048 work={demand:?} profile=Normal"); fixture.cleanup(); assert!( demand.object_batches <= 32, diff --git a/engine/crates/layerfs-store-service/tests/sdk_diff_size.rs b/engine/crates/layerfs-store-service/tests/sdk_diff_size.rs index f42d2c874c..6fbb8ac77b 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_diff_size.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_diff_size.rs @@ -87,7 +87,7 @@ fn diff_commits_is_independent_of_tree_size_and_history_depth() { let (work, measured_head) = diff_one(&fixture, &warmed, measured); last = measured_head; depth += 2; - println!("SDK_DIFF_SIZE files={} commits={target} diff={work:?} profile=Disposable cache=warm-after-sibling-diff diagnostic_count_gate=true", dirs * 30); + println!("SDK_DIFF_SIZE files={} commits={target} diff={work:?} profile=Normal cache=warm-after-sibling-diff diagnostic_count_gate=true", dirs * 30); observed.push((dirs, target, work)); } fixture.cleanup(); diff --git a/engine/crates/layerfs-store-service/tests/sdk_file_history.rs b/engine/crates/layerfs-store-service/tests/sdk_file_history.rs index 96ea0adc39..87cd1a878d 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_file_history.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_file_history.rs @@ -1,4 +1,4 @@ -//! Saved file queries over a real Disposable Store, without a daemon or UI model. +//! Saved file queries over a real Normal Store, without a daemon or UI model. #[path = "support/installed_store.rs"] #[allow(dead_code)] mod installed; diff --git a/engine/crates/layerfs-store-service/tests/sdk_fs_reads_replay.rs b/engine/crates/layerfs-store-service/tests/sdk_fs_reads_replay.rs index ea1fc23c3d..4d40cbe7ef 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_fs_reads_replay.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_fs_reads_replay.rs @@ -72,7 +72,7 @@ fn probe() -> Option { let dir = std::env::temp_dir().join(format!("lfs354-{}", std::process::id())); std::fs::create_dir_all(&dir).unwrap(); let opened = open_store_observed( - PersistenceConfig::sqlite(&store).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&store).with_sqlite_profile(SqlitePersistenceProfile::Normal), &manifest.binding, manifest.cursor_key, 64, @@ -884,7 +884,7 @@ fn reuse() { let manifest = StoreManifest::decode(manifest).unwrap(); let handles = layerfs_persistence::SqliteHandles::open_read_only( PersistenceConfig::sqlite(std::env::var_os("LFS354_STORE").unwrap()) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable), + .with_sqlite_profile(SqlitePersistenceProfile::Normal), &manifest.binding, manifest.cursor_key, ) diff --git a/engine/crates/layerfs-store-service/tests/sdk_grep_reads.rs b/engine/crates/layerfs-store-service/tests/sdk_grep_reads.rs index 0168c5466f..2bdf2ee598 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_grep_reads.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_grep_reads.rs @@ -58,7 +58,7 @@ fn grep_reads_each_root_once_whatever_its_size() { } let small = grep(&fixture, "/small.txt"); let large = grep(&fixture, "/large.txt"); - println!("SDK_GREP_READS small={small:?} large={large:?} large_bytes={} profile=Disposable cache=uncontrolled diagnostic_count_gate=true", text(2800, "large 2").len()); + println!("SDK_GREP_READS small={small:?} large={large:?} large_bytes={} profile=Normal cache=uncontrolled diagnostic_count_gate=true", text(2800, "large 2").len()); assert!(text(2800, "large 2").len() > 6 * 16384 && text(2800, "large 2").len() < 131072); assert_eq!( (small.object_batches, small.object_ids), diff --git a/engine/crates/layerfs-store-service/tests/sdk_history_depth.rs b/engine/crates/layerfs-store-service/tests/sdk_history_depth.rs index 60bf1adabd..446cbf622b 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_history_depth.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_history_depth.rs @@ -145,7 +145,7 @@ fn merge_and_publish_are_independent_of_history_depth() { ); let publish = round(&fixture, rounds); rounds += 1; - println!("SDK_HISTORY_DEPTH rounds={depth} ancestry={walks:?} merge={merge:?} publish={publish:?} profile=Disposable cache=warm-after-identical-probe diagnostic_count_gate=true"); + println!("SDK_HISTORY_DEPTH rounds={depth} ancestry={walks:?} merge={merge:?} publish={publish:?} profile=Normal cache=warm-after-identical-probe diagnostic_count_gate=true"); observed.push((depth, walks, merge, publish)); } let (_, walks_low, merge_low, publish_low) = observed[0]; diff --git a/engine/crates/layerfs-store-service/tests/sdk_project_count.rs b/engine/crates/layerfs-store-service/tests/sdk_project_count.rs index e7cae9fba3..d4a22c8e91 100644 --- a/engine/crates/layerfs-store-service/tests/sdk_project_count.rs +++ b/engine/crates/layerfs-store-service/tests/sdk_project_count.rs @@ -59,7 +59,7 @@ fn project_reads_are_independent_of_project_count() { let stat = stat(); let read = fixture.since(before); assert_eq!(stat.get_text("type"), Some("file")); - println!("SDK_PROJECT_COUNT projects={count} stat={read:?} profile=Disposable cache=warm-repeat diagnostic_count_gate=true"); + println!("SDK_PROJECT_COUNT projects={count} stat={read:?} profile=Normal cache=warm-repeat diagnostic_count_gate=true"); observed.push((count, read)); } let (_, few) = observed[0]; diff --git a/engine/crates/layerfs-store-service/tests/support/installed_store.rs b/engine/crates/layerfs-store-service/tests/support/installed_store.rs index 85d13828b7..1f4fcfc95d 100644 --- a/engine/crates/layerfs-store-service/tests/support/installed_store.rs +++ b/engine/crates/layerfs-store-service/tests/support/installed_store.rs @@ -77,7 +77,7 @@ impl Fixture { let count = build(&source); let sealed = store_directory.join("sealed.sqlite"); let config = PersistenceConfig::sqlite(&sealed) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables); let handles = SqliteHandles::create( config.clone(), @@ -150,7 +150,7 @@ impl Fixture { Self { directory, config: PersistenceConfig::sqlite(&installed) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable) + .with_sqlite_profile(SqlitePersistenceProfile::Normal) .with_sqlite_acquisition(SqliteAcquisitionSchema::Tables), branch: BranchId::from_authority([24; 16]), count, diff --git a/engine/crates/layerfs-store-service/tests/support/view.rs b/engine/crates/layerfs-store-service/tests/support/view.rs index a11e4c1a9f..c6d9f78899 100644 --- a/engine/crates/layerfs-store-service/tests/support/view.rs +++ b/engine/crates/layerfs-store-service/tests/support/view.rs @@ -38,7 +38,7 @@ pub struct Viewer { impl Viewer { pub fn open(store: &Path, binding: &[u8], cursor: [u8; 32]) -> Self { let config = PersistenceConfig::sqlite(store) - .with_sqlite_profile(SqlitePersistenceProfile::Disposable); + .with_sqlite_profile(SqlitePersistenceProfile::Normal); let handles = SqliteHandles::open_read_only(config, binding, cursor).unwrap(); Self { storage: Storage::new(handles.storage).unwrap(), diff --git a/engine/crates/layerfs-store-service/tests/write_cost.rs b/engine/crates/layerfs-store-service/tests/write_cost.rs index 7d6d0a043a..a64928679b 100644 --- a/engine/crates/layerfs-store-service/tests/write_cost.rs +++ b/engine/crates/layerfs-store-service/tests/write_cost.rs @@ -120,7 +120,7 @@ fn write_cost() { permissions.set_readonly(false); std::fs::set_permissions(&path, permissions).unwrap(); let opened = open_store_observed( - PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Disposable), + PersistenceConfig::sqlite(&path).with_sqlite_profile(SqlitePersistenceProfile::Normal), &binding, installed::CURSOR, OwnerConfig::default().namespaces, diff --git a/plugins/pi-layerfs/README.md b/plugins/pi-layerfs/README.md index 26cae71775..83548c544c 100644 --- a/plugins/pi-layerfs/README.md +++ b/plugins/pi-layerfs/README.md @@ -29,7 +29,7 @@ The built archive contains the plugin, the LayerFS packages, native binding and - The install prompt covers Linux x86_64. The `linux/arm64` archive built from the same commit also passed the plugin's real-host acceptance on an Apple Silicon Mac with OrbStack ([macOS notes](https://github.com/anyin233/pi-layerfs/blob/main/docs/macos.md)); no macOS archive is released. - LayerFS 1.1.0 can refuse to unmount a Workspace and keep it wedged ([#426](https://github.com/Ephemeral-AI-Lab/layerfs/issues/426)). The plugin avoids the deterministic trigger by waiting until a new Sandbox is 1.5 s old before mounting. The rarer variant can still occur after a timed-out command; start a new session if it does. -- LayerFS here uses a Disposable Store (WAL, `synchronous=OFF`): history persists across normal sessions but has no crash or power-loss durability. Keep another copy of irreplaceable source data. +- LayerFS here opens its Store with WAL and `synchronous=NORMAL`: history survives a process crash, but a kernel, VM or power failure can lose the commits since the last synchronized checkpoint, and no power-loss guarantee is claimed yet. Keep another copy of irreplaceable source data. - `edit` takes `{path, oldText, newText}`, not Pi's `edits[]`; `read` is bounded UTF-8 text. Binary files go through base64 in `layerfs_fs`. - Foreground commands cannot be aborted mid-run; cancellation waits for the command (or its timeout) to finish, then discards. A Workspace is not a security sandbox, and other extensions or direct host APIs can bypass the integration. - Initialization and removal locks have no automatic stale takeover; after a crash, recovery is manual and evidence is kept rather than deleted. diff --git a/tools/ci/gc-bench.md b/tools/ci/gc-bench.md index 940506ec2d..4e82ba98c2 100644 --- a/tools/ci/gc-bench.md +++ b/tools/ci/gc-bench.md @@ -47,8 +47,10 @@ longer "one whole-file object per pack and one genesis Layer per project": `object_bytes` (<= 131,071 B). Chunked files, extent trees, merges and retired Branches are not built; see the caveat below. -Only the Disposable (WAL/synchronous=OFF) profile is built and measured: owner -direction 2026-10-07 disabled Durable execution indefinitely. +The recorded receipts were built and measured with the former Disposable +(WAL/synchronous=OFF) profile; new runs use Normal (WAL/synchronous=NORMAL), the +only SQLite Store profile since owner direction 2026-11-23. Durable execution is +`NOT_RUN — disabled by owner until explicit reauthorization`. ## Scales @@ -209,8 +211,9 @@ is still synthetic. Read a receipt with these limits: reference and delta-base paths but do not reproduce a real sharing ratio. - **No merge, retired-Branch or `remove_file` history.** Those history edges and markers are covered by the contract tests, not by this timing fixture. -- **One profile.** Disposable (WAL/`synchronous=OFF`) only, per owner direction - 2026-10-07. +- **One profile.** The recorded receipts used the former Disposable + (WAL/`synchronous=OFF`) profile; new runs use Normal (WAL/`synchronous=NORMAL`) + per owner direction 2026-11-23; compare timings only within one profile. - **Small host sample.** The declared R730/PERC/rotational class is a single host; per-GB rates carry that class and the cold method. @@ -289,9 +292,10 @@ cache state; it is not this committed receipt. The committed fixture-B receipt declares or records: -- `profile`: `SqlitePersistenceProfile::Disposable` - `journal_mode=wal`, +- `profile`: the former `SqlitePersistenceProfile::Disposable` - `journal_mode=wal`, `synchronous=OFF` (the `synchronous_commit` equivalent), `page_size=4096` as - the creation profile sets it; + the creation profile set it (a new run records `SqlitePersistenceProfile::Normal`, + `synchronous=NORMAL`); - bytes written: per-run `processIo.writeBytes` (median 9,839,857,664 B for `rebuild`, 7,086,080 B for `none`) and `wchar`; - peak disk: `peakTempBytes` (9,836,421,120 B median) and `sampledTemp`; diff --git a/tools/worktree_run.py b/tools/worktree_run.py index 93370c42cd..99556068fd 100644 --- a/tools/worktree_run.py +++ b/tools/worktree_run.py @@ -106,7 +106,7 @@ def launch(args): "store_volume": prefix + "store", "command": command, "timeout_seconds": args.timeout, - "store_profile": "Disposable (SDK native route)", + "store_profile": "Normal (SDK native route)", "released": False, } receipt = directory / "receipt.json"