Skip to content

refactor(fabric): build the image catalog from the image's own declarations - #13329

Closed
cv wants to merge 2 commits into
v1from
refactor/image-catalog
Closed

cv wants to merge 2 commits into
v1from
refactor/image-catalog

Conversation

@cv

@cv cv commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Closes #13328. Part of #13318.

Failure

The agent image's catalog was Fabric's discovery result, from Fabric.discover(): every installed adapter's descriptor, provenance and workflow targets. That API came from the unmerged NVIDIA/NeMo-Fabric#318 and isn't in Fabric v0.5.0. Finding descriptor files ourselves would reimplement Fabric's discovery or depend on its repository layout.

Decision

The catalog records only what NemoClaw's image build knows (catalog schema version 3).

Image

  • adapters.json: each harness stage declares its adapter in /opt/nemoclaw/adapters.json, with the files it reads and the executables it runs. This replaces runtime-files.json. docker-bake.hcl gives each harness an adapter_id, passed to generic stages as ADAPTER_ID. The executables match what the descriptors required: node for OpenClaw and Pi, nothing else.
  • catalog.py: no longer imports Fabric. It validates the declarations, resolves the executables with the runtime manifest, and lists adapter IDs. The reference image's dummy_catalog.py writes the same format.
  • The bundled catalog.json: lists the adapters NemoClaw builds images for, and a test checks it against docker-bake.hcl.

Rust

  • FabricCatalog: adapters are {adapter_id}, with no descriptors, provenance or targets. Adapter identifiers stay opaque: they only need to be present and unique.
  • Compatibility: filesystem-grant checks cover the image's runtime files and the runtime's required paths.

Onboarding no longer generates questions from adapter schemas:

  • Removed: adapter-settings and native-settings questions (ActiveAdapterSettings and NativeSettings scopes, adapter:, model:/ and workflow:/ selectors), with the code, decision tracking and tests that only served them. Users write harness settings in the configuration, and Fabric validates them when the agent is configured.
  • Kept: the harness question, which still offers the catalog's harnesses.
  • New report: a chosen harness the catalog doesn't list is reported as unverified, so the document isn't finalized. Before, a missing schema did that implicitly.
  • Signatures: JourneyDefinition::start no longer takes Capabilities, which it only used for schema checks.

Docs: build.md, provider.md, sandbox-network.md, sdk.md, agents.md, configuration-references.md, reference/fabric-harnesses.md and design/fabric-management.md describe the new catalog and link #13328.

Fabric's own discovery when running an adapter is unchanged: a configuration's discovery.local_paths, and the Pi stage linking its descriptor where Fabric's runtime finds it. Only NemoClaw's catalog stops depending on it. This still uses the current Fabric pin; v0.5.0 follows.

Validation

  • cargo ci passes: 1499 unit tests and 146 lifecycle tests.
  • The image checks pass (docker buildx bake check): Ruff lint and format, 72 image unit tests including the rewritten catalog contract tests, and the reference tests.
  • cargo ci live-docker passes all 8 tests, with Pi, dummy and proxy images built with the new catalog.
  • cargo ci live-kind passes all 5 tests.
  • New tests check the declarations' validation, the catalog format, the bundled catalog against the build table, and the unlisted-harness report.

…ations

The image catalog recorded Fabric's discovery result, an API from an
unmerged Fabric change that Fabric v0.5.0 doesn't have. Each harness stage
now declares its adapter, files, and executables; catalog.py publishes
those without importing Fabric, and the catalog lists adapter IDs only.
Onboarding no longer generates adapter or native settings questions from
schemas; Fabric validates harness settings when the agent is configured.
@cv
cv enabled auto-merge (squash) October 16, 2026 10:06
@github-actions

Copy link
Copy Markdown
Contributor

The built-image tests compared the label with Fabric discovery and
runtime-files.json, which the descriptor-free catalog replaced. They now
compare it with catalog.py's output and the adapters each stage declares.
@cv
cv disabled auto-merge October 16, 2026 11:23
@cv

cv commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

Pausing: auto-merge is off. Fabric v0.5.0 publishes adapter descriptors through nemo-fabric-adapter-catalog, a dependency-free package with Fabric's own snapshots of the bundled adapters' descriptors, and through inspect_adapter() (see the v0.5.0 release notes). This PR assumed v0.5.0 had no public way to get descriptors and removes the onboarding questions that use them.

The plan is to fold the catalog change into the Fabric v0.5.0 pin PR and build the catalog from Fabric's package, rather than dropping descriptors.

@cv

cv commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #13369, which builds the catalog from Fabric v0.5.0's nemo-fabric-adapter-catalog package. The descriptors are kept, so onboarding keeps its settings questions.

@cv cv closed this Oct 16, 2026
cv added a commit that referenced this pull request Oct 16, 2026
Part of #13318. Closes #13320, #13321, #13322, #13323, #13324 and
#13328. Supersedes #13329. PRs into `v1` don't close issues, so I'll
close them by hand once this merges.

## Failure

NemoClaw pinned Fabric at `24f068c8`, a commit from an unmerged branch.
On top of that pin, NemoClaw carried code that does Fabric's work:

- patches to Fabric's error codes and to its OpenClaw adapter;
- a copied Hermes plugin and a Hermes source patch;
- a catalog built from Fabric's unreleased discovery API;
- support for adapter settings that only that branch had.

Fabric v0.5.0 is the first release covering what we need: a public
adapter catalog package, and the `fabric-agent-ctl` sandbox bridge.

## Decision

Pin Fabric v0.5.0 (`5574117f`) and use what Fabric publishes. Drop what
it doesn't support, with issues tracking each loss, and add no
workarounds.

**Catalog**
- **Descriptors:** each image's catalog now combines the adapters its
build stage declares with their descriptors from Fabric's
`nemo-fabric-adapter-catalog` package. The package is built from the
pinned source archive and read through `get_adapter_descriptor()`.
- **Files and executables:** the build declares them, since v0.5.0
descriptors no longer list them.
- **The checked-in catalog** is regenerated the same way.
- **Validation:** NemoClaw now checks each descriptor as a Fabric
`AdapterDescriptor`. The discovery-result type it used before doesn't
fit descriptors that come from Fabric's package.

**Removed**
- **Fabric patches:** the error-code patch (#13324) and the OpenClaw
reconfiguration patch (#13323), with their notices.
- **Hermes:** the metadata patch, which Fabric no longer ships; the
copied Tavily plugin (#13322); and the web and terminal UI builds,
together with all Hermes native-server docs and examples (#13321).
v0.5.0's Hermes settings are closed and have no `mode` or `interfaces`.
- **OpenClaw:** the dashboard (#13360) and the Brave and Tavily plugins
(#13361). v0.5.0's OpenClaw adapter has no `native_config`; those issues
stay open until it can configure them.
- **Model settings:** `model_metadata` and `reasoning_effort` in
examples, which the adapters no longer accept.
- **Code:** NemoClaw's OpenClaw context-budget warnings, which relied on
OpenClaw internals.

**Model fields follow each adapter's descriptor**
- **Generated `base_url`:** sent only to adapters whose descriptor
accepts it. v0.5.0's remote agent rejects one, so every remote-agent
deployment would otherwise have failed.
- **Model `api`:** sent from the provider definition only to adapters
whose descriptor declares one. Pi does; the others no longer do, so they
no longer receive it (#13320).
- **New `overrides.extensions` route field:** passes declared model
extensions through, such as Pi's `context_window`, and Fabric validates
them. Pi needs it for every model served through OpenShell's gateway. It
can't set a field the deployment already sets.

**Bridge and images**
- **Input:** the bridge passes invocation input through unchanged, as
Fabric's own `fabric-agent-ctl` does. v0.5.0's adapters take a
plain-text prompt. The object-only rule and the Hermes-only text
unwrapping are gone.
- **Pi image:** keeps the Pi harness package Fabric's lock pins
(`pi-coding-agent` 1.0.3), which packing the adapter had dropped.
- **Examples:**
- `openclaw-dashboard.yaml` becomes `openclaw.yaml`, which getting
started uses; step 5 now sends a request through `openshell sandbox
exec`.
- The OpenClaw web search examples become a harness-neutral
`web-search.yaml`.
  - The full OpenClaw example no longer sets up tracing or search.

**Tests**
- **Onboarding and authoring:** expectations now use v0.5.0's real
descriptors.
- **Image tests:** those that relied on Fabric's discovery fixtures,
which v0.5.0 no longer ships, were rewritten, or removed where the
fixture itself was what they tested.
- **Live tests:** the Kubernetes test's Pi configuration and the service
image fixtures were updated.

## Validation

- `cargo ci` passes locally: 1518 unit tests and 144 lifecycle tests.
- Image lint, 65 image unit tests, and the reference tests pass.
- All 11 agent images qualify with `cargo images qualify`.
- The native lifecycle (start, invoke against a local inference fixture,
stop) passes for OpenClaw, Hermes and Pi.
- `cargo ci live-docker` passes (8 tests), and so does `cargo ci
live-kind` (5 tests, with Pi on ARM64).
- `nemoclaw-build fern check` reports 0 errors.

**Not run here:** the Brev, Spark and hosted-parity live tests, and
`live-kind` with OpenClaw, which runs on AMD64.
@wscurran wscurran added area: architecture Architecture, design debt, major refactors, or maintainability area: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch labels Oct 26, 2026
@cv
cv deleted the refactor/image-catalog branch November 21, 2026 20:45
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: onboarding Onboarding FSM, provider setup, sandbox launch, or first-run flow bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants