Files
turso/core/mvcc/persistent_storage
Sushant Dinesh e0d40b9d70 core/mvcc: annotate and instrument logical-log durability invariants
Capture the logical-log and MVCC crash-recovery durability invariants as
opt-in aristo-instr accessors a fault-injection conformance harness needs
to observe private LogicalLog state:

  logical_log_header_publish_after_fsync            write_header
  logical_log_inmemory_offset_advances_after_durable_write
                                                    advance_offset_after_success
  logical_log_pending_crc_cleared_on_abort          discard_pending_log_write
  logical_log_shadow_offset_matches_durable         Storage::truncate
  logical_log_truncate_crc_reseed_after_completion  LogicalLog::truncate
  mvcc_recovered_schema_record_wellformed           sqlite_schema_btree_identity
  mvcc_recovery_total_on_committed_log              recover_process_frame

The annotations are natural-language behavioral specs (five bind to the
aretta canon). The instrumentation — Inspect projections for
LogicalLog.header / pending_running_crc, a read_logicallog_offset_crc
accessor, and expose_pub(new_for_test) on LogRecord::new — lives behind a
new aristo-instr cargo feature, off by default, so production builds carry
zero instrumentation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 09:20:00 +00:00
..