Skip to content

refactor(fabric): leave configuration checks to Fabric - #13326

Merged
cv merged 1 commit into
v1from
refactor/fabric-checks-configs
Oct 16, 2026
Merged

cv merged 1 commit into
v1from
refactor/fabric-checks-configs

Conversation

@cv

@cv cv commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #13319. Part of #13318.

Failure

NemoClaw checked every agent configuration at plan time by running Fabric's planner against the image's adapter descriptors (resolve_run_plan_from_descriptors). That function came from an unmerged Fabric change (NVIDIA/NeMo-Fabric#318) and doesn't exist in Fabric v0.5.0. The only way to plan against an image's descriptors with v0.5.0 is to write them to temporary files for discovery.local_paths, a workaround for work that belongs to Fabric.

Decision

Fabric checks configurations itself, inside the sandbox, when the agent is configured.

  • Removed: fabric_agent no longer rejects, at plan time, a configuration its harness wouldn't accept. It still rejects one that doesn't deserialize as Fabric's own FabricConfig type, naming the field but not the value.
  • The SDK's compatibility report now checks three things:
    • that the image's Fabric revision matches (fabric_contract, unknown when it doesn't);
    • that the image provides the selected adapter (fabric_adapter, which replaces fabric_plan);
    • as before, that an explicit filesystem policy grants reads of the adapter's files, read from the catalog's descriptor.
  • Planning code removed: plan_configuration, configuration_rejection and FabricPlanningError.
  • Tests:
    • Planner tests: removed; the remaining SDK tests move to fabric_compatibility.rs.
    • Example check: the example-configuration test now checks each generated configuration against FabricConfig.
    • Discovery contract test: drops the case that only existed to show an unverified planner capability.
  • Docs describe the check at apply time and link Agent configurations are checked when applied, not when planned #13319.

A configuration the harness rejects now fails during apply rather than plan; for example, asking Pi to append system instructions. The live suites cover Fabric's rejection in a sandbox.

This still uses the current Fabric pin; the move to v0.5.0 follows in later PRs under #13318.

Validation

  • A new test failed before the change: a configuration whose harness settings break the adapter's schema is reported supported, with no fabric_plan check.
  • cargo ci passes locally: 1529 unit tests and 146 lifecycle tests.

NemoClaw planned every agent configuration against the image's adapter
descriptors with a Fabric function from an unmerged change. Fabric now
checks configurations itself, inside the sandbox when the agent is
configured. The SDK's compatibility report keeps the revision, adapter,
and filesystem checks, with fabric_adapter replacing fabric_plan.
@cv
cv enabled auto-merge (squash) October 16, 2026 08:08
@github-actions

Copy link
Copy Markdown
Contributor

@cv
cv merged commit cd99278 into v1 Oct 16, 2026
@cv
cv deleted the refactor/fabric-checks-configs branch October 16, 2026 08:19
gaveezy added a commit that referenced this pull request Oct 18, 2026
v1 moved from ef3115d to 7d7772e (#13326 to #13411).

Conflicts:

- `deployment_journey`'s count of single-sandbox examples: v1 added
  eight and this branch adds two, so the count is 40.
- The configuration reference's inference provider table: v1's `api`
  description, this branch's `credential` and `endpoint` descriptions.
  `schema --check` reports both generated files current.

Two tests from this branch read a sandbox's grants by name. #13384
made `policy.managed` an unlabeled list, so they now find the
inference grant by its `name`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cv added a commit that referenced this pull request Oct 18, 2026
… Fabric (#13433)

Closes #12016.

## Failure

Downstream blueprints extend NemoClaw agent images: the VSS blueprint,
for example, derives from one pinned by digest and adds skills, a domain
CLI and workspace files. Nothing stated what such a derived image must
keep. Trying it on current `v1` showed:

- **A conforming derived image works:** labels carry over through
`FROM`.
- **A missing catalog label fails at plan time with a misleading
message:** "Harness unavailable: The image declares no runtime for this
adapter", then advice about `spec.gateway.engine`.
- **A different Fabric revision in the image's catalog passes
silently.** NemoClaw compared revisions, but the result, "unknown", was
reported nowhere.
- **An image from an older base fails at apply** with "sandbox
unavailable: SANDBOX_PHASE_ERROR, reason unknown, exit code 1".
OpenShell's supervisor log shows the cause: the image's launch command
exited. An image from before the `fabric-agent-ctl` move lacks that
command.

## Decision

- **Fabric compatibility stays with Fabric.** NemoClaw no longer
compares the image's Fabric revision with the release's. That comparison
was NemoClaw judging another component, and it produced only a silent
"unknown". The image's own `fabric-agent-ctl` validates the agent
configuration and reports interface or validation errors when the agent
starts (#13379, #13326).
- **NemoClaw keeps checking its own contract,** with clearer messages:
- **Missing catalog label:** "Harness unavailable" now names
`io.nemoclaw.fabric.catalog` and the rule that a derived image keeps its
base image's labels. The local-engine postcondition says the same.
  - **The adapter and the platform:** checked as before.
- **Unexplained sandbox exits** now point to OpenShell's own log:
"`openshell logs SANDBOX --source sandbox` shows why its process
exited". Recognized OpenShell reasons keep their specific guidance.
- **Docs:** a new [derived agent images](docs/derived-images.md) page:
  - deriving by digest;
- what to keep: the catalog label, `/opt/fabric` with
`fabric-agent-ctl`, UID and GID 10001, and the platform;
  - using added skills and tools;
  - rebuilding on upgrade;
  - which failures appear at plan time and which at apply.

  The compatibility, provider and build pages link to it.
- **Base image publication** depends on releases (#12638). Until then,
the page says to build the bases and push them to your own registry.

## Validation

- **New tests**, each written before its change:
  - the missing-label message;
  - an unexplained sandbox exit pointing to `openshell logs`.
- **Updated tests:**
- a different Fabric revision now assesses as supported, with no
`fabric_contract` check;
- the prebuilt-images test allows exactly one build, the derived
reference image.
- **Live Docker:** the lifecycle test now runs an image derived from the
reference image, with one added executable, and runs that executable
inside the deployed sandbox. All 9 live Docker tests pass locally.
- **By hand, with `nemoclaw plan` and `apply`:** a conforming derived
image plans; a stale-revision image plans; a no-label image fails naming
the label; a pre-`fabric-agent-ctl` image fails at apply, and its
sandbox log shows why.
- `cargo ci` passes locally: 1,600 unit tests and 149 lifecycle tests.
The docs check reports 0 errors.
@wscurran wscurran added area: architecture Architecture, design debt, major refactors, or maintainability bug-fix PR fixes a bug or regression 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 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