Repository navigation
feat(provider): take Fabric requirements as a configuration and policy reads - #12910
Merged
Merged
Conversation
…y reads fabric_capabilities took requirements_json, a JSON object wrapping the Fabric configuration and the sandbox policy's filesystem read grants. Authors had to assemble that wrapper by hand, and the grants, a plain list of paths, could not be checked by OpenTofu. The data source now takes config_json, the same document fabric_agent_configuration takes, and filesystem_read, a list of strings. A configuration without harness.adapter_id is still rejected, and omitting config_json still limits discovery to the image metadata. Generated graphs pass the same values under the new names.
cv
enabled auto-merge (squash)
October 9, 2026 12:18
Contributor
kaofelix
added a commit
that referenced
this pull request
Oct 9, 2026
Part of #12782. ## Failure A re-read of [the provider guide](docs/provider.md) and [scope](docs/design/scope.md) against `v1`'s code and the bundled providers' schemas found one error and two stale statements: - The Fabric provider section said `destroy` permits removing agent configurations. Removal never needs it: it releases the binding without changing the sandbox. - The guide named one standalone fixture as the only authored-HCL coverage; every provider type now has an authored-HCL lifecycle test. - The direct-use section still waited for verified implementations, although every type now takes HCL inputs. Scope also did not state the requirement the provider split established. ## Decision Correct the three statements, keeping publication and the direct-use workflow pointed at #12638 and #12645. Add to scope's responsibilities: provider types take their backends' inputs in HCL, not documents compiled by the SDK, except Fabric configurations and runtime bindings, whose open schemas have no fixed OpenTofu type. These changes were meant for #12910, which merged before they were pushed. ## Validation - Each corrected statement was checked against the code on `v1` and the schemas of the bundled `nemoclaw`, `openshell`, and `fabric` providers, dumped through pinned OpenTofu. - The documentation check (`cargo run -p nemoclaw-build -- fern check`) reports no errors. - `cargo ci` passed on the same documentation content before rebasing it onto `v1`, including 113 lifecycle tests.
6 tasks done
cv
added a commit
that referenced
this pull request
Oct 9, 2026
…#12913) Stacked on #12908. Closes #12880 together with it. ## Failure Fabric types were exercised through OpenTofu only by SDK-generated system scenarios, and by one Pi test in `nemoclaw-e2e` that needed both the `openshell` and `fabric` providers. Nothing checked each Fabric type on its own, and `fabric_capabilities` had no OpenTofu test at all. ## Decision `fabric-provider` gets a `contract` test binary that uses the shared fake gateway from #12908. - **`fabric_agent_configuration`:** the Pi test moves here unchanged and applies a static fixture. It checks four things: - An invalid configuration fails at its field without repeating the value. - Updates keep the sandbox. - A stopped host is reconfigured. - A lost reply is not retried. - **`fabric_sandbox_readiness`:** the configured agent reads ready. Failed health reads not ready, without failing apply or writing to the sandbox, and recovered health reads ready again. - **`fabric_capabilities`:** this uses the `config_json` and `filesystem_read` inputs from #12910. A fake Docker engine serves an image that declares a Fabric catalog. - A compatible image reports its runtime binaries. - Another platform is unsupported, and so is a read policy without the runtime's paths. - A missing image is unknown. - The engine is only read. - **Coverage:** a test requires a contract test for every Fabric type. - **`nemoclaw-e2e`:** no longer tests a single provider type. The unused `openshell_resources.tf` template is removed. - **CI:** the lifecycle profile selects the Fabric contract binary. - **Docs:** `docs/contributing/integration-tests.md` describes the Fabric contract tests. ## Validation - **Lifecycle profile:** locally, both contract binaries pass through the lifecycle profile: 50 tests in 41 s wall. - **Lint:** workspace clippy at `-D warnings` and fmt are clean. - **Docs tests:** the `nemoclaw-build` docs tests pass.
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 #12782.
Failure
fabric_capabilitiestook its requirements asrequirements_json: a JSON object wrapping the Fabric configuration and the sandbox policy's filesystem read grants.Authors had to assemble that wrapper by hand, a shape no other type uses.
The grants are a plain list of paths, but inside the wrapper OpenTofu could not check them; a malformed list surfaced only as a generic decoding failure.
Decision
The data source takes two inputs instead:
config_json: the Fabric configuration, the same documentfabric_agent_configurationtakes, so a configuration can pass the same value to both.filesystem_read: the policy's read grants as a list of strings.The configuration stays a string for the reason recorded on #12788: Fabric's configuration accepts open extension keys, and the pinned
tf-providercannot decode a value whose type is chosen by the author.The data source builds the same internal
FabricRequirementsfrom the two inputs, so compatibility checks are unchanged.A configuration without
harness.adapter_idis still rejected, and omittingconfig_jsonstill limits discovery to image metadata.Generated graphs pass the same values under the new names.
Validation
filesystem_readis rejected by OpenTofu at that attribute.requirements_jsoninto its two parts.cargo cipassed on the branch after mergingv1, including 113 lifecycle tests.