Expand description
§kobold-csv – forensic CSV/delimited evidence for COBOL record migration
Export raw COBOL records + their copybook into deterministic delimited (CSV/|/TSV) text that preserves
both the semantic value AND the storage truth (pic / offset / length / raw_hex /
copybook_hash / record_hash / findings), parse a Compact extract back into the exact record bytes,
prove the round trip, and compute the batch control totals banks reconcile on. Parsing and
re-encoding are fail-closed: a value too long for its field, a non-numeric value into a numeric
field, a header that does not match the copybook, or a malformed quoted cell yields a model::Finding
– never a silent truncation, coercion, or best-effort guess.
§Non-claim
kobold-csv is clean-room and zero-libcob. It links no COBOL runtime, contains no libcob-derived or
GnuCOBOL-derived code, and depends on no crate at all (std-only) – in particular not on gnucobol-rs,
gnucobol-rs-json, kobold-json, or kobold-xml. It is NOT a generic CSV library and NOT a
GnuCOBOL 3.2 parity claim. It answers “what should forensic delimited-file evidence for a COBOL record
migration / reconciliation / ETL review look like?” Evidence here is the COURT_NAMESPACE
(KOBOLD.CSV.*) court.
§Courts
KOBOLD.CSV.EXPORT.1–export::export: records + copybook -> delimited evidence (Compact / Audit / Evidence).KOBOLD.CSV.PARSE.1–parse::parse_into: a Compact extract + copybook -> reconstructed record bytes (fail-closed).KOBOLD.CSV.ROUNDTRIP.1–parse::roundtrip: records -> Compact CSV ->parse_into-> identical bytes (or an honest per-record non-roundtrip finding).KOBOLD.CSV.DIFF.1–diff::diff: row/field-wise differences between a source and target table.KOBOLD.CSV.CONTROLTOTAL.1–controltotal::control_totals: exact integer-scaled field sums + record count – the batch control totals a reconciliation balances on.
Quoting (KOBOLD.CSV.ESCAPE) is RFC-4180 style and lives in dialect; the writer and the fail-closed
dialect::parse_row reader are exact inverses. SHA-256 is the pure-Rust sha256 module.
Re-exports§
pub use controltotal::control_totals;pub use controltotal::ControlTotal;pub use diff::diff;pub use diff::parse_table;pub use diff::DiffEntry;pub use diff::DiffReport;pub use diff::Table;pub use dialect::parse_row;pub use dialect::write_field;pub use dialect::write_row;pub use dialect::Dialect;pub use dialect::LineTerminator;pub use export::export;pub use export::Mode;pub use model::Copybook;pub use model::DecodedField;pub use model::FieldDecl;pub use model::FieldKind;pub use model::Finding;pub use parse::parse_into;pub use parse::roundtrip;pub use parse::RoundtripRecord;pub use parse::RoundtripReport;
Modules§
- controltotal
KOBOLD.CSV.CONTROLTOTAL.1– the reconciliation killer feature.- dialect
- The delimited-file DIALECT layer – what makes kobold-csv CSV-aware.
- diff
KOBOLD.CSV.DIFF.1– a row/field-wise diff between two parsed delimited tables.- export
KOBOLD.CSV.EXPORT.1– build forensic delimited (CSV) evidence from raw COBOL records + their copybook.- model
- The clean-room COBOL-record data model for kobold-csv.
- parse
KOBOLD.CSV.PARSE.1+KOBOLD.CSV.ROUNDTRIP.1(FAIL-CLOSED) – parse a COMPACT extract back into record bytes, and prove the round trip.- sha256
- A small, pure-Rust SHA-256 – used for
copybook_hash/record_hashin theKOBOLD.CSV.EXPORT.1Evidence packet. No crate dependency;#![forbid(unsafe_code)]-clean.
Constants§
- COURT_
NAMESPACE - The court namespace this crate’s evidence is filed under.