Runtime HTTP Baseline (Pre-OpenAPI)
Status: Baseline snapshot for contracts-02-runtime-http.md execution.
Purpose:
- Lock current implemented
/v0behavior before OpenAPI authoring. - Make implementation-vs-doc drift explicit.
- Keep the contract-02 work additive and predictable.
Implemented Route Inventory
Source of truth for this snapshot is route registration in core/http/server.cpp.
GET /v0/devicesGET /v0/devices/{provider_id}/{device_id}/capabilitiesGET /v0/stateGET /v0/state/{provider_id}/{device_id}POST /v0/callGET /v0/runtime/statusGET /v0/modePOST /v0/modeGET /v0/parametersPOST /v0/parametersGET /v0/automation/treeGET /v0/automation/statusGET /v0/providers/healthGET /v0/events(SSE)OPTIONS /v0/callOPTIONS /v0/.*
Current Payload Notes (Implementation)
GET /v0/modecurrently returnsstatus+modeonly.POST /v0/callcurrently requiresfunction_id(transport decode does not acceptfunction_name).GET /v0/statecurrently emits only devices that have cached state entries.GET /v0/state/{provider_id}/{device_id}supports repeatedsignal_idquery params for filtering.GET /v0/providers/healthemitssupervisionas an object for every provider (nevernull).GET /v0/eventsemits these event names:state_updatequality_changedevice_availabilitymode_changeparameter_changebt_errorprovider_health_change
Documented Drift to Resolve in Contract-02
/v0/automation/statusand/v0/eventsare implemented, but not covered with the same depth as core REST endpoints in current docs.
Contract-02 Readiness Checklist
Ready to start when these are executed in order:
- Freeze this baseline as the implementation anchor.
- Decide per drift item: implementation change vs documentation correction.
- Author
schemas/http/runtime-http.openapi.v0.yamlagainst the decided baseline. - Add spec lint + structural validation in CI.
- Add example payload validation and runtime conformance smoke checks.
Slice 1 Status
Implemented for initial contracts-02 execution:
schemas/http/runtime-http.openapi.v0.yamlcreated with current shipped endpoint coverage.- Structural OpenAPI validation script added at
tools/contracts/validate-runtime-http-openapi.py. - CI structural gate wired in
.github/workflows/ci.yml(Linux strict lane). /v0/automation/statusand/v0/eventsdocumentation coverage added indocs/http-api.md.
Slice 2 Status
Implemented for contract drift hardening:
- Example manifest and payload fixtures added under
tests/contracts/runtime-http/examples/. - Example schema validator added at
tools/contracts/validate-runtime-http-examples.py. - Live runtime conformance smoke validator added at
tools/contracts/validate-runtime-http-conformance.py. - CI gates updated:
- Linux strict lane validates OpenAPI examples.
- Provider compatibility lane runs live conformance smoke.
- Live conformance includes deterministic
400,404, and503negative checks. - Live conformance supports optional response capture (
--capture-dir) for example refresh.