Selected works complete text

Unmatched Ledger Repair

A small ingestion repair prompted by a large, repetitive file.

The Codex tier-one importer kept unmatched session paths in an append-only JSONL ledger. Repeated rebuilds appended the same unresolved paths again: the live ledger had 2,720,729 rows but only 8,373 distinct records, occupying about 382 MiB.

The importer now treats this as state, not history:

Two focused tests cover incremental deduplication and full-rebuild replacement. Applying the repair to the live ledger reduced it from 399,947,163 bytes to 1,230,831 bytes while preserving all 8,373 unique records. This does not decide whether an unmatched session is valuable; it only stops repeated scans from manufacturing duplicate evidence.