Dataset validation does not check the registry, release and schema field types the application deserializes
Original description
By MelanX · October 24, 2026Crate: ephervex-options (generated data) and tools/minecraft-options
Commit: f844b107
Behavior
validate() documents that it refuses exactly what the application's loader refuses. It now checks codecs, keys, representation positions, the unsupported lists, revision and data_version, but not the other field types crates/options/src/dataset.rs requires through serde:
RegistrySetting.keyandtypemust be strings,categoryandtranslation_keyoptional strings,manageablea bool;canonical_minecraft_version,ReleaseMapping.minecraft_version,ReleaseMapping.schemaandSchemaFamily.idmust be strings;SchemaFamily.supportedmust be a string-keyed object.
A hand-edited or corrupted previous dataset with manageable: null or a numeric category passes validate() and is published, then refused wholesale by the application as malformed. A non-object schema, release or registry entry, or a non-hashable schema id, makes validate() raise TypeError, KeyError or AttributeError instead of DatasetError, which update.py main does not catch.
Expected behavior
validate() refuses these shapes with DatasetError.
Impact
A dataset the application cannot load can still pass the publication gate, and clients silently keep their old data.
Locations
tools/minecraft-options/dataset.pyvalidatecrates/options/src/dataset.rs(serde field types)
Validation and limitations
Read from the current validate(); schema["supported"].items() and release["schema"] not in families are reached without a type check. Follows #601, whose fix covers codecs, keys, positions and the unsupported lists but not these field types.