Skip to content

feat(config)!: select the gateway backend with one tagged target - #14586

Merged
cv merged 15 commits into
v1from
feat/13829-gateway-target
Nov 20, 2026
Merged

cv merged 15 commits into
v1from
feat/13829-gateway-target

Conversation

@gaveezy

@gaveezy gaveezy commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Each gateway selects its backend with one tagged target, which holds only what NemoClaw uses to install or reach the gateway there: docker or podman (an engine socket, an integer port, networkCIDR and imagePullPolicy), or kubernetes or openshift (the cluster target, authentication and expose). runtime.provider and the flat endpoint, engine, networkCIDR, imagePullPolicy and kubernetes fields are gone, a managed Kubernetes or OpenShift gateway without expose names no endpoint or port, and the intent record moves to version 31, so existing deployments need to be created again.

Problem

Before this change, gateway.runtime.provider, the presence of gateway.kubernetes and the flat engine fields had to agree, through conditionals on the managed gateway and four root rules. Editors offered Docker's socket and a local HTTP endpoint on a Kubernetes gateway, a Kubernetes document had to author a loopback port that nothing bound, and plan bound that port as identity. runtime.provider: openshift was a flag on the Kubernetes shape that also decided whether expose.route applied.

Resolves #13829; #14588 tracks the chart settings a document still can't reach.

Change

Following cv's decisions:

  • Document shape: gateway.target is a oneOf of single-key objects, one Rust enum per management mode (ManagedTarget, ExternalTarget); omitting it still selects Docker with its defaults. Docker and Podman share one Rust struct and Kubernetes and OpenShift another, and the schema gives each target its own definition: Docker's engine defaults to Docker's socket and its imagePullPolicy takes IfNotPresent or Never; Podman requires engine and also takes Always; only openshift's expose takes route. A violation reports its target's rule, and the root rules on imagePullPolicy and kubernetes are gone; the sandbox image, managed service and sandbox-cap rules key on a kubernetes or openshift target.
  • Ports and endpoints: Docker and Podman take an integer port from 1024 through 65535, default 17681, instead of endpoint. A published cluster gateway's endpoint moves to expose.endpoint. Without expose, a cluster gateway has no endpoint: the Kubernetes resources no longer take endpoint, each command forwards a free local port, plan and apply print OpenShell gateway: not published; …, and JSON results leave out connection.gatewayEndpoint. The openshell_gateway data source takes endpoint only when kubernetes isn't set. OpenShell objects and Fabric agents on such a gateway carry an empty endpoint, which apply and refresh now accept: a carried field holds the configuration as written and is never observed, so an empty one is no longer an incomplete observation.
  • Pull Secrets: imagePullSecrets is removed. Sandbox pods' pull Secrets go in OpenShell's openshell.drivers.kubernetes.image_pull_secrets, which NemoClaw no longer rejects in config. The gateway and certgen pods get none; they pull OpenShell's public images, and the limits page records the case of an authenticated mirror.
  • OpenShift: target.openshift replaces runtime.provider: openshift and still passes the chart the two values that unset the gateway's UID and fsGroup, until feat(helm): let OpenShift assign the gateway's UID and fsGroup without value overrides ai-openshell/openshell#5483; then only those values go.
  • Plan: plan and apply refuse a changed target on an existing deployment before they read or change anything, as they refuse a changed endpoint or exposure.
  • State: the intent record moves to version 31, and the format 29 to 30 upgrade from feat(inference): add managed llama.cpp and native NIM services #14611 is removed, because v1 keeps no state compatibility code before 0.1.0: a release refuses state in any other format.
  • Onboarding: the journey asks /spec/gateway/target instead of the runtime, and the engine question and the suggested agent images follow the chosen target's engine.
  • Messages: errors that named spec.gateway.runtime.provider, spec.gateway.endpoint, spec.gateway.engine or spec.gateway.networkCIDR name the target's fields.
  • Examples, docs and tests: every example, case and fixture uses the new shape, the docs and the generated reference describe it, and the usage guide lists the edits that author a document for another target. A test applies only those edits to every example for each of the eight targets and parses the result; the unexposed kind case gains an unchanged plan.

Left out: a chart-values passthrough (cv's decision 2), and moving a live deployment to another target, which needs a new deployment. V0's config export still writes runtime and endpoint; the V0 migration skill replaces them with the docker target.

Beyond CI

  • OpenShift Local: openshift-oidc passed by hand at 575a9e4, twice, on one OpenShift Local 4.22.14 node (CRC 2.64.0, linux/amd64) with Agent Sandbox 1.0.3, using this branch's bundle and an OpenClaw image built from it: apply, a reply from each agent through the Route, an unchanged plan, and a destroy that kept only the gateway's storage, in 161 s and 76 s.
    • The openshift target gave the chart null runAsUser and fsGroup. OpenShift wrote the namespace's range, 1000720000/10000, and admitted the gateway, both sandboxes and their supervisors under restricted-v2, each running as UID 1000720000 with fsGroup 1000720000.
    • The chart's pass-through Route served https://<namespace>.apps-crc.testing:443. The sandboxes pulled the agent image from the cluster's registry with the Secret that openshell.drivers.kubernetes.image_pull_secrets names, and the gateway pod got no such Secret.
    • Only this one amd64 node has run it, and no CI job runs openshift-oidc.

Each gateway selects its backend with one tagged `target`: `docker` or
`podman` (engine socket, integer `port`, `networkCIDR`, `imagePullPolicy`),
or `kubernetes` or `openshift` (cluster target, authentication, `expose`).
`runtime.provider`, `imagePullSecrets` and the flat `endpoint`, `engine`,
`networkCIDR`, `imagePullPolicy` and `kubernetes` fields are gone. A managed
Kubernetes or OpenShift gateway without `expose` names no endpoint, and the
intent record moves to version 26.

Part of #13829

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
@gaveezy

gaveezy commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Claude Code 2.1.325 (desktop app, Code tab) Version and entrypoint (claude-desktop) on every entry of the session and its 2 subagents
Skills recorded nemoclaw-contributor-create-pr (complete read) Skill injections and tool results to cutoff; no skill was injected
Instruction files recorded AGENTS.md (complete read; also injected when a repository file was read); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read); Claude Code user memory index (injected; contents private) Hook injections and tool results to cutoff; the docs subagent also read internal-docs/contributing/documentation.md completely, and both subagents read AGENTS.md and WRITING.md completely
Tool calls recorded Bash: 459; Write: 9; mcp__ccd_turn__update_plan: 7; Read: 4; Agent: 2; ToolSearch: 2 Tool calls in this session's assistant messages to cutoff, including failed ones; the commands inside each Bash call are not counted. Its 2 subagents (onboarding and docs) made their own calls, not counted here: Bash: 336; Edit: 94; Read: 11; mcp__ccd_turn__update_plan: 2; SubagentHandback: 2 (onboarding: Bash: 143; Edit: 30; Read: 2; docs: Bash: 193; Edit: 64; Read: 9)
Tokens partial input: 378907035; cached input: 376925742; output: 698268 Final message.usage of each of 467 responses in this session and 399 of its 2 subagents, to cutoff; the request that wrote the compaction summary isn't in the record, so these are lower bounds
Session window recorded 2026-11-18T07:27Z to 2026-11-18T08:39Z; 1 h 12 min First event to cutoff (just before this PR was opened), including idle time; the whole session worked on this change, including an edit to #13829's description
Compactions recorded 1 Automatic compaction at 2026-11-18T08:30Z
Models recorded claude-opus-5-5 Assistant messages in this session and its 2 subagents; no changes
Reasoning levels recorded max Effort on every assistant message in this session and its 2 subagents; no changes

@github-actions

Copy link
Copy Markdown
Contributor

gaveezy and others added 5 commits November 18, 2026 17:17
A managed Kubernetes gateway that nothing publishes has no endpoint, so
every OpenShell object and Fabric agent on it carries an empty
`gateway_endpoint`. The readback check treated that as an incomplete
observation, so apply failed after creating the first object and kept
none of them. Carried fields hold the configuration as written and are
never observed, so an empty one is no gap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
Resolves docs/resources/limits.md after #14585 and #14589: this change's
OpenShift, expose and gateway pull Secret rows on v1's table with its
Last verified column.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
v0.1.0-rc11 was tagged without this change, so its release notes move to
the sections since rc11, and rc11's sections keep what rc11 shipped.

v1's new code and docs use the target shape: the stopped Docker gateway
check reads the target's driver and engine, its test reads the engine
under target.docker, the signed-bundle test points the gateway with
point_gateway_at, the support matrix keys on spec.gateway.target, and
the install page names image_pull_secrets for Kubernetes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
The first-deployment table still named spec.gateway.engine and
runtime.provider, and the YAML verification skill still edited
spec.gateway.endpoint and spec.gateway.networkCIDR; both now name the
docker target's engine, port and networkCIDR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
v1 lets a managed local gateway run on a Windows client's named pipe
(#14641): its engine accepts npipe:////./pipe/NAME, and the gateway,
managed services and application containers bind the socket that
engine_socket derives. Here that engine sits under target.docker and
target.podman, so both targets' engine patterns accept a pipe, the
LocalTarget engine description gains v1's pipe sentence, and the
Podman error names a Podman machine's pipe. The schema and configuration
reference are regenerated.

v1's new pipe test, its release notes and the usage page named
spec.gateway.engine; they now set the engine under the gateway target.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
@cv cv added the v1 NemoClaw v1 branch label Nov 19, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 19, 2026
v1 reached intent record 27 with sandbox GPUs and macOS engine sockets,
so this change's record format is now 28, and the release note since
rc11 says so.

v1's new code and tests use the target shape: onboarding's single-image
answer waits on the target question and the target's engine, its TUI
tests set target.docker.engine and go back to /spec/gateway/target, and
the engine-socket and Ollama proxy tests build docker and podman
targets. The engine documentation keeps v1's macOS sentence, the usage
and inference pages keep v1's macOS and named-pipe text, and the schema
and configuration reference are regenerated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
@gaveezy

gaveezy commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

gpu / docker-openclaw-vllm and -shared aren't required and fail on v1 too (#14630). The cause is a Fabric bug, and an H200 check today showed NVIDIA/NeMo-Fabric#685 fixes it. Once v1 picks up that fix, I'll merge v1 into this PR to turn them green.

@gaveezy
gaveezy requested a review from cv November 19, 2026 16:29
@cv
cv enabled auto-merge (squash) November 19, 2026 19:34
@cv
cv disabled auto-merge November 19, 2026 19:34
cv and others added 4 commits November 19, 2026 12:39
Set RECORD_FORMAT to 31, above v1's 30, with the recomputed fingerprint.

Remove #14611's intent format 29 to 30 compatibility path, per the rule
that v1 keeps no state compatibility code before 0.1.0: the
compatible_previous check in Store::load, its format 29 tests, and the
upgrade guidance in docs/build-deploy/state.md and
docs/references/compatibility.md. A record in any other format, including
29 and 30, is refused like any other version.

The release note since rc11 now names record version 31.

v1's new llama.cpp and NIM Docker cases use the target shape:
spec.gateway.target.docker with port 17695, as the vLLM case does.
Resolve the conflicts with v1's NVIDIA style changes to the docs (#14664,
#14665, #14666, #14668, #14669, #14670), #14569, #14605 and #14653. v1's
wording and gerund headings win. The branch's target-shape edits are
applied to that wording, split into sentences where v1 split the original,
and its links use the renamed anchors, such as
adapting-a-document-to-another-target and
referencing-registry-credentials.

- usage.md: "Adapt a Document to Another Target" becomes "Adapting a
  Document to Another Target", like v1's other task headings.
- first-deployment.md: keep v1's table row. The tutorial copies the
  example from its pinned revision 637bdb6, which still has
  spec.gateway.engine and runtime.provider.
- state.md and compatibility.md keep the previous merge's removal of the
  intent format 29 to 30 upgrade.
- The nemoclaw-v0-migration skill from #14653 set the port in
  spec.gateway.endpoint. V0's config export still writes runtime and
  endpoint, which this branch refuses, so step 3 replaces both with
  target.docker.port, as hosted_parity projects the export, and step 4
  names the target's networkCIDR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
Resolve the conflict with #14672 (Fabric release/0.7 at c6d1093d) in the
release notes' "Breaking Changes Since v0.1.0-rc11": keep v1's OpenClaw
plugins.entries bullet first and this branch's target bullet after it.

The rest merges as is. The new custom-messages provider in
docker-openclaw-hermes-interfaces reaches the stub at the address and
port that live-docker's bind_case replaces, and the new fixture digest
and derived inference names don't depend on the gateway target.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
Bring in #14657 (clear a sandbox create that OpenShell rejects as
invalid). It merges without a textual conflict, but its new integration
test,
an_invalid_sandbox_create_leaves_a_deployment_that_can_be_corrected_and_destroyed,
set the gateway address with spec.gateway.endpoint_mut(), which this
branch removes. It now calls nemoclaw_e2e::point_gateway_at, as the
file's other tests do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
Comment thread docs/about/release-notes.md Resolved
Comment thread examples/openclaw.yaml Resolved
Comment thread crates/nemoclaw-sdk/src/managed/spec.rs Resolved
Comment thread crates/nemoclaw-sdk/src/managed/spec.rs Resolved
gaveezy and others added 2 commits November 20, 2026 08:15
- The endpoint check runs after the target and exposure checks, so only
  a changed port, expose.endpoint, or external endpoint reaches it. It
  now says "state is bound to a different gateway endpoint" and names
  those fields, instead of repeating the UID check's message. A test
  covers all three, and troubleshooting.md gives it its own row.
