Skip to content

fix(state)!: refuse another release's state by its intent record version - #14266

Merged
cv merged 1 commit into
v1from
test/upgrade-from-previous-release
Nov 6, 2026
Merged

cv merged 1 commit into
v1from
test/upgrade-from-previous-release

Conversation

@cv

@cv cv commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

This release refuses deployment state written by another release, with a message that names both intent record versions, instead of calling the state corrupt. The intent record is now version 16, so every deployment created before this change is refused too, and its state is left unchanged.

Problem

#13703 and #13705 changed the saved intent record: inferenceProviders and sandboxes became maps. The record version stayed at 15, so the CLI parsed v0.1.0-rc9 state as current and failed with deployment intent record is corrupt; retain it for recovery. The compatibility reference promises that a release refuses older state and names the cause. Nothing caught a format change made without a version bump.

Change

  • RECORD_FORMAT in crates/nemoclaw-sdk/src/state/mod.rs pairs the record version, now 16, with the SHA-256 fingerprint of the record's JSON Schema. the_intent_record_format_changes_only_with_its_version fails when the schema changes and prints the next version and fingerprint to set. The fingerprint leaves out descriptions, titles, examples, comments, and x- extensions, so editing a doc comment doesn't force a bump. Rules that live in parsing code rather than the schema, such as accepted harness kinds, aren't covered.
  • Store::load reads the version before the rest of the record, so the refusal doesn't depend on what an older record holds. A new error, StateFromOtherRelease, says: "deployment state was written by a different NemoClaw release (intent record version N; this release reads M); keep using the CLI bundle that created the deployment, or destroy it with that bundle and create a new deployment; state retained". It replaces the release-specific "predates openshell_inference" message.
  • intent_from_another_release_is_refused_unchanged_whatever_it_holds replaces the older-version test. It covers an older and a newer version, a record body this release can't read, the message, and unchanged bytes.
  • The compatibility reference quotes the new message, and the release notes say that existing deployments are refused.

No state is migrated: v1 hasn't launched.

Raise the intent record to version 16 and check the version before reading
the rest of the record, so state written before #13703 and #13705 is refused
with a message naming both versions instead of reported as corrupt. A unit
test pins the record's JSON Schema fingerprint beside the version.
@cv

cv commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness recorded Pi 1.5.0 (session format 3), run as a helper agent Session header and harness install path
Skills recorded test-driven-development (complete read); write-tests (complete read); nemoclaw-contributor-create-pr (complete read) Tool read results to cutoff
Instruction files recorded AGENTS.md (injected); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup context and tool reads to cutoff
Tool calls partial typescript: 113 Includes failed calls; the typescript wrapper hides the nested workspace, shell, and git calls each program made
Session window recorded 2026-11-06T11:39Z to 2026-11-06T13:59Z; 2 h 20 min First event to cutoff, including idle time and the earlier investigation of an upgrade test that was dropped in favor of this change
Compactions recorded 0 Complete record to cutoff; two earlier turn ranges were replaced by summaries in context, not compacted
Models recorded bedrock-claude-opus-5-5 Model change event and assistant messages; no changes
Reasoning levels recorded high One thinking-level event; no changes

@cv
cv enabled auto-merge (squash) November 6, 2026 13:54
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@cv
cv merged commit d5b12ec into v1 Nov 6, 2026
68 checks passed
@cv
cv deleted the test/upgrade-from-previous-release branch November 6, 2026 14:09
cv added a commit that referenced this pull request Nov 11, 2026
)

Managed vLLM and Ollama services on Docker can list the GPU their
container gets in `spec.services.<name>.container.gpuDevices`, so they
start on a host with two or more GPUs. The list takes exactly one GPU
for now. The new field changes the intent record, which moves to version
18: this release refuses deployments that an earlier build created.

## Problem

On a Docker host with two or more NVIDIA GPUs, managed vLLM and Ollama
services don't start.
The generated graph asks the Docker provider for `gpus = "all"`, so the
model container sees every GPU, and the model runtime's `nvidia-smi`
check inside it stops with "managed inference requires exactly one
observable GPU".
No field selects a GPU, and `CUDA_VISIBLE_DEVICES` doesn't help because
`nvidia-smi` ignores it.
A DGX Station with an extra RTX or display GPU can't run a managed model
for the same reason.

Part of #13743: what is left is its item 2, host observation through the
`vllm_capacity` and `ollama_capacity` data sources, which #13928 tracks.

## Change

