From 72d95dee117495a9cd2349a6b9a1cd1fa85cea39 Mon Sep 17 00:00:00 2001 From: Kevin Janssen Date: Wed, 18 Nov 2026 10:11:02 +0100 Subject: [PATCH] Keep Windows intent and diagnostic databases read-only with rusqlite 0.41 --- crates/agent-core/examples/windows_sync_history.rs | 2 +- crates/agent-windows/src/helper_intent.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/agent-core/examples/windows_sync_history.rs b/crates/agent-core/examples/windows_sync_history.rs index ade58ba..8c10425 100644 --- a/crates/agent-core/examples/windows_sync_history.rs +++ b/crates/agent-core/examples/windows_sync_history.rs @@ -62,7 +62,7 @@ impl Snapshot { let db = Connection::open_with_flags(path, OpenFlags::SQLITE_OPEN_READ_ONLY)?; db.execute_batch("PRAGMA query_only=ON; PRAGMA trusted_schema=OFF; BEGIN;")?; ensure!( - db.is_readonly(rusqlite::DatabaseName::Main)?, + db.is_readonly(rusqlite::MAIN_DB)?, "read-only database required" ); Ok(Self { db, _held: handles }) diff --git a/crates/agent-windows/src/helper_intent.rs b/crates/agent-windows/src/helper_intent.rs index df76e3f..ac9c0b1 100644 --- a/crates/agent-windows/src/helper_intent.rs +++ b/crates/agent-windows/src/helper_intent.rs @@ -237,7 +237,7 @@ impl Store { pub fn open_empty_history_snapshot() -> Result { let store = Self::open(false)?; ensure!( - store.db.is_readonly(rusqlite::DatabaseName::Main)?, + store.db.is_readonly(rusqlite::MAIN_DB)?, "read-only intent snapshot required" ); store