Skip to content

[4/4] feat(environments): add onboarding catalog and commands - #2443

Merged
Glorf merged 2 commits into
mainfrom
mbien/environment-onboarding-catalog
Aug 12, 2026
Merged

Glorf merged 2 commits into
mainfrom
mbien/environment-onboarding-catalog

Conversation

@Glorf

@Glorf Glorf commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Completes the user-facing onboarding MVP with a local registry and four commands:

gym env init --environment my_eval --profile custom-gym-verifier
gym env validate my_eval
gym env test my_eval
gym env publish my_eval

Stack

This PR contains one commit and is based on the 3/4 branch.

What this PR delivers

  • A unified local workload registry for manifest-backed and legacy environments and benchmarks.
  • Transition visibility for runnable compositions still colocated under resources_servers/; reusable scorer, tool, and state components without agent datasets remain component entries.
  • Kind-filtered list, search, inspect, status, profile, domain, and JSON views.
  • Environment and benchmark targets for gym env init.
  • Static checks, advisory profile evidence, warnings, and mirror synchronization through gym env validate.
  • Verifier execution in the resources server's managed dependency environment through gym env test.
  • A local structural gym env publish check that reruns validation and fixtures, rejects manifest metadata placeholders, and confirms exact catalog discovery as experimental.
  • Public documentation for terminology, ownership, profiles, migration behavior, and all four commands.

publish does not assess implementation quality, run a full evaluation, deploy, commit, push, or claim certificate-backed validation.

Compatibility

  • Existing runtime configuration and execution remain unchanged.
  • Existing init, config validation, resources-server test, list, and search forms remain available.
  • Manifest-free runnable workloads remain visible with no-manifest status and continue to run as before.
  • Malformed manifests are isolated during global discovery and remain directly diagnosable with gym env validate --manifest ....

Validation

  • 510 sandbox-safe onboarding and affected CLI tests pass; the socket-binding case also passes outside the sandbox.
  • CI-version Ruff and whitespace checks pass.

Staged follow-ups

  • Capability declarations, concrete component-version resolution, pinning, and swap refusal.
  • Runtime readiness probes as a separate pre-run validation layer.
  • In-place manifest backfill and phased CI enforcement for legacy runnable compositions.
  • Repository publication automation, ownership updates, and immutable version enforcement.
  • Certificate-backed validated status and a hosted catalog index.
  • A session-stateful onboarding sentinel and stored-trajectory replay coverage.

These follow-ups strengthen runtime readiness, governance, and migration. They do not change the manifest contract, guided authoring path, local checks, or transition registry delivered here.

@copy-pr-bot

copy-pr-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Glorf Glorf changed the title feat(environments): add onboarding catalog and commands [4/4] feat(environments): add onboarding catalog and commands Aug 10, 2026
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch from 9656332 to c9c744d Compare August 10, 2026 12:31
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from ae30f6a to 7c11d91 Compare August 10, 2026 12:31
@Glorf
Glorf marked this pull request as ready for review August 10, 2026 12:38
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch from c9c744d to 46ac8c3 Compare August 10, 2026 16:29
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from 7c11d91 to 6b95ead Compare August 10, 2026 16:29
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch from 46ac8c3 to b7e2b26 Compare August 10, 2026 18:03
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from 6b95ead to 836d71a Compare August 10, 2026 18:03
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch from b7e2b26 to 9addc03 Compare August 11, 2026 11:49
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch 2 times, most recently from 864d5e6 to f90471f Compare August 11, 2026 12:04
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch 2 times, most recently from 1b3f459 to ca7522f Compare August 11, 2026 12:51
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from f90471f to 5fec54f Compare August 11, 2026 12:51
@github-actions github-actions Bot added the sla:triage-overdue Review assignment is over the one-business-day SLA label Aug 11, 2026
@ritaneves
ritaneves force-pushed the mbien/environment-onboarding-scaffold branch from ca7522f to 5804e32 Compare August 11, 2026 15:58
@ritaneves
ritaneves force-pushed the mbien/environment-onboarding-catalog branch from 5fec54f to f684866 Compare August 11, 2026 15:58
Glorf added a commit that referenced this pull request Aug 11, 2026
## Summary

Defines an opt-in `manifest.yaml` contract for Gym environments and
benchmarks without changing how workloads run.

## Stack

