Skip to content

feat(cli): include entry paths in gym list environments --json - #5392

Merged
yuhezhang-ai merged 2 commits into
mainfrom
yuhez/list-environments-json-paths
Nov 6, 2026
Merged

yuhezhang-ai merged 2 commits into
mainfrom
yuhez/list-environments-json-paths

Conversation

@yuhezhang-ai

@yuhezhang-ai yuhezhang-ai commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

What and why

gym list environments --json includes each entry's absolute, resolved path, config_path, and manifest_path (null without a manifest). External tools can locate catalog entries without duplicating the discovery rules in nemo_gym/environment/registry.py. The CLI reference explains that path is a directory that entries can share, config_path can sit outside that directory, and symlinks are resolved. Benchmark listing and search link to the same field definitions.

Supports #3946 (informed environment selection); no separate issue is needed for this focused addition.

Compatibility

Three additive JSON keys; existing keys and the table output are unchanged. This is the parent of #5446, which adds server names to the same output.

Validation

Current head: 763a10b0d6bec41a0318a7952bd2fc531582857d, rebased onto main at cc8991e4cf55a36ed6566713685d1ca76be05d3b. This includes #5629, which fixes the missing opencode_search dependency files responsible for both component-lock failures and all five failed core dependency tests in the previous CI run. Both PR commits are unchanged by the rebase.

  • pytest tests/unit_tests/tooling/test_component_dependencies.py tests/unit_tests/cli/test_cli.py::TestListEnvironments -q -o addopts='' -o log_cli=false: 32 passed.
  • uv run --no-project --python 3.13.14 python scripts/component_locks.py with uv 0.13.4: 268 projects checked, 0 failed.
  • pre-commit run --all-files: passed.

Earlier validation

Validated this PR alone at c103d1e679a6890056752be0cc05a73f5f503cc0; the rebased head 3dd1833f5abbe2abd94327c0cfcd885eae57a37a has the identical file tree, based on main at 74b307063d116827bf42537d5d9f533f318e2a16. Python 3.13.14, uv 0.13.4, and locked development dependencies (uv sync --locked --extra dev).

pytest tests/unit_tests/cli/test_cli.py \
  tests/unit_tests/cli/test_cli_main.py \
  tests/unit_tests/environment/test_registry.py \
  -q -o addopts='' -o log_cli=false
  • 456 passed, 1 failed. The failure is TestRunHelperServerReadiness::test_memory_profiler_uses_spawned_server_metadata: memory profiling requires Linux procfs and is disabled on macOS. It also fails with main's unchanged test and the unchanged memory-profiler implementation. The catalog path tests pass.
  • python tests/unit_tests/test_fern_docs_links.py: 29 passed.
  • pre-commit run --all-files: passed.
  • cd fern && npm run check -- --warnings: zero errors, one warning. Authenticated missing-redirect checking was skipped because no Fern login was available.
  • Real gym list environments --json: 472 entries, with all non-null paths absolute, symlink-resolved, and existing; manifest_path is null for exactly the 259 entries without a manifest. The output confirms 97 entries share 29 directories and 77 configs sit outside their entry directory, including the documented aalcr/config_v1_1 example.
  • Real gym list benchmarks --json (253 entries) and gym search benchmarks aalcr --json (2 entries): all three path fields match the environment catalog. The commands emit an existing deprecation warning for opencode_sandboxed_search_agent; stdout remains valid JSON.

Rollout evidence: N/A. CLI catalog output only; no environment, agent, or verifier execution changes.

@copy-pr-bot

copy-pr-bot Bot commented Oct 30, 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.

@yuhezhang-ai

Copy link
Copy Markdown
Contributor Author

/ok to test cae6f31

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

@yuhezhang-ai
yuhezhang-ai marked this pull request as ready for review October 30, 2026 23:47

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP

LGTM — no concerns found. Reviewed all three changed files and traced the catalog payload through registry discovery and list/search/benchmark routing. The fields are additive, missing manifests serialize as null, and table and named-inspection behavior remain unchanged. The tests and CLI reference match the change.

Static review only; tests were not executed.

Note: formal approval is not available for this request, so this review is posted as a comment only.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@yuhezhang-ai
yuhezhang-ai force-pushed the yuhez/list-environments-json-paths branch from cae6f31 to 8379ebf Compare October 31, 2026 20:36
@yuhezhang-ai

Copy link
Copy Markdown
Contributor Author

