vibeqc.output.formats.qvf.validate_qvf¶
- vibeqc.output.formats.qvf.validate_qvf(source)[source]¶
Validate a QVF against the canonical SSOT schema.
sourcemay be either a filesystem path to a.qvffile or an already-openzipfile.ZipFile. The latter form letsqvf_bytes()validate an in-memory archive without round-tripping through disk.Returns a dict with keys
valid(bool),summary(list of per-section result strs), anderrors(list of error strs).Checks performed:
The archive is a valid zip, no member exceeds the zip-bomb cap.
manifest.jsonexists and parses as JSON.The manifest validates against
_SCHEMA_PATH(the canonical schema) — this catches per-kind member shape, dtype, format, and unknown kinds.Every member’s declared zip path exists in the archive.
Every member’s declared sha256 matches the bytes on disk.
Every binary member’s
len(bytes) == np.dtype(dtype).itemsize * product(shape)(no silent under/over-sized buffer).On
volume.difference: bothoperand_aandoperand_b(if present) resolve to section ids that exist in the archive.On
reaction.waypoints:trajectory_refresolves to a section in the archive whose kind istrajectory.
Sections whose kind is in
_RESERVED_KINDSare not shape-validated (no schema branch yet); their file refs are still checked. Vendor (x_*) sections must conform to theSectionVendorschema branch (members must be valid Json/Binary members) but the shape of those members is unconstrained.