- `container.gpuDevices` on `kind: vllm` and `kind: ollama` services
lists the GPUs the model container gets, as `docker run --gpus device=`
names them: each a lowercase `GPU-…` UUID, as `nvidia-smi
--query-gpu=uuid` prints it, or an index from `"0"` to `"999"` as a
string.
- The schema and the parser accept exactly one entry, and their error
says that serving one model across several GPUs isn't implemented yet.
The list shape means the field stays the same when multi-GPU serving
arrives; lifting the limit is that work's last step.
- The item rules already reject duplicates, so lifting the limit needs
no new rule.
- Entries can't be `all`, a MIG ID, an uppercase or malformed UUID, or a
non-canonical index, because each goes straight into the provider's
`device=` syntax.
- `managed::Process` replaces `gpu: bool` and `gpu_device` with one
`gpus: Gpus` value: `None`, `All`, or `Devices`.
- The native spec sends a `DeviceIDs` request with every listed device.
- The Docker provider gets `gpus = "device=<id>"` for one device. The
SDK refuses to compile two or more: Docker provider v4.6.0 splits `gpus`
on commas, so it reads `device=0,1` as GPU 0 and a count of 1, which
Docker rejects, despite its documented `device=0,2` example. The
`gpu_requests` contract test pins both readings against the bundled
provider, so multi-GPU serving must choose another request form.
  - Without the field, the container still gets every GPU.
- Changing the field replaces the model container, so `updatePolicy:
Preserve` refuses it and `Recreate` replaces the container. The pinned
Docker provider plans a `gpus` change as delete and create, so no
replacement label is needed, unlike CPU and memory. `remote_service`'s
Ollama replacement scenario runs this against the pinned provider.
- The deployment document gains a field, so the intent record moves to
version 18, as `the_intent_record_format_changes_only_with_its_version`
requires since #14266. The release notes say so.
- The model runtime is unchanged: once Docker exposes one GPU, its check
passes.
- `docs/agents-inference/inference.md`, `models.md`, and
`docs/references/provider.md` describe the field.
`docs/resources/limits.md` gains a #13928 row: the capacity data sources
still refuse a host with two or more GPUs.
- `kind: container` services keep their boolean `container.gpu`, which
exposes every GPU.

## Beyond CI

A live run on an AMD64 host with eight NVIDIA H200 NVL GPUs, driver
615.71.10, Docker 29.9.2 with the NVIDIA runtime as its default and CDI
enabled, and NVIDIA Container Toolkit 1.20.1.
It used this change's earlier field, a `container.gpu` string naming one
GPU. `container.gpuDevices: [<id>]` compiles to the same `gpus =
"device=<id>"` and the same Docker device request, as
`a_named_gpu_reaches_opentofu_and_the_native_device_request` checks, but
the run hasn't been repeated with the new field.
- **Build:** the bundle and images came from `52448fb81`, this branch
with `v1` at `e2ce51c70` merged. The runtime images were pinned through
a loopback registry: vLLM
`sha256:14b55fe8056bb53e2ec62bf3c5d2e950ac34b4119c3f94399a46f79a7909b9f0`,
Ollama
`sha256:a892aa9375c51724d9862a8eca8b1a7f82d516880126992b163b609ef950a19c`,
and OpenClaw
`sha256:8e3999aa08bb73743fcdc3875cdd796dd7ca0ca2eaca967b22c21b0d8fabccca`.
- **Deployment:** one managed Docker gateway with a managed vLLM service
(`Qwen/Qwen3-4B`, the `h200` profile) and a managed Ollama service
(`qwen3:0.6b`), each serving its own OpenClaw sandbox.
- **Without `container.gpu`:** both model containers got
`DeviceRequests: [{"Count":-1,…}]`, both runtimes stopped with "managed
inference requires exactly one observable GPU", and apply failed.
- **With `container.gpu`:** vLLM named GPU 7 by UUID and Ollama named
`"6"`, with `updatePolicy: Recreate`. Plan showed both model containers
as delete and create, and apply completed.
- Docker received `DeviceIDs: ["GPU-7f4f9ee9-…"]` and `DeviceIDs:
["6"]`. Inside each container, `nvidia-smi` listed only that GPU.
- On the host, vLLM's engine ran only on GPU 7 and Ollama's server only
on GPU 6; GPUs 0 to 5 stayed idle.
- Each OpenClaw agent answered "What is 2 plus 2?" through its own
model.
- A second plan reported "No resource changes planned", and a second
apply kept both containers.
- **Destroy:** it retained the two model caches and the gateway storage,
as documented.

Not run: SSH placement on a host with two or more GPUs, a host whose
GPUs differ, such as a DGX Station with a display GPU, and ARM64.

---------

