Expand description
§kobold-data-shim
A verifiable COBOL record-decoding shim for data-migration pipelines. Given a copybook and a
raw record dump, it answers “what did this COBOL record actually mean?” — byte-exactly —
by composing the oracle-proven gnucobol_rs courts:
COPYexpansion (gnucobol_rs::copybook,GNURUST.5/6),PIC→field model (gnucobol_rs::pic,GNURUST.3),- record layout / offsets (
gnucobol_rs::layout,GNURUST.4), - packed/zoned/display decode (
gnucobol_rs::Decimal,GNURUST.2).
Every numeric value this shim emits is decoded by a court that is proven byte-identical to
GnuCOBOL 3.2’s libcob under a differential sweep. Fields outside the sealed subset fail
closed — they are reported as unsupported, never silently guessed (the reconciliation signal
that migrations need).
§License
This crate’s source is Apache-2.0. It links gnucobol-rs, which is LGPL-3.0-or-later —
see NOTICE for the obligations that places on distributed binaries (relink-ability + notice).
Re-exports§
pub use bank_reconcile::bank_reconcile_report;pub use bank_reconcile::BankReconcileInputs;pub use bank_reconcile::BankReconcileReport;pub use banking::reconcile_banking;pub use banking::BankingResult;pub use banking::BankingSummary;pub use banking::ControlSpec;pub use banking::Variant;pub use banking::VariantSpec;pub use currency::currency_validate;pub use currency::CurrencyFieldProfile;pub use currency::CurrencyManifest;pub use currency::CurrencyProfile;pub use date_profile::date_validate;pub use date_profile::DateFieldProfile;pub use date_profile::DateFormat;pub use date_profile::DateManifest;pub use date_profile::DateProfile;pub use db2host::db2host_evaluate;pub use db2host::Db2HostResult;pub use db2host::IndicatorManifest;pub use db2host::IndicatorPair;pub use db2host::NullState;pub use diff::diff_artifacts;pub use diff::DiffInput;pub use diff::DiffReport;pub use diff::DiffTarget;pub use diff::OracleStatus;pub use extract::extract_manifest;pub use extract::ExtractManifest;pub use extract::ExtractMethod;pub use extract::ExtractProfile;pub use extract::FileOrganization;pub use extract::RecordLengthSource;pub use file::ingest;pub use file::ExitCode;pub use file::Ingest;pub use file::IngestPolicy;pub use file::PartialRecord;pub use file::TrailingNewline;pub use fixture::replay_fixture;pub use fixture::Fixture;pub use fixture::FixtureOutcome;pub use fixture::FixtureResult;pub use fixture::FixtureVerdict;pub use pilot::pilot_packet;pub use pilot::PilotArtifact;pub use pilot::PilotInputs;pub use pilot::PilotPacket;pub use posting::posting_manifest;pub use posting::PostingManifest;pub use posting::PostingProfile;pub use privacy::redact_record;pub use privacy::DefaultAction;pub use privacy::FieldRule;pub use privacy::RedactionAction;pub use privacy::RedactionPolicy;pub use privacy::RedactionResult;pub use recon2::reconcile_transform;pub use recon2::ReconTransformResult;pub use recon2::Transform;pub use recon2::TransformOp;pub use redefines::redefines_manifest;pub use redefines::RedefinesDiscriminator;pub use redefines::RedefinesManifest;pub use sentinel::sentinel_scan;pub use sentinel::SentinelManifest;pub use sentinel::SentinelMatch;pub use sentinel::SentinelProfile;pub use sentinel::SentinelRule;pub use tooling::tooling_export;pub use tooling::ToolingExport;pub use operator::control_totals;pub use operator::explain_field;pub use operator::DirtyMode;pub use operator::STALE_COPYBOOK_RISK;
Modules§
- bank_
reconcile - KOBOLD.BANK.RECONCILE.1 — opinionated generated operator view over existing evidence.
- banking
- KOBOLD.BANK.1 — header/detail/trailer banking court: declared-vs-observed control totals.
- batch_
chain - KOBOLD.BATCH.CHAIN.1 — tamper-evident batch custody chain.
- batch_
control - KOBOLD.BATCH.CONTROL.1 — header/trailer control-total validation.
- currency
- KOBOLD.CURRENCY.PROFILE.1 — declared currency/amount-profile evidence.
- date_
profile - KOBOLD.DATE.PROFILE.1 — declared date-format evidence.
- db2host
- KOBOLD.DB2HOST.1 — declared Db2 host-variable null/truncation indicator manifest.
- diff
- KOBOLD.DIFF.1 — structural comparison against a declared expected artifact.
- extract
- KOBOLD.EXTRACT.PROFILE.1 (CUSTODY.1) — declared extraction provenance + copybook freshness.
- file
- Fixed-record container ingest (
KOBOLD.FILE.1): split a raw byte stream into records of an explicit, caller-declared length, with stable offsets, named trailing/partial policies, a file-level audit, and stable exit codes. - fixture
- NIST-STYLE-FIXTURE-FORMAT.1 — a small, named, replayable fixture format for KOBOLD/GNURUST courts.
- operator
- Operator trust layer (
KOBOLD.OPERATOR.1): make every decoded field accountable. - pilot
- KOBOLD.PILOT-PACKET.1 — a hash-bound PILOT evidence packet for a reviewer/operator.
- posting
- KOBOLD.POSTING.1 — declared posting-unit custody manifest.
- privacy
- KOBOLD.PRIVACY.REDACTION.1 — declared evidence-preserving redaction.
- recon
- End-to-end fixed-record reconciliation (
KOBOLD.RECON.1). - recon2
- KOBOLD.RECON.2 — declared transformed-record reconciliation.
- redefines
- KOBOLD.LAYOUT.REDEFINES.2 — explicit overlapping-view manifest.
- sentinel
- KOBOLD.SENTINEL.PROFILE.1 — declared sentinel-marker evidence.
- sha256
- A small, dependency-free SHA-256 (FIPS 180-4), for byte-stable audit hashes. Independent implementation; this file, like the rest of this crate, is Apache-2.0.
- tooling
- KOBOLD.TOOLING.EXPORT.1 — generated evidence export for downstream tools (IDE / LSP / auditor UI / migration dashboard).
- variant
- KOBOLD.VARIANT.1 — header/detail/trailer record-discriminator routing.
Structs§
- Decoded
Condition - A decoded LEVEL-88 condition: its truth (or an error marker) for the current record.
- Decoded
Field - A decoded elementary field.
- Decoded
Record - A fully decoded record: its fields and condition-name truths.
- NoCopy
- A resolver that finds nothing (for copybooks with no nested
COPY).
Enums§
- Encoding
- The record’s declared character encoding (
KOBOLD.DATA.3). Never auto-detected — the caller states it.Cp500decodes alphanumeric DISPLAY fields through the sealedGNURUST.15table; binary and packed fields are raw storage domains and are never text-converted. - Shim
Error - What went wrong decoding a record against a copybook.
Traits§
- Copy
Resolver - Re-exported so callers can implement a custom copybook search path for
decode_with_resolver. Resolves a copybook name to its source text (the caller owns the search path / filesystem; the expander itself is pure given a resolver).
Functions§
- decode
- Decode a record against a copybook with no nested
COPY. - decode_
all - Decode a buffer of fixed-length records into one
DecodedRecordper record (fields + conditions). A higher-level iterator overdata.chunks(record_len); a trailing partial record is decoded as-is (its short fields are reportedunsupported, never guessed). - decode_
record - Decode a record into its fields and its LEVEL-88 condition-name truths (
eval_88), as native ASCII. For EBCDIC, usedecode_record_encoded. - decode_
record_ encoded - Decode a record under an explicit
Encoding(KOBOLD.DATA.3). UnderEncoding::Cp500, alphanumeric DISPLAY fields (and the parent bytes feedingeval_88) are decoded through the sealedGNURUST.15cp500 table; binary/packed fields pass through as raw storage. - decode_
with_ resolver - Decode
recordagainst acopybook(data-division item lines, possibly withCOPY), usingresolverto find copybooks. Returns oneDecodedFieldper named item (groups included).