- A managed gateway's container reads its port from the local target
  instead of formatting an endpoint and parsing it back, and binds
  127.0.0.1 directly, in managed/spec.rs and docker_compute.rs.
- The gateway row's canonical-port check is one chain.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
- Release notes: the expose.route entry names
  gateway.target.openshift.expose.route at expose.endpoint, and no
  longer says plan refuses a Route unless runtime.provider is openshift,
  which the schema now enforces.
- First deployment: the table names spec.gateway.target.docker.engine,
  or spec.gateway.target.podman.engine for a Podman engine.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Hai Nguyen <[email protected]>
@gaveezy

gaveezy commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

hi @cv, I've fixed all your review comments and CI is green. Could you take another look? Thanks.

Comment thread docs/get-started/first-deployment.md Resolved
The first-deployment tutorial copies examples/openclaw.yaml from the
pinned revision 637bdb6, whose parser takes spec.gateway.engine with
runtime.provider and rejects target. Restore that row until the pin
moves past the gateway target.

Signed-off-by: Carlos Villela <[email protected]>
@cv
cv merged commit 1636069 into v1 Nov 20, 2026
126 of 129 checks passed
@cv
cv deleted the feat/13829-gateway-target branch November 20, 2026 17:26
cv added a commit that referenced this pull request Nov 20, 2026
The first-deployment tutorial pins `1636069b91`, the `v0.1.0-rc12` tag's
commit, so readers copy an example and build a CLI that take
`spec.gateway.target`, and its field table names
`spec.gateway.target.<driver>.engine`.

## Problem

The tutorial pinned `637bdb6276`, whose example takes
`spec.gateway.engine` with `spec.gateway.runtime.provider`. #14586
replaced both with one tagged `spec.gateway.target`, and the tutorial's
table would be wrong once the pin moved. The pinned build guide's
anchors, Rust version, and OpenShell version also date from that
revision.

A reader's first plan also reports `complete: false` with "Selected
image Fabric capabilities are unverified", and the tutorial says to
resolve deferred work without saying what to do about that item.

Resolves #14710.

## Change

- Pin `1636069b91f402242a35714fde1011042c3f1f70` in the tutorial,
`docs/README.md`, `docs/get-started/prerequisites.md`,
`docs/about/architecture-overview.md`, and
`docs/build-deploy/container-services.md`.
- Replace the `spec.gateway.engine` row with
`spec.gateway.target.docker.engine`, and say to use
`spec.gateway.target.podman.engine` for a Podman engine.
- Update what the pin brings: Rust 1.100.0, OpenShell 0.1.9 at source
revision `ce58cf8e9b953281352d98a637e41616295b1318`, and the build
guide's renamed anchors `#building-a-native-bundle` and
`#building-agent-images`.
- Say that when the image's Fabric capabilities are the only deferred
item before the first apply, the reader continues: apply checks the
image's adapter, and a plan after a successful apply reports `complete:
true`.

## Beyond CI

Ran the tutorial at `1636069b91` on a Linux ARM64 host with Docker
29.6.2:

- The source-built bundle printed `nemoclaw 0.1.0-rc12`, and `cargo
images build --platform linux/arm64 openclaw` built the image.
- The external gateway was a managed Docker gateway on OpenShell 0.1.9
from a separate deployment, and the inference endpoint was a local stub
that serves the OpenAI Responses API.
- With the tutorial's edits to a copy of `examples/openclaw.yaml`, the
first plan exited 0 with `complete: false` and only the Fabric
capabilities deferral. Apply succeeded, the runtime-ID plan reported
`complete: true`, and the OpenShell 0.1.9 CLI's invocation returned
`result.status: succeeded` with the stub's reply. `plan --destroy` and
`destroy` succeeded.

Not run: a real model, a Podman engine, an authenticated gateway, and an
AMD64 host.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants