Skip to content

fix(memory): auto-create parent directories for sqlite_path#757

Merged
bug-ops merged 1 commit intomainfrom
fix/756-auto-create-data-dir
Feb 23, 2026
Merged

fix(memory): auto-create parent directories for sqlite_path#757
bug-ops merged 1 commit intomainfrom
fix/756-auto-create-data-dir

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 23, 2026

Summary

  • SqliteStore::new() now calls create_dir_all on the parent directory before opening the SQLite connection
  • Added Io variant to MemoryError for std::io::Error propagation
  • Prevents startup crash when data/ directory does not exist (default config uses ./data/zeph.db)

Test plan

  • New creates_parent_dirs test — verifies nested directory creation
  • cargo +nightly fmt --check — pass
  • cargo clippy --workspace -- -D warnings — pass
  • cargo nextest run -p zeph-memory --lib --features mock — 253/253 pass

Closes #756

SqliteStore::new() now calls create_dir_all on the parent directory
before opening the database connection, preventing startup failures
when the configured path (e.g. ./data/zeph.db) has missing parent
directories.

Closes #756
@github-actions github-actions bot added bug Something isn't working size/S documentation Improvements or additions to documentation memory Persistence and memory rust and removed size/S labels Feb 23, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 23, 2026 00:46
@bug-ops bug-ops merged commit 6c2ed04 into main Feb 23, 2026
20 checks passed
@bug-ops bug-ops deleted the fix/756-auto-create-data-dir branch February 23, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation memory Persistence and memory rust

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-create parent directory for sqlite_path

1 participant