From 388e94ae80ac4f12e13efcee4f98b3309321de39 Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Fri, 20 Feb 2026 19:13:45 +0200 Subject: [PATCH 1/2] info() should always be read-only --- CHANGELOG.md | 4 ++++ haiku_rag_slim/haiku/rag/app.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb26db15..124ccdc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog ## [Unreleased] +### Fixed + +- **`info` command**: Open database in read-only mode to prevent write failures on read-only filesystems + ## [0.31.0] - 2026-02-20 ### Added diff --git a/haiku_rag_slim/haiku/rag/app.py b/haiku_rag_slim/haiku/rag/app.py index 33c82d64..7ab6ff14 100644 --- a/haiku_rag_slim/haiku/rag/app.py +++ b/haiku_rag_slim/haiku/rag/app.py @@ -80,10 +80,16 @@ class HaikuRAGApp: # pragma: no cover versions = get_package_versions() - # Get comprehensive table statistics (this also runs migrations) from haiku.rag.store.engine import Store - store = Store(self.db_path, config=self.config, skip_validation=True) + store = Store( + self.db_path, + config=self.config, + skip_validation=True, + read_only=True, + skip_migration_check=True, + before=self.before, + ) table_stats = store.get_stats() # Read settings after Store init (migrations have run) From b23f99af06a59df292465ae611cf11a88387b0bf Mon Sep 17 00:00:00 2001 From: Yiorgis Gozadinos Date: Fri, 20 Feb 2026 19:14:48 +0200 Subject: [PATCH 2/2] Fix history too --- CHANGELOG.md | 2 +- haiku_rag_slim/haiku/rag/app.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 124ccdc1..f45dd049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ### Fixed -- **`info` command**: Open database in read-only mode to prevent write failures on read-only filesystems +- **`info` and `history` commands**: Open database in read-only mode to prevent write failures on read-only filesystems ## [0.31.0] - 2026-02-20 diff --git a/haiku_rag_slim/haiku/rag/app.py b/haiku_rag_slim/haiku/rag/app.py index 7ab6ff14..4b2c0f15 100644 --- a/haiku_rag_slim/haiku/rag/app.py +++ b/haiku_rag_slim/haiku/rag/app.py @@ -205,7 +205,14 @@ class HaikuRAGApp: # pragma: no cover self.console.print("[red]Database path does not exist.[/red]") return - store = Store(self.db_path, config=self.config, skip_validation=True) + store = Store( + self.db_path, + config=self.config, + skip_validation=True, + read_only=True, + skip_migration_check=True, + before=self.before, + ) tables = ["documents", "chunks", "settings"] if table: