Skip to main content

Module validate

Module validate 

Source
Expand description

Structural validation — the Structure-category half of the validator split (issue #2231 Stage 1 spike, part b).

These checks operate on bytes only (magic, version, header size, flags) and have NO dependency on f32 tensor data. They are the cleanly-separable subset of aprender-core/src/format/validation_impl.rs’s Category::Structure checks (check_magic, check_gguf_version, check_header_size, check_version, check_flags, AprHeader::parse).

The Physics-category checks (check_no_nan, check_no_inf, validate_tensors, TensorStats::compute) need &[f32] and are deliberately NOT moved here — they stay in aprender-core (decision: converter/physics stay in core).

Enums§

StructureCheck
Outcome of a single structural check.

Functions§

check_flags
Check that the header’s flags byte parses (reserved high bit clear).
check_header_size
Check that the file is at least one full header in size.
check_magic
Check that the leading bytes carry the v1 APRN magic.
check_version
Check that a parsed header carries a supported major version.
validate_structure
Run all structural (byte-only) checks against a candidate .apr buffer.