Skip to content

feat(provider): type runtime image, readiness, and capacity inputs - #12834

Merged
cv merged 1 commit into
feat/gateway-runtime-data-sourcefrom
feat/typed-observation-inputs
Oct 8, 2026
Merged

cv merged 1 commit into
feat/gateway-runtime-data-sourcefrom
feat/typed-observation-inputs

Conversation

@cv

@cv cv commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Part of #12785. Stacked on #12832.

Failure

nemoclaw_runtime_image, nemoclaw_service_readiness and nemoclaw_service_capacity took SDK-compiled service specifications. An HCL author could not check a runtime image, wait for a service container, or measure capacity without reproducing the SDK's internal JSON.

Decision

  • nemoclaw_runtime_image takes engine, image (pinned by SHA-256 digest), architecture (amd64 or arm64) and optional labels, the labels the image must carry. image_id and allow_missing keep their meaning.
  • nemoclaw_service_readiness takes the container's engine, name and container_id, and its contract: the spec output of the nemoclaw_vllm_runtime, nemoclaw_ollama_runtime or nemoclaw_ollama_proxy_runtime data source the container runs with. The contract decides what readiness checks, including vLLM credential permissions when it enables authentication.
  • nemoclaw_service_capacity replaces specs with contracts, the runtime contracts of the services on the engine. A contract listed twice is rejected, replacing the old check for a repeated service name.
  • Generated graphs pass these values. Readiness references the same runtime contract data source as the container's environment.
  • Provider internals now read readiness and capacity from the runtime contract instead of the whole compiled specification.

Validation

  • Readiness and capacity: the standalone OpenTofu tests for readiness and capacity now write the typed inputs. Readiness failed on the previous schema ("Extraneous JSON object property") and both pass now.
  • Schema: a new provider schema test checks that all three data sources take typed inputs and no spec.
  • Runtime image: new unit tests cover validation of its requirements and deferral of unknown values. The read-only image checks still pass.
  • Compiled graph: the SDK compile tests check the generated readiness contract references.
  • Suites: nemoclaw-sdk, nemoclaw-provider and nemoclaw-build tests pass, with workspace clippy at -D warnings and fmt. GitHub CI runs the full suite.

nemoclaw_runtime_image, nemoclaw_service_readiness, and
nemoclaw_service_capacity took SDK-compiled service specifications,
so HCL authors could not check an image, wait for a container, or
measure capacity without reproducing the SDK's internal JSON.

The runtime image check takes the engine, the pinned image, its
architecture, and the labels it must carry. Readiness takes the
container's engine, name, and ID, and the contract it runs with: the
spec of its vLLM, Ollama, or Ollama proxy runtime data source.
Capacity takes an engine and the runtime contracts of the services on
it. Generated graphs pass these values and reference the runtime
contract data sources.

Part of #12785.
@cv cv added area: architecture Architecture, design debt, major refactors, or maintainability v1 NemoClaw v1 branch labels Oct 8, 2026
@cv
cv merged commit 941046f into feat/gateway-runtime-data-source Oct 8, 2026
4 checks passed
@cv
cv deleted the feat/typed-observation-inputs branch October 8, 2026 17:51
cv added a commit that referenced this pull request Oct 8, 2026
…#12831)

Part of #12785. Carries #12832 and #12834, which merged into this branch
while the PRs were stacked.

## Failure

Gateway resources and the service observation data sources took
SDK-compiled `spec` strings. To declare a gateway, check a runtime
image, wait for a service, or measure capacity in HCL, an author had to
reproduce the SDK's internal JSON, including layout numbers that encode
storage contract versions. Generated Docker gateway containers also
carried an entrypoint, command and environment that only the SDK
compiler could write.

## Decision

- **`nemoclaw_managed_gateway` and `nemoclaw_gateway_storage`** take
`name`, `compute_driver`, `engine`, `image`, `network_cidr` and
`endpoint` as attributes. `owner` and `generation` are optional,
computed and generated on create. The provider derives the internal
layout. Docker gateway storage rejects `endpoint`, because its data does
not depend on the listen port. The backend still builds the same
internal specification, so container and volume labels are unchanged.
The SDK reads the attributes back from OpenTofu state for bound
gateways.
- **`nemoclaw_gateway_runtime`** computes a Docker gateway container's
`entrypoint`, `command` and `env` from `name`, `endpoint` and the
storage's `data_path`. It shares one launch definition with the SDK
compiler. Generated graphs take the launch from it.
- **`nemoclaw_runtime_image`** takes `engine`, a digest-pinned `image`,
`architecture` and optional `labels`.
- **`nemoclaw_service_readiness`** takes the container's `engine`,
`name` and `container_id`, and its `contract`: the `spec` of the vLLM,
Ollama or Ollama proxy runtime data source the container runs with.
- **`nemoclaw_service_capacity`** takes `contracts` instead of `specs`
and rejects a contract listed twice.
- The provider guide documents each input. `docs/limits.md` now lists
only the Kubernetes types as taking a compiled `spec`.

The merge from `v1` keeps #12842's removal of the `nemoclaw` provider's
gateway settings. The authored HCL in the end-to-end tests uses an empty
`provider "nemoclaw"` block.

## Validation

- **Gateway resources:** a provider schema test checks their typed
attributes. Attributes round-trip to the internal specification for both
drivers, and invalid values are rejected. State bindings record typed
settings, including the null endpoint of Docker gateway storage.
- **End-to-end through pinned OpenTofu:**
  - The prerequisite protocol test writes the gateway in HCL.
- A Docker gateway written in HCL plans its launch through
`nemoclaw_gateway_runtime`.
  - The readiness and capacity tests use the typed inputs.
- **After merging `v1`:**
- `nemoclaw-sdk`, `nemoclaw-provider` and `nemoclaw-build` pass 776
tests.
- The standalone OpenTofu tests (24), the production provider tests and
the capacity test pass.
  - Workspace clippy at `-D warnings` and fmt are clean.
@wscurran wscurran added area: providers Inference provider integrations and provider behavior feature PR adds or expands user-visible functionality provider: ollama Ollama local model provider behavior provider: vllm vLLM local or hosted provider behavior security area: security Security controls, permissions, secrets, or hardening and removed security labels Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: architecture Architecture, design debt, major refactors, or maintainability area: providers Inference provider integrations and provider behavior area: security Security controls, permissions, secrets, or hardening feature PR adds or expands user-visible functionality provider: ollama Ollama local model provider behavior provider: vllm vLLM local or hosted provider behavior v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants