Runtime HTTP Baseline
Status: Locked.
Purpose
Freeze implemented /v0 HTTP behavior so OpenAPI, examples, and conformance tests stay aligned with runtime handlers.
Canonical Artifacts
- Route registration:
core/http/server.cpp - Handlers:
core/http/handlers/*.cpp - OpenAPI contract:
schemas/http/runtime-http.openapi.v0.yaml - Example fixtures:
tests/contracts/runtime-http/examples/ - Validators:
tests/contracts/runtime-http/validate-runtime-http-openapi.pytests/contracts/runtime-http/validate-runtime-http-examples.pytests/contracts/runtime-http/validate-runtime-http-conformance.py
Locked Behavior Summary
Route Inventory
GET /v0/runtime/statusGET /v0/providers/healthGET /v0/devicesGET /v0/devices/{provider_id}/{device_id}/capabilitiesGET /v0/stateGET /v0/state/{provider_id}/{device_id}POST /v0/callGET /v0/modePOST /v0/modeGET /v0/parametersPOST /v0/parametersGET /v0/automation/treeGET /v0/automation/statusGET /v0/events(SSE)OPTIONS /v0/callOPTIONS /v0/.*
Semantics Anchors
/v0/callrequiresfunction_id(no function-name dispatch in request body)./v0/statereturns only devices with cached state entries./v0/state/{provider_id}/{device_id}supports repeatedsignal_idfilter params./v0/providers/healthalways returns asupervisionobject./v0/eventscurrently emits:state_update,quality_change,device_availability,mode_change,parameter_change,bt_error,provider_health_change.
Validation Gates
- OpenAPI structural validation:
python3 tests/contracts/runtime-http/validate-runtime-http-openapi.py
- Example payload validation:
python3 tests/contracts/runtime-http/validate-runtime-http-examples.py
- Live runtime conformance smoke:
python3 tests/contracts/runtime-http/validate-runtime-http-conformance.py --runtime-bin <...> --provider-bin <...>
Drift Notes and Change Rule
- Runtime implementation is authoritative when docs/spec disagree.
- Contract changes require synchronized updates to:
- handler behavior
- OpenAPI
- examples/manifest
- validators/tests
- this baseline
- Keep
/v0/eventsschema depth conservative; tighten only with matching runtime evidence.