Signed-off-by: Hai Nguyen <[email protected]>
Signed-off-by: Carlos Villela <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Carlos Villela <[email protected]>
cv added a commit that referenced this pull request Nov 11, 2026
…ms (#14413)

The release notes now list every user-visible change on `v1` since the
`v0.1.0-rc9` tag, including the breaking ones, and four example pages
drop claims that later changes made false.

## Problem

`docs/about/release-notes.md` listed three breaking changes and none of
the features, fixes, and onboarding changes that reached `v1` after
`v0.1.0-rc9`; it didn't name the configuration shapes the parser now
rejects or the intent record version `v0.1.0-rc9` writes.
Some example claims went stale:

- `examples/spark/README.md` said the pinned OpenShell has the Podman
TLS initialization blocker, ai-openshell/openshell#3427; its fix merged before
OpenShell 0.1.0, and `v1` pins 0.1.7.
- `examples/station/README.md` and `examples/gtc-dc/README.md` required
exactly one visible GPU on the host; since #13929,
`container.gpuDevices` lets a service on a host with more GPUs request
one.
- `examples/hcl/travel-team` said Fabric's Deep Agents adapter can't
turn reasoning off, NVIDIA/NeMo-Fabric#433; NVIDIA/NeMo-Fabric#439 fixed
that, and the pinned catalog's Deep Agents `reasoning_effort` accepts
`none`.
- The travel team cited #13313 for the booking key its service doesn't
receive, but #13313 closed when `openshell_api` landed.

## Change

- `docs/about/release-notes.md` gains "Changes Since v0.1.0-rc9",
grouped by area, from the commits in `v0.1.0-rc9..origin/v1`; where a
later commit changed an earlier one, the entry describes the current
code, and changes added and removed after the tag aren't listed:
- Agents and interfaces: #14037, #14038, #14269, #13981, #14024, #14186,
#14052, #14385, #13971, #13858, #13947, #14039, #14042, #14044, #14343.
- Inference: #13929, #14391, #14396, #14398, #14400, #13963, #13912,
#13964, #14388, #14390, #14397.
- Gateways and Kubernetes: #13909, #13970, #13922 (an existing
namespace, refused at plan by #13756, is now bound; cluster-wide reads
dropped), #14014, #14169, #13921.
- Plan, apply, and diagnostics: #14224, #13756, #14141, #14133, #14135,
#13775, #13744, #13701.
- Onboarding: #13693, #13695, #13741, #13757, #13851, #13978, #14228,
#14233, #14334, #14336.
- Examples and builds: #14166, #14184, #14188, #14191, #14192, #14200,
#13889, #14267, #14312, #14315, #14355, b30e9b4, #13781, #13813,
#14246, and the pins in `versions.json` and `image/fabric/Dockerfile`.
- Its breaking changes since the tag:
- the intent record moving from 15, which `v0.1.0-rc9` writes, through
16 (#14266), 17 (#14343), 18 (#13929), 19 (#14391) and 20 (#14394);
  - name-keyed `sandboxes` and `inferenceProviders` (#13703, #13705);
- a recipe `compatibility.gpu` outside every hardware profile (#13912);
- model tuning the adapter doesn't accept (#14111), and Hermes's
`max_tokens` losing its default (#14296);
  - `skills.paths` resolution (#14296);
  - endpoint and `networkCIDR` validation (#13847, #14081);
- the HCL `gateway_values` attribute (#14014), and Kubernetes ownership
receipts from before #13922 and #14014.
  The two earlier items stay, under their own heading.
- `examples/spark/README.md` replaces the closed OpenShell#3427 blocker
with the Podman and remote-model limits in `docs/resources/limits.md`.
- `examples/station/README.md` and `examples/gtc-dc/README.md` require
one GPU visible in the model container, and point to
`container.gpuDevices` for a host with more.
- `examples/hcl/travel-team/README.md` and `WALKTHROUGH.md` drop the
NeMo-Fabric#433 limitation, and the travel team's booking-key statements
link #14417 instead of #13313.

Not listed, because both changes landed after the tag: Deep Agents Code
(#14043, #14250), `compatibility.gpuCount` (#14391, #14394), and the
"Creating infrastructure state" progress step (#14169, #14248).

Checked and left unchanged: the root `README.md`,
`crates/nemoclaw-onboarding/README.md`,
`crates/nemoclaw-cli/assets/README.md`, `internal-docs/README.md`, the
other example READMEs, and every example YAML header comment. The GPU
autoscaling README and `load.sh` read the JSON fields `OperationResult`
serializes, and ai-openshell/openshell#4287 is fixed only after the pinned
0.1.7. The two pre-tag release-note items still match the schema and
SDK. `docs/README.md` is left to #14412, which retires the stale field
reference snapshot it describes.

Not verified: whether Hermes sends the booking key's placeholder to MCP
servers; #14417 tracks the live check.

## Beyond CI

Each relative link and anchor in the changed files resolves to an
existing file and heading.
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression v1 NemoClaw v1 branch labels Nov 12, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants