Repository navigation
feat(provider): serve fabric_capabilities from the fabric provider - #12844
Merged
Merged
Conversation
Fabric agent configuration and sandbox readiness were the last nemoclaw types that reach the gateway. The nemoclaw provider therefore kept the gateway connection, a deferred connection state, and platform_only, which Kubernetes platform graphs needed before gateway credentials existed. terraform-provider-fabric serves fabric_agent_configuration and the fabric_sandbox_readiness data source. It takes the openshell provider's gateway settings, now GatewayConfig and GatewayClient::configure in openshell-provider, and reaches each sandbox's Fabric host through the OpenShell client. The Fabric bridge and agent configuration code moves from nemoclaw-provider unchanged apart from imports. The nemoclaw provider's only setting is destroy. Generated graphs configure the gateway connection on the openshell and fabric providers, Kubernetes platform graphs omit both, and teardown sets destroy on all three. The bundle ships the third binary. The SDK refuses state that holds nemoclaw_agent_configuration or nemoclaw_sandbox_readiness before reading it. Fabric capabilities stays in nemoclaw until its image-reading types leave the SDK. Part of #12788.
The nemoclaw provider no longer takes a gateway connection.
schema_accepts, the offline JSON Schema check that the authoring journey uses, lived in fabric_capabilities beside Fabric planning, which does not use it. It moves to json_schema with its tests, so the Fabric types can leave the SDK without taking it along. A planner test named for schema_accepts never called it; its name now says what it checks.
The Fabric catalog an image advertises, the capability assessment and configuration planning against a sandbox's requirements, the observation that reports them, and image-metadata bundle verification lived in nemoclaw-sdk beside the YAML document and compiler. The fabric provider needs them to serve fabric_capabilities without the SDK. nemoclaw-fabric holds them and depends on nemoclaw-backend, nemoclaw-openshell (for image runtime layouts), and nemo-fabric-core. Deriving requirements from a sandbox's YAML stays in the SDK as requirements_for_sandbox, replacing FabricRequirements::for_sandbox. The SDK re-exports the moved modules at their previous paths. Part of #12788.
nemoclaw_fabric_capabilities and nemoclaw_engine_capabilities shared one data source with a fabric flag, and the engine read of an image's Fabric label lived in nemoclaw-discovery. The label read moves into nemoclaw-fabric behind its client feature, which the SDK leaves off. fabric_capabilities becomes a fabric provider data source with unchanged inputs and outputs; it reads the engine named on it and needs no gateway. nemoclaw_engine_capabilities keeps only the engine read. Generated discovery graphs and SDK graphs use the new type, and the SDK refuses state that holds nemoclaw_fabric_capabilities before reading it. Part of #12788.
cv
enabled auto-merge (squash)
October 8, 2026 18:08
Contributor
This was referenced Oct 8, 2026
cv
pushed a commit
that referenced
this pull request
Oct 8, 2026
…ame (#12857) Part of #12788 (step 2 of 3, the last). Stacked on #12844, which is stacked on #12842; it retargets as those merge. ## Failure - `fabric_agent_configuration` checked `config_json` against Fabric's types only while planning, and reported any failure as `observation query failed`, without saying what was wrong. - `fabric_sandbox_readiness` took one `sandbox` map of strings. Generated graphs filled it with every string attribute of the sandbox, filtering out its typed inputs, and merged in the configuration's `config_json`. OpenTofu could not check which keys the read needed; a missing or misspelled key surfaced only when the read failed. ## Decision Two commits: 1. **Invalid configurations name the rejected field.** `config_json` is checked during validation with `serde_path_to_error`, and reported as `Invalid config_json` on that attribute: `config_json is not a valid Fabric configuration at harness.adapter_id`. The path passes through `diagnostic_field`; the value and Fabric's own message, which can quote it, never appear. To build that message, `ValidateAttribute` returns `Cow<'static, str>` instead of `&'static str`; storage's checks return the same fixed text. 2. **Readiness takes its inputs by name.** It requires the sandbox's `workspace`, `name`, `id`, `owner`, `generation`, `agent_name`, `agent_runtime`, and `runtime_json`, and the configuration's `config_json`: the keys the read already used. The checks are unchanged; validation now also requires `runtime_json` and `config_json`. Generated graphs reference each attribute directly, and the filter for typed sandbox inputs goes away. Two items in #12788 were deliberately not done; the issue records why: - **`config` as an HCL value.** Fabric's configuration schema is open, so generated blocks would drop extension keys. A `dynamic` attribute would fit, but the pinned `tf-provider` decodes state without the schema and cannot tell a dynamic attribute's `[type, value]` pair from a two-element list. `config_json` stays a JSON string. - **Optional `owner` and `generation` on the configuration.** They are the sandbox's identity, which the provider verifies before acting, not the configuration's own. They stay required. ## Validation - New unit tests, written first: a valid configuration passes; a wrong type at `harness.adapter_id` and malformed JSON are reported without the input. Readiness exposes the nine required inputs and no `sandbox` map, hands the bridge exactly those nine, defers on unknown inputs, rejects missing or empty ones, and does not echo rejected values. - The standalone Pi lifecycle test now plans a rejected configuration through OpenTofu: it fails with `Invalid config_json ... at harness.adapter_id`, never shows the value, and makes no sandbox call. - `cargo ci`: all selected steps passed on linux_arm64, including 108 lifecycle tests.
cv
pushed a commit
that referenced
this pull request
Oct 9, 2026
…nt (#12858) Follow-up to #12844. ## Failure #12844 moved `FabricPlanningError`, the SDK's only `thiserror` use, into `nemoclaw-fabric`, so `nemoclaw-sdk` still declared `thiserror` without using it. The same PR added `nemoclaw_fabric_capabilities` to the refused earlier types, an image read, but the list's comment still described them as OpenShell objects and Fabric agents. ## Decision - Remove `thiserror` from `nemoclaw-sdk`'s dependencies. - Describe `EARLIER_TYPES` as the OpenShell and Fabric types the `nemoclaw` provider served before the `openshell` and `fabric` providers. No behavior changes. ## Validation - `cargo ci fmt`, `clippy`, `build`, and `test` pass on linux_amd64. - `cargo tree -p nemoclaw-sdk` no longer lists `thiserror` as a direct dependency.
This was referenced Oct 9, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #12788 (step 1b of 3). Stacked on #12842; it retargets to
v1when #12842 merges.Failure
nemoclaw_fabric_capabilitieswas the last Fabric type in thenemoclawprovider. It shared one data source withnemoclaw_engine_capabilities, switched by afabricflag, and the code it needed (the Fabric catalog an image advertises, capability assessment, configuration planning, the observation it reports, and the engine read of the image label) lived innemoclaw-sdkandnemoclaw-discovery. Thefabricprovider could not serve it without depending on the SDK.Decision
Three commits, reviewable separately:
schema_acceptsgets its own module (nemoclaw-sdk/src/json_schema.rs) with its tests. It is the offline JSON Schema check the authoring journey uses, and lived infabric_capabilities.rsby accident; Fabric planning never called it. A planner test named for it, which never called it, is renamed for what it checks.nemoclaw-fabric: Fabric's image contract. It takes the catalog types, capability assessment and configuration planning,FabricObservation, image-metadata bundle verification and its tests, andvalid_for. It depends onnemoclaw-backend,nemoclaw-openshell(image runtime layouts), andnemo-fabric-core. Deriving requirements from a sandbox's YAML stays in the SDK asrequirements_for_sandbox, replacingFabricRequirements::for_sandbox. The SDK re-exports the moved modules at their previous paths, anddiagnostic_fieldbecomes public because the SDK's discovery graph labels diagnostics with it.observe_fabricandjudge_imagemove intonemoclaw-fabricbehind a defaultclientfeature, likenemoclaw-docker; the SDK leaves it off, so it still does not link the Docker client.fabric_capabilitiesbecomes afabricprovider data source with unchanged inputs and outputs. It reads the engine named on it and needs no gateway.nemoclaw_engine_capabilitieskeeps only the engine read, without the flag.nemoclaw_fabric_capabilitiesbefore reading it.docs/provider.mdlists the data source under the Fabric provider; the Fabric harness reference links the moved assessment code.Validation
state_with_openshell_types_from_the_nemoclaw_provider_is_rejected_before_any_readnow coversnemoclaw_fabric_capabilities; it failed first because the SDK ran OpenTofu on that state.fabric-providerwith it;nemoclaw-providertests assert the engine schema has no Fabric inputs and that it no longer servesfabric_capabilities; thefabric-providerschema test asserts it servescapabilitieswith a requiredengine.cargo ci: all selected steps passed on linux_arm64, including 108 lifecycle tests.cargo tree -p fabric-providercontains nonemoclaw-sdk;cargo tree -p nemoclaw-sdk -i bollardfinds nothing.