Contract Validation
All contract checks run automatically in CI on every push and pull request. To run any validator locally, invoke it directly from the repo root.
Runtime config contracts
Requires a local runtime binary (build/dev-release/core/anolis-runtime):
bash
python3 tests/contracts/runtime-config/validate-runtime-configs.py --runtime-bin build/dev-release/core/anolis-runtimeEnforces:
- JSON Schema conformance across all tracked runtime YAML config files
- Runtime loader acceptance via
anolis-runtime --check-configon each file - Contract fixture sets (
valid,invalid/schema,invalid/runtime)
Machine profile contracts
bash
python3 tests/contracts/machine-profile/validate-machine-profiles.pyEnforces:
- Machine profile schema conformance
- Referenced file existence
- Referenced runtime profile compatibility
Telemetry timeseries contracts
bash
python3 tests/contracts/telemetry-timeseries/validate-telemetry-timeseries.pyEnforces:
anolis_signaltelemetry row schema conformance- Fixture coverage for typed value fields and quality-only rows
- Invalid fixture rejection
Runtime HTTP contracts
bash
# Structural + example checks (no binary needed)
python3 tests/contracts/runtime-http/validate-runtime-http-openapi.py
python3 tests/contracts/runtime-http/validate-runtime-http-examples.pyEnforces:
- OpenAPI document shape and required
/v0endpoint coverage - Internal
$refresolution - SSE media type on
/v0/events - Example payload conformance from
tests/contracts/runtime-http/examples/manifest.yaml
Runtime HTTP live conformance
Requires both a runtime binary and a provider-sim binary:
bash
python3 tests/contracts/runtime-http/validate-runtime-http-conformance.py \
--runtime-bin build/dev-release/core/anolis-runtime \
--provider-bin ../anolis-provider-sim/build/dev-release/anolis-provider-simStarts a live runtime fixture and validates responses against the OpenAPI schema, including negative cases (400, 404, 503).
Docs link check
Dead links in docs/ and root markdown files are checked by the docs.yml workflow via lycheeverse/lychee-action (offline mode). No local tooling needed.
Focused C++ tests
bash
ctest --test-dir build/dev-release --output-on-failure -R "ConfigTest|RuntimeOwnershipValidationTest"Covers runtime YAML parsing, restart-policy validation, automation config handling, and I2C ownership invariants.
