Central round-trippable codec: parse + to_keydb_cfg in one place. Emits HC, DK, PK, then disc entries sorted by hash. Round-trip test (parse -> serialize -> re-parse) covers HC/DK/PK/disc. disc_id -> vid names the field for what it is (the I-field volume ID).