Runtime Config Baseline
Status: Locked.
Purpose
Freeze runtime YAML behavior used by anolis-runtime --config and --check-config so schema and validator changes stay aligned with implementation.
Canonical Artifacts
- Runtime model/defaults:
core/runtime/config.hpp - Runtime loader/validation:
core/runtime/config.cpp - CLI semantic gate:
core/src/main.cpp(--check-config) - Runtime schema:
schemas/runtime/runtime-config.schema.json - Contract validator:
tests/contracts/runtime-config/validate-runtime-configs.py - Contract fixtures:
tests/contracts/runtime-config/ - Unit coverage:
tests/unit/config_test.cpp
Locked Behavior Summary
Scope
- Applies to runtime YAML consumed by
anolis-runtime. - Targets
anolis-runtime*.yamlunderconfig/. - Excludes provider-local YAML and telemetry-export YAML.
Supported Top-Level Sections
runtimehttpproviderspollingtelemetryloggingautomation
Compatibility Commitments
- Unknown keys are warn-and-ignore (forward compatibility).
- Accepted deprecated aliases:
automation.behavior_tree_path- flat telemetry keys under
telemetry.*(influx_*,batch_size,flush_interval_ms)
- Rejected legacy key:
runtime.mode. - Runtime parser behavior (
yaml-cpp) is authoritative for semantic edge cases.
Key Validation Invariants
- Runtime timeout bounds:
500 <= shutdown_timeout_ms <= 300005000 <= startup_timeout_ms <= 300000
- HTTP invariants:
- valid port range,
thread_pool_size >= 1 - non-empty CORS origins
- wildcard origin forbidden when credentials are enabled
- valid port range,
- Providers:
- non-empty provider list, unique IDs, required command
- timeout lower bounds (
timeout_ms,hello_timeout_ms,ready_timeout_ms)
- Restart policy:
max_attempts >= 1backoff_mslength equalsmax_attempts
- Polling/logging validity:
polling.interval_ms >= 100- logging level in
debug|info|warn|error
- Automation:
- behavior tree path required when enabled
tick_rate_hzbounded- parameter type/default consistency
- mode-transition-hook structure and enum validation
Validation Gates
Run both layers:
- Schema and fixture validation:
python3 tests/contracts/runtime-config/validate-runtime-configs.py
- Runtime semantic validation:
anolis-runtime --check-config --config <runtime-yaml>
CI must keep these green together.
Drift Notes and Change Rule
- Do not change schema-only behavior without matching runtime loader semantics.
- Do not change runtime loader semantics without updating schema/tests/baseline in the same change.
- Additive compatibility is preferred; tightening validation requires explicit migration notes.
