Storq logoStorq
docssafety-and-limitations.md
Edit / View on GitHub

Safety, Guarantees, and Limitations

Safe handling rules

  1. Treat format, page, and WAL inspection as read-only diagnostics.
  2. Never configure a fault injector against a production database.
  3. For destructive experiments, create a unique empty temporary directory and explicitly set isolated=true, disposable=true, and allow_destructive_operations=true.
  4. Make a verified backup before injecting faults. Keep the source separate from the target copy.
  5. Prefer memory storage for tests that do not need filesystem behavior.
  6. Keep workload expectations independent of database recovery output.
  7. Preserve the fault configuration, seed, operation trace, report, and environment when reproducing a result.

Storq's FaultInjector::create_test_copy() and path checks are intended to restrict destructive native file access to the authorized test root. Do not bypass the injected StorageFile and write the original database directly.

What analysis proves

  • A valid SQLite header means the inspected header passed implemented checks; it does not prove all SQL records or indexes are logically correct.
  • Page-analysis findings concern supported page structures and configured traversal limits. Unsupported or incomplete pages are not “valid”.
  • A SQLite WAL checksum/frame result describes bytes observed by the analyzer; it does not perform WAL recovery or establish which data reached hardware.
  • Storq CRC32C detects accidental/corrupt changes under the implemented checksum rules; it is not authentication or a cryptographic signature.
  • Recovery verification is only as independent and complete as the expected history, recovery executor, state inspector, and invariants supplied.
  • A forensic correlation or root-cause hypothesis is evidence-weighted analysis, not a guarantee of causation.

Simulation boundaries

Fault injection happens at the Storq storage-interface boundary. It cannot intercept writes made by another library/process directly to the file. A simulated sync failure does not prove earlier writes were lost. Virtual capacity limits are not physical disk-full events. Crash persistence behavior depends on the selected simulation model and does not model every filesystem, controller, device cache, or power-loss outcome.

The storage snapshot lock coordinates operations made through one StorageFile handle. It is not an atomic snapshot relative to other handles or processes and is not automatically a transactionally consistent database snapshot.

Current gaps

  • No standalone storq CLI or web dashboard.
  • The Python SDK does not expose advanced page/WAL analysis, fault injection, crash simulation, recovery verification, or forensics.
  • Several Python workflow steps for page/WAL analysis, snapshots, faults, crashes, recovery, and forensics raise NotImplementedError.
  • Built-in Python tests outside page_integrity() are capability placeholders, not subsystem tests.
  • Python workload generation produces operation/transaction descriptions; it is not, by itself, SQL execution or a database crash harness.
  • Python HashIndex exposes persistence methods only; native WAL exposes open/sync/LSN methods only.
  • Storq record/page/WAL/index code is experimental and lacks full transaction rollback/recovery guarantees.
  • storq.format.inspect(..., read_only=...) currently ignores that argument and performs the native read-only inspection.
  • TestConfig has fields such as retries, isolation, and cleanup policy that are not all implemented by the current Python TestSuite.
  • Successful OS-level sync requests do not guarantee physical hardware durability.

Optional Python dependencies

The core package has no mandatory runtime dependencies. The visualization extra installs matplotlib/plotly; the reports extra installs reportlab for PDF output. Missing optional features should produce the documented OptionalDependencyError or exporter error; they do not enable native reliability functions.