Runtime Configuration
Anolis runtime is configured with YAML.
Contract authority is machine-validated:
schemas/runtime/runtime-config.schema.jsontests/contracts/runtime-config/validate-runtime-configs.pyanolis-runtime --check-config(semantic/load-time checks)
Use this document for authoring workflow and operational guidance.
Where Runtime YAML Lives
- Checked-in examples:
examples/anolis-runtime*.yaml - Machine realization configs:
anolis-projects/projects/{name}/config/anolis-runtime*.yaml - Commissioning-generated outputs are managed in
anolis-workbenchand are intentionally not tracked in this repository.
Out of scope for this contract:
- Provider-local YAML (
provider-*.yaml) - Telemetry-export tool YAML (
telemetry-export*.yaml)
Authoring Workflow
- Start from a known profile (
manual,telemetry,automation,fullvariants when available). - Edit runtime concerns only in runtime YAML.
- Validate schema fixtures:
python3 tests/contracts/runtime-config/validate-runtime-configs.py
- Validate runtime semantics:
anolis-runtime --check-config --config <path>
- Run runtime normally after both checks pass.
Minimal Runtime Skeleton
runtime:
name: anolis-main
http:
enabled: true
bind: 127.0.0.1
port: 8080
providers:
- id: sim0
command: ./build/dev-release/anolis-provider-sim
polling:
interval_ms: 500
logging:
level: info
telemetry:
enabled: false
automation:
enabled: falseOperational Notes
Runtime modes
- Startup mode is always
IDLE(not YAML-configurable). - Mode changes happen at runtime via
POST /v0/mode. IDLEblocks control operations;AUTOapplies manual-call gating policy.FAULTis a recovery mode with constrained transitions (FAULT -> MANUALonly).- See automation.md for full mode semantics.
HTTP and CORS
http.cors_allowed_originsshould be explicit in non-dev environments.- Wildcard origin (
*) cannot be combined withcors_allow_credentials: true.
Providers and supervision
- Provider IDs must be unique.
- Provider command is required.
- Restart policy is optional but recommended for hardware processes.
Telemetry
- Telemetry is off by default.
- Use nested
telemetry.influxdb.*settings. - Flat
telemetry.influx_*keys remain accepted for compatibility, but are deprecated. - When telemetry is enabled, provider/device health is also ingested every
telemetry.health_interval_ms(default 15000;0disables).
Health staleness
Device-health liveness (OK/WARNING/STALE in /v0/providers/health and the anolis_device_health timeseries) is derived from time since the last successful poll. The WARNING/STALE thresholds are cadence-derived by default so a healthy but serialized bus does not false-flap:
warn_after_ms = max(3 x polling.interval_ms x device_count, 2000)stale_after_ms = max(8 x polling.interval_ms x device_count, 5000)
At the default interval_ms: 500 with a single device this is exactly 2000 / 5000 (unchanged from prior releases). A multi-device serialized bus (e.g. an EZO chain where a full poll cycle exceeds 2s) gets proportionally looser bounds and stops flapping. Supply absolute overrides only when the heuristic does not fit:
health:
staleness:
warn_after_ms: 0 # 0 (default) => derive from cadence; a positive value overrides
stale_after_ms: 0 # 0 (default) => derive; when both set, must be > warn_after_msBeyond liveness, device health also folds in per-signal quality and freshness: a device serving a cached QUALITY_FAULT sample reads FAULT, and a signal of degraded quality (QUALITY_STALE/QUALITY_UNKNOWN) reads STALE — even when the poll itself is fresh (this is the false-green the hardcoded liveness check missed). The per-signal age check is deliberately conservative: it uses max(stale_after_ms, <liveness stale bound>), so it never flags STALE before the cadence-derived liveness bound and therefore cannot re-introduce the false-STALE storm — a provider's declared stale_after_ms (from its capability descriptor) only extends trust, and an unset value simply inherits the liveness bound. The age path adds STALE only for a genuinely stuck/old cached sample (signal age far exceeding poll age). Per-device precedence is UNAVAILABLE > FAULT > STALE > WARNING > OK, and the stale_signal_count / fault_signal_count fields on /v0/providers/health explain the result.
Compatibility behavior
- Unknown keys are warn-and-ignore for forward compatibility.
automation.behavior_tree_pathis an accepted alias forautomation.behavior_tree.runtime.modein YAML is rejected.
Related References
- configuration-schema.md - compact section-by-section schema narrative.
- docs/contracts/runtime-config-baseline.md - locked behavior baseline.
- schemas/README.md - canonical schema and validator map.
