4.4 KiB
Validation
Current and historical boundaries
Current tooling uses ConfigKit v1.4.0 for every domain document. The pinned input contract owns syntax, resolution, resource limits, and native values; its consumer guide owns library use.
Published 0.1.0 contracts used a broader decoding profile. Their complete
historical validation requires the
2026.11.0 guide
and historical tool.
Choosing an older root with this newer binary does not restore a historical
decoder. Historical definitions remain bundled for offline structural use;
current native example checks target the most current local version of each name.
Command
With Go 1.27 or later, prepare pinned dependencies and validate:
go mod download
go run ./cmd/validate -schema rpg/party rpg/party/v0.2.0/examples/party.yml
go run ./cmd/validate -schema glossary glossary/v0.2.0/examples/weather.yml
-schema NAME selects that name's highest SemVer in the local
catalog. It reports the exact selected version and document marker.
There is no historical version flag or NAME@VERSION syntax. A checkout may
select unpublished candidates; an immutable distribution has its own catalog.
Selection never downloads a new catalog or retries older schemas after failure.
go build -o /tmp/schemas-validate ./cmd/validate
/tmp/schemas-validate -root /path/to/distribution -schema glossary /path/to/glossary.yml
Flags precede filenames. Every document in an invocation uses the selected schema; later files are still checked after an earlier failure. Exit 0 means success, 1 means document read/load/structural/semantic failure, and 2 means usage, selection, or distribution failure. Native failures retain library diagnostics with filename context; schema and semantic failures identify relevant locations.
Native domain handoff
Supply a completed mapping after the composing application has resolved its
inputs. The harness calls native Load[map[string]any] on Bytes, then passes
Result.Config directly to structural and semantic validation. It enables no
imports, discovery, overlays, startup bootstrap, overrides, or application defaults.
Native structural processing still applies: extends is a directive and
source-root config is a control namespace. Nested ordinary config data
follows upstream behavior.
Quote ambiguous strings such as "yes", use supported decimal numeric syntax,
and avoid explicit tags, anchors, and aliases. Dynamic integer syntax binds to
int64; fractional/exponent syntax binds to finite float64 and may round. Native
source limits apply, including the baseline's 8 MiB per source. This repository
does not duplicate those checks or repair rejected inputs. Both YAML and JSON
use the same native loader; JSON is not an escape from native restrictions.
Files ending in .json additionally require JSON syntax.
Full conformance includes native acquisition, JSON Schema structure, and applicable semantic rules. The harness checks exact glossary entry-ID uniqueness within each collection. It does not fetch campaign locators, infer consumer support, populate domain defaults, or mutate the loaded configuration. Extensions preserve supported resolved values; task projections can omit irrelevant data.
Offline resources and editors
Schema resources and catalogs use standard JSON decoding, independently of domain acquisition. Resource numbers remain exact so schema constraints do not round. The maintained JSON Schema engine compiles every bundled schema under its canonical ID, registers dependencies locally, and rejects absent resource loads. Only current versions' examples are checked through native acquisition.
Consumers can pin exact schema versions and a published CalVer archive, bundle their dependency closure and semantic documents, and register local files under canonical IDs. Consumer pinning is independent of this CLI's name selection. Editors can associate documents externally with their selected schema. Structural editor feedback alone does not prove native acquisition or full conformance.