Truthound · Schema and type contracts · 6/6
Preserve field names, types and key semantics across versions.
119 articles
Pydantic Decimal JSON Schema: aligning scientific notation with the consumer contract
Separate numeric-accuracy requirements from permitted string notation. Consumers then get a compatibility choice instead of an unnecessary change to the value.
Pydantic bytes schemas: separating input decoding from output serialization
Separate input and output directions in the API documentation so client and server do not expect different byte representations.
Pydantic alias and extra collisions: deciding which validated value owns the output key
Allowing extra input should not silently transfer ownership of a validated field's output key. Define collision handling explicitly.
SPSS to Parquet: preserving metadata instead of clearing attrs to make a write succeed
Deleting metadata to make a write succeed is different from completing a preservation task. Specify contracts for both values and descriptive metadata.
pandas read_html: keeping nested-table headers out of observation rows
Record the boundary between DOM headers and body rows in the ingestion contract. Otherwise, a rising number of collected rows can be mistaken for an increase in observations.
pandas Excel usecols: tracing renamed headers back to the selected sheet columns
Provide a mapping that preserves the user's selected coordinates and business meaning, rather than simply stripping a suffix from the column name.
pandas CSV headers: preserving column identity across UTF-8 BOM handling
Keep the original bytes alongside the normalized header. That makes a later reader's naming difference distinguishable from a real source-schema revision.
fast-csv headers: distinguishing field selection from renaming
Explain field selection separately from output-title changes so different teams do not assign different meanings to the same headers option.
Docling video export: checking picture source lists before handing JSON to another team
A completed conversion is different from a reusable document. Video and document teams should share the reload contract.
Checking Dask divisions length separately from correct row values
The relation between partition count and boundary count is not itself a verdict about data loss.
Dask date-column assignment changes an integer column: check the scope of the change
Adding a date column must preserve the types and values of columns outside the requested change.
Checking R list-element names across an Arrow and Parquet round trip
Preserved table metadata does not establish preservation of the names that identify list elements.
Checking required children only where their parent struct exists
Physical NULL slots beneath an absent parent are different from missing children under a present parent.
Checking Parquet root nodes before using StreamReader
Format-level support for nesting does not imply that every reader API supports nested schemas.
Checking list-element support before converting Arrow data to pandas
A successful top-level conversion does not establish support at a nested list position.
Validating literal dotted names separately from nested ORC paths
Preserve field identity before comparing a top-level a.b column with a child b inside struct a.
Validating original dates before Emscripten timestamp normalization
A valid output timestamp can hide an impossible date in the original input.
Aligning date32 contracts across Python lists and NumPy arrays
Record the date unit and the supported conversion path alongside the integer values.
Checking complete dictionary types before Arrow coalesce
Value types alone omit index widths and ordered flags that can determine execution compatibility.