- **1/4 — Manifest contract** (this PR)
- 2/4 — [Static manifest
validation](#2441)
- 3/4 — [Profile-aware
scaffolding](#2442)
- 4/4 — [Onboarding catalog and
commands](#2443)

Each PR contains one commit and is based on the preceding branch.

## What this PR delivers

- A strict manifest model for identity, catalog metadata, reward
semantics, determinism, integration shape, and config-owned composition
mirrors.
- Four integration profiles matching Gym's existing extension points:
`custom-gym-verifier`, `custom-gym-agent-loop`, `external-agent-loop`,
and `external-rollout-driver`.
- A Pydantic contract that can emit Draft 2020-12 JSON Schema on demand.
- SPDX expression validation through `packaging`, including `LicenseRef`
values and Gym's private-license labels.
- A neutral example, focused contract tests, and contributor
documentation.

The manifest is the single place to read a workload declaration. Gym
configuration remains the authoritative place to write runtime
composition. Names and versions must be non-empty; Semantic Versioning
is documented guidance, while immutable-version enforcement is staged
work.

## Compatibility and scope

- Existing environments and benchmarks continue to run without a
manifest.
- No runtime dispatch, wire protocol, server route, or existing workload
changes.
- The manifest remains opt-in until later stack layers consume it.
- Capabilities, concrete version resolution, pinning, swap enforcement,
and certificate-backed validation remain follow-ups.

## Validation

- Manifest parsing, invariants, SPDX expressions, serialization, and
schema tests.
- Independent Draft 2020-12 validation of the generated representation.
- Ruff and whitespace checks.

Signed-off-by: Michal Bien <[email protected]>
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from f684866 to f0a30ba Compare August 11, 2026 19:36
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch 2 times, most recently from 8ab999e to 6a5e7e7 Compare August 11, 2026 19:38
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from f0a30ba to b0396ff Compare August 11, 2026 19:38
bxyu-nvidia
bxyu-nvidia previously approved these changes Aug 12, 2026
@github-actions github-actions Bot removed the sla:triage-overdue Review assignment is over the one-business-day SLA label Aug 12, 2026
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from b0396ff to 4da4619 Compare August 12, 2026 07:30
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch from 6a5e7e7 to 61ec62c Compare August 12, 2026 07:30
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from 4da4619 to f937ff7 Compare August 12, 2026 08:02
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch from 61ec62c to 65cb4e0 Compare August 12, 2026 08:02
Glorf added a commit that referenced this pull request Aug 12, 2026
## Summary

Adds service-free validation for manifest-backed environments and
benchmarks. It checks the declaration against resolved Gym configuration
before any service starts.

## Stack

- 1/4 — [Manifest
contract](#2417)
- **2/4 — Static manifest validation** (this PR)
- 3/4 — [Profile-aware
scaffolding](#2442)
- 4/4 — [Onboarding catalog and
commands](#2443)

This PR contains one commit and is based on the 1/4 branch.

## What this PR delivers

- Offline resolution of Gym configuration and inheritance without
endpoint probes, service startup, or model calls.
- Manifest identity and catalog-path checks.
- Config-authoritative component and dataset selection, including an
actionable error when composition has more than one dataset-bearing
agent.
- Read-only comparison of manifest composition mirrors with resolved
config, plus explicit atomic synchronization.
- Advisory integration-profile inference with evidence, warnings for
mismatches, and `unknown` when static source inspection is inconclusive.
- Static parsing of preparation and rollout-driver hooks, plus streamed
JSONL and prompt-contract validation.

## Compatibility and scope

- Gym config remains the runtime source of truth; manifest mirrors never
select runtime composition.
- Validation does not import workload components, execute preparation
code, start services, provision compute, call a model, probe endpoints,
or inspect output-directory writability.
- Profile inference reports evidence and never dispatches or gates
runtime behavior.
- Existing manifest-free workloads continue to run unchanged.

## Validation

- Representative built-in and custom profile-inference cases.
- Mirror repair, multi-agent ambiguity, hook parsing, prompt
application, and malformed-data regressions.
- Ruff and whitespace checks.

## Next layer

The next PR adds non-destructive profile-aware scaffolding and reusable
verifier fixtures.

Signed-off-by: Michal Bien <[email protected]>
@Glorf
Glorf force-pushed the mbien/environment-onboarding-scaffold branch from 65cb4e0 to e3d71b8 Compare August 12, 2026 08:27
@Glorf
Glorf requested review from a team as code owners August 12, 2026 08:27
@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from f937ff7 to 9238cbb Compare August 12, 2026 08:27
Glorf added a commit that referenced this pull request Aug 12, 2026
## Summary

Adds non-destructive scaffolding for all four integration profiles and a
reusable, in-process verifier-fixture contract.

## Stack

- 1/4 — [Manifest
contract](#2417)
- 2/4 — [Static manifest
validation](#2441)
- **3/4 — Profile-aware scaffolding** (this PR)
- 4/4 — [Onboarding catalog and
commands](#2443)

This PR contains one commit and is based on the 2/4 branch.

## What this PR delivers

- Runnable starting points for environments and benchmarks across
`custom-gym-verifier`, `custom-gym-agent-loop`, `external-agent-loop`,
and `external-rollout-driver`.
- The appropriate authored extension point for each non-default profile
while runtime wiring remains config-driven.
- Conservative profile reporting: generated delegation placeholders
infer as `unknown` until their authored behavior is implemented.
- Benchmark source data, prompt configuration, and a typed `prepare()`
hook.
- A resources-server-owned verifier fixture covering full reward, zero
reward, malformed input, and seeded determinism.
- `--reuse-verifier` support across all profiles for compatible existing
scorers with an explicit reward contract.
- One canonical resource-component renderer shared with the existing
`gym env init --resources-server` path; the legacy command keeps its
combined runnable config.
- Conflict-free reruns, atomic fixture updates, and rejection of unsafe
paths, invalid Python names, or unsupported reused compositions.

## Compatibility and scope

- Profiles classify authoring boundaries; they do not change runtime
dispatch.
- Existing workloads do not need manifests or fixtures to keep running.
- No existing environment or resources-server implementation is
modified.
- Identical scaffold reruns are no-ops, and any conflict aborts the
complete write set.

## Validation

- Both workload kinds across all four profiles.
- Generated-code lint and format checks.
- Reused scorer contracts, reward direction, malformed input,
determinism, path safety, and atomic-update regressions.

## Next layer

The final PR exposes the stack through discovery and the four-command
onboarding journey.

Signed-off-by: Michal Bien <[email protected]>
Base automatically changed from mbien/environment-onboarding-scaffold to main August 12, 2026 08:39
@Glorf
Glorf dismissed bxyu-nvidia’s stale review August 12, 2026 08:39

The base branch was changed.

@Glorf
Glorf force-pushed the mbien/environment-onboarding-catalog branch from 9238cbb to cdfd0ad Compare August 12, 2026 08:47
@Glorf
Glorf merged commit ab9820c into main Aug 12, 2026
17 checks passed
@Glorf
Glorf deleted the mbien/environment-onboarding-catalog branch August 12, 2026 09:47
@qiaochuz-nv

Copy link
Copy Markdown
Contributor

POR Test Summary — Environment Onboarding (#2417–#2443)

Verdict: PASS — 12/12 named cases

Tested the integrated manifest/onboarding stack from #2417, #2441, #2442, and this PR on a clean Gym checkout at 325fb49.

QA testcase Result Coverage
environment_scaffold 9/9 PASS Environment and benchmark skeletons, atomic/idempotent reruns, all four integration profiles, manifest validation and mirror sync, verifier reuse/reward contract, invalid-option rejection, and catalog/search
environment_onboarding 3/3 PASS Documented init → validate → test → publish journey, benchmark reuse of a scaffolded scorer, and a real hosted-model rollout through the generated verifier

Live evidence from the onboarding rollout: one materialized rollout with a unique identity, persisted request/response/reward fields, model answer 42, verifier reward 1.0, aggregate mean/reward 1.0, and no failure rows. Generated fixture tests also pinned full-reward, zero-reward, malformed-request, drift-update, placeholder-rejection, and publication behavior.

  • QA run: 20261006T024848743971Z-6bc8372c
  • Duration: 36m 36s total
  • Execution: disposable checkout; no product source patches, model stubs, or reduced datasets

This is post-merge POR coverage for the full four-PR onboarding series; I am recording the integrated result here on the capstone PR to keep the evidence in one place.

yuhezhang-ai added a commit that referenced this pull request Nov 3, 2026
… list

Discovery looped over an agent's `datasets` in each resources-server config to
decide whether it is runnable. A config with `datasets: 1` raised TypeError
there and stopped catalog discovery, so every listing failed. This has been on
main since #2443; the listing tests in this PR now cover it.

Discovery and the file scan behind the inspect view now share one helper that
returns the dataset blocks a server declares, and none when `datasets` is not a
list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai added a commit that referenced this pull request Nov 4, 2026
… list

Discovery looped over an agent's `datasets` in each resources-server config to
decide whether it is runnable. A config with `datasets: 1` raised TypeError
there and stopped catalog discovery, so every listing failed. This has been on
main since #2443; the listing tests in this PR now cover it.

Discovery and the file scan behind the inspect view now share one helper that
returns the dataset blocks a server declares, and none when `datasets` is not a
list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai added a commit that referenced this pull request Nov 4, 2026
… list

Discovery looped over an agent's `datasets` in each resources-server config to
decide whether it is runnable. A config with `datasets: 1` raised TypeError
there and stopped catalog discovery, so every listing failed. This has been on
main since #2443; the listing tests in this PR now cover it.

Discovery and the file scan behind the inspect view now share one helper that
returns the dataset blocks a server declares, and none when `datasets` is not a
list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai added a commit that referenced this pull request Nov 4, 2026
… list

Discovery looped over an agent's `datasets` in each resources-server config to
decide whether it is runnable. A config with `datasets: 1` raised TypeError
there and stopped catalog discovery, so every listing failed. This has been on
main since #2443; the listing tests in this PR now cover it.

Discovery and the file scan behind the inspect view now share one helper that
returns the dataset blocks a server declares, and none when `datasets` is not a
list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
yuhezhang-ai added a commit that referenced this pull request Nov 6, 2026
… list

Discovery looped over an agent's `datasets` in each resources-server config to
decide whether it is runnable. A config with `datasets: 1` raised TypeError
there and stopped catalog discovery, so every listing failed. This has been on
main since #2443; the listing tests in this PR now cover it.

Discovery and the file scan behind the inspect view now share one helper that
returns the dataset blocks a server declares, and none when `datasets` is not a
list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
khazic pushed a commit to khazic/Gym-lao that referenced this pull request Nov 7, 2026
…e in gym list environments (NVIDIA-NeMo#5446)

* feat(cli): include resources and agent servers in gym list environments --json

Each JSON catalog entry now carries resources_server and agent_server.
Manifest entries take them from the manifest. Entries without a manifest
resolve them from their config with the resolver manifests mirror, and
report null when the config needs values only a run supplies, such as a
judge model server.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* feat(cli): use one rule for an entry's servers in both list views

The inspect view read servers from the config file's text, which misses a
resources server the file inherits (aime24 showed none instead of
math_with_judge), while --json resolved the config. Both views now take
the manifest's servers, else the resolved config's, else the names the
config file states when it states exactly one of a kind.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(cli): keep listing when a config fails manifest rules or parsing

Looking up an entry's servers went through the manifest resolver, which
also converts datasets to manifest form. A benchmark without
prepare_script, which Gym runs, raised a pydantic ValidationError, and a
malformed config raised OmegaConf or decoding errors; neither was caught,
so one such entry stopped gym list environments --json and its inspect
view. The lookup now resolves only the wiring, falls back on any error a
config file can cause, and fails on an almost-server without printing the
run-time warning. Manifest validation is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(cli): keep listing when a config field has the wrong type

A field of the wrong type, such as `config_paths: 1`, `_inherit_from: 1` or a
server block that is a string, made Gym's config parser raise TypeError or
AttributeError, which the server lookup did not catch. An agent with
`datasets: 1` made the scan of the file's server names raise while iterating
the number. Either stopped `gym list environments --json` for every entry.

The lookup now treats those errors as "does not resolve", and the scan skips
a datasets value that is not a list, as its docstring promises.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* fix(registry): skip a resources-server config whose datasets is not a list

Discovery looped over an agent's `datasets` in each resources-server config to
decide whether it is runnable. A config with `datasets: 1` raised TypeError
there and stopped catalog discovery, so every listing failed. This has been on
main since NVIDIA-NeMo#2443; the listing tests in this PR now cover it.

Discovery and the file scan behind the inspect view now share one helper that
returns the dataset blocks a server declares, and none when `datasets` is not a
list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>

* test(cli): follow moved catalog registry imports

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(cli): follow environment resources bindings in catalog lookup

Signed-off-by: Yuhe Zhang <[email protected]>

* fix(cli): keep catalog lookup resilient to config errors

Signed-off-by: Yuhe Zhang <[email protected]>

---------

Signed-off-by: Yuhe Zhang <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants