Runtime HTTP Contract
Human-facing guide for the runtime /v0 HTTP contract. Canonical machine-validated artifacts live under schemas/ and tests/contracts/.
Source of Truth
- OpenAPI spec:
../../schemas/http/runtime-http.openapi.v0.yaml - Example manifest:
../../tests/contracts/runtime-http/examples/manifest.yaml - Implementation baseline:
../contracts/runtime-http-baseline.md - Runtime handlers/routes:
core/http/server.cppcore/http/handlers/*.cpp
Contract Policy
- Config schema and HTTP contract are separate layers.
- Shared concepts (mode enums, status code semantics, parameter value shapes) are parity-checked.
- Shared cross-contract schema fragments are deferred to a later follow-up after HTTP contract stabilization.
Validation
Run structural OpenAPI validation:
bash
python3 tests/contracts/runtime-http/validate-runtime-http-openapi.pyThe validator checks:
- OpenAPI top-level structure.
- Required endpoint/method coverage.
- Response presence for required operations.
- Internal
$refresolution. - SSE media type contract for
/v0/events.
Run example payload validation:
bash
python3 tests/contracts/runtime-http/validate-runtime-http-examples.pyRun live runtime conformance smoke validation (runtime + provider-sim required):
bash
python3 tests/contracts/runtime-http/validate-runtime-http-conformance.py \
--runtime-bin <path-to-anolis-runtime> \
--provider-bin <path-to-anolis-provider-sim> \
--capture-dir tests/contracts/runtime-http/examples/_capturesLive conformance checks:
- Starts runtime with provider-sim via fixture process management.
- Exercises all required
/v0operations. - Validates each observed response against the OpenAPI schema declared for that status code.
- Enforces deterministic non-200 checks for
400,404, and503responses. - Optionally captures live response payloads to support example refresh workflows.
Notes
/v0/eventsis intentionally documented with provisional schema depth in this initial contract wave.- Runtime behavior remains implementation-authoritative for semantics not yet captured as strict OpenAPI constraints.
