Skip to content

docs: describe each deployment as one OpenTofu root - #13287

Merged
cv merged 6 commits into
v1from
docs/single-root
Oct 15, 2026
Merged

cv merged 6 commits into
v1from
docs/single-root

Conversation

@cv

@cv cv commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Closes #13254. Part of #13131. Stacked on #13286.

Failure

After #13286, the docs still described two OpenTofu stages: separate runtime and OpenShell plans, a runtime/ state subdirectory, deferral of OpenShell planning until the gateway exists, a gateway-running check, both teardown plans, runtime-only recovery markers, and the removed "Resources awaiting a complete plan" output.

Decision

Describe what the SDK does now:

  • design/architecture.md: "Why Managed Apply Has Two Stages" becomes "Why Each Deployment Is One OpenTofu Root". It covers how dependencies apply the runtime before objects and destroy in reverse; why a fresh deployment can plan the gateway and its objects together; and that a stopped gateway is an ordinary failure. The recovery rules now describe the lost-creation tracking: OpenShell and Fabric creations only, and forgetting creations OpenTofu never started.
  • design/apply-flow.md: one plan → SDK checks → apply block in the diagram and steps.
  • Reference and operations docs: stage wording and stale paths in state.md (no runtime/ directory; the Helm checkpoint is at the state root), provider.md, reference/cli.md, usage.md, and the contributor testing docs.
  • Provider list: provider.md and apply-flow.md no longer name the removed nemoclaw provider.

Validation

  • cargo run -p nemoclaw-build -- fern check: 0 errors; the same single warning as before this change.
  • No remaining references to runtime or OpenShell stages, the runtime/ state directory, or the removed output. design/recipes.md's image-preparation "runtime stage" is unrelated and unchanged.

cv added 5 commits October 15, 2026 12:20
Objects took the gateway data source's ref, which a single root would
leave unknown at plan time whenever the read waits for apply, planning
objects as changed. They now take the same ref as a literal, known while
planning; the gateway reads still gate them through depends_on and a
compatibility precondition.
Planning a new OpenShell object connected to its gateway to check that
the name wasn't already taken. On a fresh install with one root, the
gateway doesn't exist until the same apply installs it, so every first
plan would fail.

Planning now only validates the gateway ref. reconcile already refuses a
name owned by someone else before every mutation, so the ownership
check moves to apply.
…fu root

The SDK ran a runtime stage and an OpenShell stage as separate roots,
with separate state, plans, markers, deferrals, and teardown. Compile
one graph instead: the runtime's gateway read replaces the plan-time
read, and the apply-time gateway read that every object waits on now
waits on every runtime resource and readiness read, so the runtime
settles first within one apply and destroy removes objects first.

Plan, apply, export, and destroy use one state. Only OpenShell and
Fabric creations are tracked for lost replies, and a failed apply
forgets new creations OpenTofu never started. The runtime stage, its
markers, the gateway deferral, deferred_resources, and the Kubernetes
unfinished-platform rule are removed.
The architecture, apply-flow, state, provider, CLI, usage, and testing
docs described separate runtime and OpenShell stages, a runtime state
subdirectory, deferred OpenShell planning, and runtime-only recovery
markers. Describe one graph whose dependencies order runtime before
objects, and the lost-creation tracking that replaces those markers.
Base automatically changed from feat/single-root to v1 October 15, 2026 21:23
@cv
cv enabled auto-merge (squash) October 15, 2026 21:25
# Conflicts:
#	crates/nemoclaw-sdk/src/deployment/runtime.rs
#	crates/nemoclaw-sdk/src/deployment/runtime/tests.rs
#	docs/reference/cli.md
@cv
cv merged commit abd1037 into v1 Oct 15, 2026
@cv
cv deleted the docs/single-root branch October 15, 2026 21:38
@github-actions

Copy link
Copy Markdown
Contributor

@wscurran wscurran added area: architecture Architecture, design debt, major refactors, or maintainability area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch labels Oct 26, 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: architecture Architecture, design debt, major refactors, or maintainability area: docs Documentation, examples, guides, or docs build chore Build, CI, dependency, or tooling maintenance v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants