dataset infer output does not round-trip through dataset validate (integrity object vs string).
Environment
fairspec 0.1.4 (installed from PyPI)
- Python 3.12.3, Linux
- Reproduced in a clean virtualenv against the published wheel.
Repro
printf 'id,name\n1,A\n2,B\n' > products.csv
fairspec dataset infer products.csv --json > inferred.json
fairspec dataset validate inferred.json --json
Actual
{
"valid": false,
"errors": [
{
"type": "metadata",
"message": "{'type': 'sha256', 'hash': '...'} is not of type 'string'",
"jsonPointer": "/resources/0/integrity"
}
]
}
dataset infer emits integrity as an object { "type": "sha256", "hash": "..." }, but the dataset schema requires /resources/*/integrity to be a string. An inferred descriptor therefore never validates.
Expected: dataset infer output passes dataset validate unchanged (align the emitted integrity shape with the schema, or relax the schema to accept the object form).
dataset inferoutput does not round-trip throughdataset validate(integrity object vs string).Environment
fairspec0.1.4 (installed from PyPI)Repro
Actual
{ "valid": false, "errors": [ { "type": "metadata", "message": "{'type': 'sha256', 'hash': '...'} is not of type 'string'", "jsonPointer": "/resources/0/integrity" } ] }dataset inferemitsintegrityas an object{ "type": "sha256", "hash": "..." }, but the dataset schema requires/resources/*/integrityto be a string. An inferred descriptor therefore never validates.Expected:
dataset inferoutput passesdataset validateunchanged (align the emittedintegrityshape with the schema, or relax the schema to accept the object form).