Expand description
Conformance checking against OKF v0.2 §11.
A bundle is conformant if (1) every non-reserved .md file has a
parseable frontmatter block, (2) every frontmatter has a non-empty type,
and (3) reserved files follow their structure when present. Everything else
is soft guidance: consumers MUST NOT reject a bundle for missing optional
fields, unknown types or keys, broken links, or missing index.md files.
Accordingly, validate_bundle reports only true §11 violations as
Severity::Error. The v0.2 families (§5, §10) are all optional, so
everything they contribute here is a Severity::Warning (a producer
mistake worth fixing) or Severity::Info (a permitted state worth
knowing about, such as a broken link or a concept past its stale_after).
Staleness is the one check that depends on the wall clock, so it is opt-in:
validate_bundle is deterministic and validate_bundle_at takes the
date to compare against.
Structs§
- Diagnostic
- A single finding about a bundle.
- Report
- The result of validating a bundle.
Enums§
- Severity
- Severity of a diagnostic.
Functions§
- is_
iso8601_ datetime - Light ISO-8601 datetime check, kept for callers that only need a yes/no.
- validate_
bundle - Validates a loaded bundle against §11, returning all findings.
- validate_
bundle_ at - Validates a bundle, additionally reporting concepts that are stale on
today(§5.5).