38 lines
2 KiB
Markdown
38 lines
2 KiB
Markdown
# Edge Config and Runtime Refresh Contract
|
|
|
|
## Contract metadata
|
|
|
|
- id: `iop.edge-config-runtime-refresh`
|
|
- boundary: inner
|
|
- status: active
|
|
- source evidence:
|
|
- `packages/go/config/edge_types.go`
|
|
- `packages/go/config/provider_types.go`
|
|
- `packages/go/config/load.go`
|
|
- `packages/go/config/validate.go`
|
|
- `configs/edge.yaml`
|
|
- `apps/edge/internal/configrefresh/`
|
|
|
|
## Scope
|
|
|
|
This contract connects Edge YAML, Go configuration, provider catalog validation, runtime refresh classification, and Node config payloads.
|
|
|
|
## Required behavior
|
|
|
|
- `nodes[].adapters` configures named inference-provider adapters.
|
|
- `nodes[].providers` is the provider resource catalog. Each enabled provider references one enabled adapter instance and declares capacity, models, health, and lifecycle capabilities.
|
|
- `models[]` references provider ids and supplies model-group policy, context limits, and usage attribution.
|
|
- Provider pool queue limits and timeouts are Edge-owned and deterministic.
|
|
- Protocol profiles and provider authentication are normalized at load time. Tracked configuration never contains raw credentials.
|
|
- Legacy process-launch, interactive runtime, and automation-ownership keys are rejected before weak decoding can discard them.
|
|
- Refresh results distinguish `applied`, `restart_required`, and `rejected`; all result collections are stable and non-null.
|
|
- Capacity, priority, enabled state, model policy, and queue policy may be applied live. Identity, endpoint, adapter, protocol profile, and listener changes require restart.
|
|
|
|
## Prohibited behavior
|
|
|
|
Configuration must not accept process commands, terminal modes, conversation resume arguments, working-directory requirements, or arbitrary environment injection as provider fields. It must not infer a provider resource from an unregistered adapter string.
|
|
|
|
## Verification
|
|
|
|
- `go test -count=1 ./packages/go/config ./apps/edge/internal/configrefresh ./apps/edge/internal/edgevalidate`
|
|
- `go test -count=1 ./apps/edge/cmd/edge -run TestConfigCheckRejectsLegacyCLIProcessFields`
|