Skip to main content

Module check

Module check 

Source
Expand description

slab check subcommand — validate slabtastic file structure.

Performs three validation passes:

  1. Index-driven — iterates page entries from the pages page, reads each data page, and validates: magic bytes, page type, version, footer length, header/footer page_size agreement, page_size minimum (512), record count consistency, offset array bounds, ordinal monotonicity, and index/page ordinal agreement.

  2. Forward traversal — walks the file from offset 0 using header page_size fields, validating each page structurally without relying on the index. Checks that the last page is a Pages type and that the traversal exactly covers the file length.

  3. Cross-check — verifies every index entry offset appears in the forward traversal, and that all forward-traversal data pages are accounted for in the index.

Functions§

run
Run the check subcommand.