Forward-merge release/0.1 into main - #122
Merged
Merged
Conversation
#### Overview Prevent the `claude` and `codex` CLI presets and example variants from constructing or planning a configuration unless `NVIDIA_FRONTIER_BASE_URL` contains a non-empty endpoint. These presets require NVIDIA Frontier and must not inherit a public NVIDIA Catalog default from downstream normalization. `Preset::config()` is now the authoritative fallible construction path, and staging and maintained examples propagate its validation error. This intentionally changes that public experimentation-CLI method from returning `FabricConfig` to returning `Result<FabricConfig, String>`; there are no core schema or Python SDK API changes. Existing CLI documentation already describes the Frontier endpoint as explicit and without a default. #### Details - Reuse each preset's existing `required_env` metadata instead of adding a second configuration-environment field. - Validate the Frontier endpoint before direct config construction, preset staging, planning, doctoring, running, or maintained-example generation. - Keep `NVIDIA_API_KEY` as a runtime credential requirement rather than a planning requirement. - Leave the Catalog-native `hermes` and `deepagents` presets unchanged. - Keep one integration test that invokes the compiled CLI for both affected presets, rejects a missing endpoint, and parses the emitted plan to prove the exact Frontier URL was preserved. - Leave legacy nested endpoint handling unchanged; PR #118 already owns its migration validation. #### Validation - `cargo fmt --all -- --check` - `just --fmt --check` - `cargo check --workspace --locked` - `just test-rust` - `git diff --check` - `cargo build -p nemo-fabric-cli --locked`, followed by a compiled-binary matrix covering Claude/Codex preset and example plan/init failures and successes plus Hermes/DeepAgents Catalog defaults - `uv run --no-sync python -` E2E: compiled CLI plan → `FabricConfig.from_mapping()` → public `Fabric.run()` → Claude adapter → mock Claude CLI; child received `https://frontier-e2e.invalid`, and Catalog was absent - `uv run --no-sync pytest -q tests/adapters/test_codex_adapter.py -k 'nvidia_provider'` (5 passed, 45 deselected) A full Codex child-process E2E was not run because the repository has no deterministic Codex CLI fixture. The focused adapter tests cover its NVIDIA endpoint mapping and missing-endpoint rejection. `just test-python` was not rerun because the final diff contains no Python, SDK, binding, or adapter changes. #### Where should the reviewer start? Start with the fallible `Preset::config()` path in `crates/fabric-cli/src/presets.rs`, then review the actual CLI boundary test in `crates/fabric-cli/tests/frontier_presets.rs`. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to #118 - [x] I confirm this contribution is my own work, or I have the right to submit it under this project's license. - [x] I searched existing issues and open pull requests, and this does not duplicate existing work. ## Summary by CodeRabbit * **Bug Fixes** * Improved configuration validation for Claude and Codex presets. * The NVIDIA Frontier endpoint must now be set when required; missing or blank values produce a clear error. * Configured Frontier endpoint settings are now preserved in generated plans. * Configuration failures are reported cleanly instead of being silently assumed valid. * **Tests** * Added regression coverage for missing and configured Frontier endpoint scenarios. Authors: - Zhongxuan (Daniel) Wang (https://github.com/zhongxuanwang-nv) Approvers: - Ajay Thorve (https://github.com/AjayThorve) URL: #120
Author
|
SUCCESS - forward-merge complete. |
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.
Forward-merge triggered by push to release/0.1 that creates a PR to keep main up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge. See forward-merger docs for more info.