Skip to content

tet verify & repair

Check and repair .tet file integrity.

tet verify

Verify layout, catalog, chunk index, payloads, and footer.

bash
tet verify [OPTIONS] <PATH>
FlagEffect
(default)Human-readable check list + summary (decodes up to 128 chunks on large files)
--deepDecode every chunk payload
--repairAfter verify, apply safe in-place repairs
--jsonPretty JSON report (automation / CI)
-q, --quietOne line (status=ok / failed)

Exit code 1 when verification fails (CI-friendly).

Examples

bash
# Quick scan
tet verify data.tet

# Full decode (large files)
tet verify --deep data.tet -q

# JSON report for CI
tet verify data.tet --json

# Verify and auto-repair
tet verify data.tet --repair

What verify checks

  • Superblock magic and version fields
  • Dataset directory structure and record counts
  • Chunk index header and entry bounds
  • Payload offsets and byte lengths
  • Optional decode integrity (sample or full with --deep)
  • Dataset tensor-byte cross-check
  • Footer/metadata limits when THST flag is set

tet repair

Plan or apply safe in-place fixes from verify recommendations.

bash
tet repair [OPTIONS] <PATH>
FlagEffect
(default)Plan from verify recommendations (no writes)
--apply CODEApply fix (repeatable); today: footer_invalid
--dry-runWith --apply, show changes without writing
--jsonPretty JSON plan or repair report

Examples

bash
# Show repair plan
tet repair data.tet

# Apply footer fix
tet repair data.tet --apply footer_invalid

# Dry run
tet repair data.tet --apply footer_invalid --dry-run

Currently supported repair: footer_invalid — truncate after chunk payloads when the THST JSON is corrupt.

In Rust: verify_tet_file, repair_tet_file.

Latka Industries