/ok to test 8379ebf

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team November 1, 2026 16:17
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team November 1, 2026 16:17
@svcnvidia-nemo-ci svcnvidia-nemo-ci added feature New capabilities, enhancements, or enablement work area:cli Command-line interfaces and user-facing command behavior needs-review PR is ready for code review and waiting on a reviewer labels Nov 1, 2026
@yuhezhang-ai
yuhezhang-ai added this pull request to stack #5448 November 2, 2026 16:35
@yuhezhang-ai
yuhezhang-ai force-pushed the yuhez/list-environments-json-paths branch from 8379ebf to f649fd7 Compare November 4, 2026 03:22
@yuhezhang-ai

Copy link
Copy Markdown
Contributor Author

/ok to test f649fd7

@yaoyu-33 yaoyu-33 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adds path, config_path and manifest_path (absolute, symlink-resolved; manifest_path is null without a manifest) to the catalog JSON, so tools can locate entries without re-implementing discovery.

At this head the real gym list environments --json returns 468 entries, every path exists, manifest_path is null for exactly the 256 no-manifest entries, and the output without the three new keys equals main's. TestListEnvironments passes. No blockers; one docs request is inline.

Process notes: the validation in the body ran on the combined #5446 stack rather than this head alone (the checks above hold at this head too). The red preview check fails parsing the generated judge_profile.mdx, which this PR does not touch (fixed on main by #5602, so a rerun after merging main should go green), and the red non-blocking harness-conformance jobs (kilocode, Publish check) also fail on unrelated PRs.

Overall: ship.

| `--status experimental\|no-manifest` | Filter by the experimental annotation or missing manifest. |
| `--lifecycle active\|deprecated` | Filter by lifecycle. |
| `--json` | Output catalog entries as JSON. |
| `--json` | Output catalog entries as JSON, including each entry's absolute `path`, `config_path` and `manifest_path` (`null` without a manifest). |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cli-commands.mdx:260

Could you say what path is in this row? It is the entry's directory and is not unique: 96 of the 468 catalog entries share one of 29 path values, and for 76 config_vN variants config_path sits outside path (for example benchmarks/aalcr/config_v1_1.yaml next to benchmarks/aalcr/config_v1_1/). All three paths also have symlinks resolved, so a tool that matches path against its own search root can miss. A clause such as "config_path is the entry's config file; path is its directory and can be shared; paths are absolute with symlinks resolved" would keep tools from treating path as an id; gym list benchmarks --json and gym search --json emit the same keys, so a cross-reference there would help too.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Yu. Updated the CLI reference in 763a10b: path is the entry directory and can be shared; config_path identifies the config file and can be outside that directory; all non-null paths are absolute with symlinks resolved. I included the aalcr/config_v1_1 example and added cross-references from benchmark listing and search.

The PR body now records validation for #5392 separately from #5446. The docs preview passed after the previous rebase. I also rebased onto main's #5629 fix for the newly introduced component-lock failures; all 268 lock checks and 32 targeted dependency/catalog tests pass locally.

@yuhezhang-ai
yuhezhang-ai requested review from a team as code owners November 4, 2026 20:30
@yuhezhang-ai
yuhezhang-ai force-pushed the yuhez/list-environments-json-paths branch from c103d1e to 3dd1833 Compare November 4, 2026 20:39
@yuhezhang-ai

Copy link
Copy Markdown
Contributor Author

/ok to test 3dd1833

yuhezhang-ai and others added 2 commits November 4, 2026 18:19
Each catalog entry in the JSON output now carries its absolute path, config_path and
manifest_path (null without a manifest), resolved like the agent inspect view. Entries
without a manifest are found by several legacy rules, so a consumer of the JSON could not
locate them from the name alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
@yuhezhang-ai
yuhezhang-ai force-pushed the yuhez/list-environments-json-paths branch from 3dd1833 to 763a10b Compare November 4, 2026 23:20
@yuhezhang-ai

Copy link
Copy Markdown
Contributor Author

/ok to test 763a10b

@yuhezhang-ai
yuhezhang-ai added this pull request to the merge queue Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42304389021

Merged via the queue into main with commit 8dc166f Nov 6, 2026
101 of 109 checks passed

This branch was previously deployed

1 inactive deployment
public — 763a10b0 Deployed Nov 4, 2026 by copy-pr-bot[bot] via release / finalize / notify #10188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:cli Command-line interfaces and user-facing command behavior feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants