Storq logoStorq
docsreliability-modules.md
Edit / View on GitHub

Reliability Features Available in Python

Storq includes reliability-related implementation beyond what its Python SDK currently exposes. Install and use the SDK with pip as described in Install and Use Storq. The following boundaries are important when writing Python applications.

Available Python operations

SQLite format inspection

storq.inspect_format(path) returns basic format, file-size, page-size, page-count, header-validity, and structure-validity information. This is a read-only inspection; it does not repair the file or validate every SQL record and index.

Storq format and records

storq.create_storq_database(path, page_size) creates an experimental Storq-format file. storq.inspect_storq_database(path) checks its header and metadata page. storq.RecordManager(path) provides open, close, insert, read, update, delete, and exists.

These features are for Storq-owned experimental files, not for modifying or repairing SQLite databases. Record operations are not transactions and are not automatically journaled.

Workload descriptions and callback benchmarks

storq.TransactionGenerator creates transaction descriptions; it does not execute SQL or replay those transactions against a database. storq.TransactionOracle stores independently supplied expected outcomes. storq.Benchmark measures the Python callback passed to its run() method; its database/profile metadata does not make it generate or execute SQL.

Phase 8 disposable fault scenarios

storq.run_fault_scenario() runs caller-controlled workloads against an isolated copy and records deterministic truncate, byte-corruption, and interruption simulations plus diagnosis and evidence hashes. It does not intercept unrelated processes or prove physical power-loss durability.

storq.generate_sqlite_fixtures() creates healthy, truncated, malformed, WAL-backed, and backup SQLite fixtures in a disposable directory.

Not exposed or not implemented through Python

The installed Python package does not currently provide APIs for:

  • General SQLite repair or arbitrary-schema recovery
  • Physical power-loss guarantees
  • Recovery verification or automated repair
  • Executing generated transactions as a fault/crash/recovery harness
  • A complete transactional Storq database engine

Python workflow builders contain names for several of these operations, but the corresponding steps raise NotImplementedError or act as placeholders. Built-in testing helpers other than page_integrity() are also capability placeholders, not subsystem tests. Do not treat a successful placeholder as evidence that a reliability operation ran.

Safe handling

  • Inspect valuable SQLite databases with the read-only Python format inspection API.
  • Use a separate verified backup before experimenting with Storq-format files.
  • Keep corrupted or otherwise destructive test files disposable.
  • Restore a verified backup after corruption; Storq does not currently reconstruct damaged bytes.
  • Interpret simulation or report output as evidence from the implemented operation only, not as a guarantee about physical devices or persistence.