Repository navigation
Forward-merge release/0.10 into main - #1338
Merged
Merged
Conversation
#### Overview Add a string-based HTTP error contract for plugins and preserve received HTTP error statuses through remote Guardrails and lifecycle-hook handling. Errors that previously lost their status and surfaced as 400 or 500 now retain the supplied upstream status. - [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. #### Details ##### Plugin APIs and runtime error conversion - Add `http_error_message` helpers to the Rust native SDK, Rust worker SDK, and Python worker SDK. - Recognize error strings beginning exactly with `HTTP <status>: <message>`, using three ASCII digits from 400 through 599. Convert them into `FlowError::Upstream` with the supplied status and message, empty headers, and non-retryable `Other` classification. - Add `Reported by plugin '<plugin-id>': ` using the identity verified by the native or worker host. This identifies the reporting component, without claiming it produced the original failure. Structured logs include the plugin identity, boundary, and HTTP status. - Preserve the convention and reporting context through native and worker continuations and stream callbacks, without duplicating the same leading reporter. Keep malformed strings, policy rejections, and cancellation on their existing paths. - Keep existing callback signatures, native ABI tables, and worker protobuf fields unchanged. Plugin authors, including Switchyard, must emit the prefix to adopt the convention. ##### HTTP status code preservation - Preserve received 400–599 statuses from remote NeMo Guardrails buffered requests, streaming setup, and tool checks, including failures while reading an error body. - Preserve HTTP failures from forwarded lifecycle hooks and propagate statuses through direct runtime errors and nested CLI error wrappers. - Classify received hook-gateway HTTP failures separately from provider failures, using a private CLI error variant and `hook_http` log classification. Retain messages from recognized Relay error envelopes so plugin reporting context reaches the agent. - Retain current response envelopes, header handling, fail-open/fail-closed behavior, and provider retry classification. Ordinary provider forwarding is unchanged. - Errors after streaming headers are sent remain typed stream errors and cannot change the HTTP response status. **Compatibility:** APIs and transports remain compatible, but matching plugin error strings now have HTTP meaning. Remote HTTP failures change from `FlowError::Internal` to `FlowError::Upstream`, affecting error messages, classifications, and Rust pattern matching. **Validation:** - `just test-rust`: all 5,845 tests passed, with machine logging and configuration isolated. - `just test-python-plugin`: all 366 SDK tests, 35 gRPC example tests, 24 language-binding example tests, and worker end-to-end checks passed with the existing test configuration feature enabled for the Python binding. - Native and worker fixture integrations passed, including continuation round trips and plugin-originated errors. Regression coverage includes all 400–599 codes, malformed prefixes, cancellation, truncated HTTP bodies, verified reporter identities, nested reporting context, and hook-gateway classification and message forwarding. - HTTP-preservation validation also passed Python and Node.js suites; Node.js configuration was isolated. - `just docs` and staged `uv run pre-commit run` passed. Fern could not compare published redirects because FDR returned 403. - Go validation was attempted but blocked by the macOS linker error `mis-aligned LINKEDIT string pool` in the FFI dylib. #### Where should the reviewer start? Start with `crates/types/src/plugin.rs` for the error-string contract, `crates/core/src/plugin/dynamic/http_error.rs` for runtime conversion, and `crates/cli/src/error.rs` for HTTP response mapping. The native and worker integration tests demonstrate propagation across actual plugin boundaries. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to: none <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Upstream HTTP errors from remote guardrails and plugins now preserve their 4xx or 5xx status in gateway responses, including when an error body cannot be read. * Native and worker plugins can forward upstream HTTP errors using SDK helpers for Rust and Python. These errors remain non-retryable. * **Bug Fixes** * Hook and plugin error handling now retains valid upstream status codes instead of mapping them to a generic gateway error. Hook errors also preserve their status when response bodies are truncated. * **Documentation** * Added guidance on forwarding HTTP errors, supported status codes, plugin attribution, and behavior during streaming responses. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Will Killian <[email protected]>
#### Overview Add 0.10.1 release notes covering the fifteen PRs merged into `release/0.10` since `0.10.0`, plus the anticipated merge of NVIDIA#1317, with matching patch-upgrade guidance. Preserve the 0.10.0 notes and follow the NVIDIA documentation style guide. - [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. #### Details - Cover daemon-worker LLM middleware (NVIDIA#1281), the YAML dependency update (NVIDIA#1282), hook timeout and failure-policy fixes (NVIDIA#1288, NVIDIA#1289, NVIDIA#1290), and request-edit preservation (NVIDIA#1296). - Cover Anthropic streaming storage (NVIDIA#1303), Python typed reconstruction (NVIDIA#1304), Go native handle lifetimes (NVIDIA#1302), authenticated Pi hooks and session ownership (NVIDIA#1306), dynamic plugin trust failures (NVIDIA#1305), and verified native plugin loading (NVIDIA#1307). - Cover Pi named-upstream restrictions (NVIDIA#1314), LangChain tool-schema edits (NVIDIA#1316), and the configurable ChatGPT Codex endpoint (NVIDIA#1319). - Assume NVIDIA#1317 will merge: document plugin HTTP error helpers and prefixes, preservation of remote Guardrails and forwarded hook HTTP error statuses, verified reporting identities, and streaming limits. Verified against its current head `b61bb7da0bc6de7b7d5d27a569981867b7b2fcb9`; its implementation is not merged into this branch. - Add upgrade guidance for hook credentials and registration, generated hooks, daemon response behavior, request edits, Pi extensions and private provider endpoints, native plugin dependencies, stored Python typed values, ChatGPT endpoints, and HTTP error handling. - Keep PR references and counts out of user-facing release notes. Preserve the prior CodeRabbit corrections for MCP route registration, forwarded-stream observation limits, sanitizer-only behavior, and 0.10.1 installation pins. - Merge the latest `release/0.10` into the PR branch. Distinguish personal hook refresh commands from administrator-managed daemon bundles. Validation: `just docs`, `uv run pre-commit run`, and `git diff --cached --check` passed. Fern skipped the published redirect-history check because FDR returned HTTP 403. Verified the merged release range against source and public documentation, and the assumed NVIDIA#1317 behavior against its current PR source and docs. Language test suites were not run because the PR diff only updates documentation prose and installation version pins. Package installation commands, live daemon upgrades, plugin activations, and hook refreshes were not executed. Validation runs on the current release branch; NVIDIA#1317 remains an explicit release-content assumption. #### Where should the reviewer start? Start with `Release 0.10.1` in `docs/about-nemo-relay/release-notes/index.mdx`, then review `Update from NeMo Relay 0.10.0 to 0.10.1` in `docs/reference/migration-guides.mdx`. Review the new Pi endpoint, ChatGPT endpoint, LangChain tool-edit, and HTTP error guidance, including the NVIDIA#1317 merge assumption. Check matching version pins in `docs/getting-started/installation.mdx`. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to: none <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added NeMo Relay 0.10.0 and 0.10.1 release notes, including feature highlights, compatibility updates, fixes, and known issues. * Expanded migration guidance with upgrade steps and details on hook credentials and delivery, daemon-worker middleware behavior, request editing, plugin requirements, and Python value handling. * Updated installation examples across supported platforms, packages, and integrations to reference version 0.10.1. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Will Killian <[email protected]>
Signed-off-by: Will Killian <[email protected]>
Contributor
2 tasks done
This branch was previously deployed
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.
Overview
Resolve the conflicts blocking forward-merge #1337 by merging
release/0.10into a branch based onmain, preserving the original release commit hashes and both branches’ history.Details
mainas the first parent andrelease/0.10as the second parent. Imported code matches the release branch exactly.Merge requirement: An administrator must use Create a Merge Commit. Do not squash, rebase, use GitHub’s Resolve conflicts option, or invoke the
/mergeauto-merger. The failure report’s explicit admin-merge requirement takes precedence over the linked guide’s/merge nosquashsuggestion.Inherited DCO failure: Release commit
86f5de906cf821c3985ee3341beb278360459278lacks aSigned-off-bytrailer. Its hash is preserved rather than rewritten. The new merge commit is signed off; the inherited DCO failure needs maintainer handling.Validation:
git diff --cached --check, merge-parent inspection, and ancestry checks passed. The release branch was not modified.just docspassed with zero errors; the remote FDR redirects comparison returned HTTP 403 and was skipped with a warning.uv run pre-commit runand the commit hooks passed. GitHub link checks passed when retried with authentication after transient HTTP 500 responses.just test-rust: 5,855 of 5,857 tests passed initially. Both remaining CLI logging tests passed in a focused rerun with inherited logging environment overrides removed and an isolated system configuration directory.just test-python-plugin: all 366 SDK tests passed (97.31% coverage), and all 35 Python gRPC example tests passed. Two of 24 language-binding example tests failed because the production Python extension discovers this machine’s/etc/nemo-relay/plugins.tomland emits inherited-configuration warnings. A rerun with test-isolation environment variables reproduced the same host-configuration failures; that extension does not enable the test-only isolation feature. The recipe stopped before its E2E stage.Where should the reviewer start?
Review the merge commit’s two parents and its conflict resolutions in
docs/nemo-relay-cli/basic-usage.mdx. Confirm that the release notes, migration template, and installation versions remain exactly as onmain.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit