Repository navigation
fix: worker upstream error preservation - #1664
Conversation
Backport the gateway token recovery and review hardening from NVIDIA#1654, adapting FlowError imports to the 0.11 runtime. Signed-off-by: Will Killian <[email protected]>
|
No actionable comments were generated in the recent review. Walkthrough
ChangesCaptured upstream failure recovery
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Possibly related PRs
Merge Risk:
|
#### Overview Resolve the conflicts blocking the `release/0.11` → `main` forward merge in #1650. The release fixes were written against the combined core crate; main now separates types, codecs, runtime, and observability. This branch places the fixes in those current crates while retaining the original release commits. **An authorized admin must land this manual forward merge using “Create a Merge Commit”; do not squash or rebase. Keep #1650 open.** This repository disables the auto-merger, so `/merge nosquash` does not apply here. After this resolution lands in main, the forward-merger should reconcile the original PR. See the [repository bot’s merge instructions](#1650 (comment)). - [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 - Preserve the six pending release fixes: Responses request history (#1643), tool ownership hints (#1645), managed streaming errors (#1652), worker upstream errors (#1664), free-form tool-call evidence (#1644), and interrupted LangGraph tool attempts (#1667). - Keep provider-specific telemetry interpretation in codecs. The runtime supplies portable request and tool-call views through the existing normalizer/observability host contracts. Exporters consume these views without adding a production dependency from observability to codecs or runtime. - Preserve the original provider annotations for encoding, invocation IDs for result correlation, and free-form tool input as text. - Retain the standalone exporter fallback. An explicitly empty supplied call list overrides raw fallback data; malformed entries do not discard neighboring valid calls or renumber positional fallback IDs. - Move provider-aware exporter tests into plugin-host integration coverage and share the raw-response field selectors across the provider and fallback paths. No dependency manifests or lockfiles change. The PR history contains the six original release commits followed by one signed and signed-off resolution merge commit (`dd4e167`). The branch includes main at `72cc0ebe3` and release/0.11 at `74e432155`. The consolidated merge retains the previously reviewed production changes. It also includes two test-only review fixes: parse SSE assertions by event delimiters instead of body chunks, and preserve explicitly empty call lists in the telemetry test accessor while checking both empty and populated results. **Validation** - `just test-rust`: 6,743 passed, 4 skipped after the test-only review fixes. - Focused SSE and telemetry regressions: 8 passed, including the ATIF authoritative-empty-list regression. - `just test-python`: 81 native binding tests, 1,531 package tests, and 24 example tests passed; 1 skipped after the latest release merge. - `just test-python-langchain`: 402 passed, including LangGraph interrupt/resume regressions. - `just test-node`: 10 native binding tests, 551 package tests, and 26 example tests passed on the initial resolution. Node and shared runtime sources were unchanged by the subsequent refresh, so this suite was not repeated. - Repository pre-commit hooks passed before each commit, with the complete staged file lists explicitly supplied during merges. Applicable checks included Clippy, compilation, formatting, Python typing, documentation links, and dependency audits. - Verified the signature, sign-off, clean worktree, unchanged original release commit IDs, and exactly one merge commit. The review fixes changed only three test-related files; binding suites were not repeated for this test-only revision. #### Where should the reviewer start? Start with `TelemetryToolCall` and the optional `LlmNormalizer` telemetry methods in `crates/types/src/codec/normalization.rs`, then the provider views in `crates/codecs/src/telemetry.rs` and their consumption in `crates/observability/src/normalization.rs`. The exporter regressions are under `crates/plugin-host/tests/integration/observability/`. The standalone fallback regression is in `crates/observability/tests/unit/atif_projection_tests.rs`. #### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to) - Relates to #1650 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **New Features** * OpenAI Responses custom tool calls and results are supported, preserving call IDs and free-form input across processing and observability exports. * LangGraph tool execution handles approval interrupts consistently in synchronous and asynchronous workflows. * **Bug Fixes** * Managed streams return protocol-compatible error events when execution fails after streaming begins, retaining already-sent content and omitting successful completion markers. * Tool-call telemetry better preserves provider details and skips malformed entries without losing valid calls. * **Documentation** * Clarified error behavior in managed streaming responses. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Overview
Backport #1654 to
release/0.11so a pass-through worker plugin preserves the provider's original HTTP status, response body, and headers instead of turning upstream failures into HTTP 400.Details
996d3d356and8b14d63af.nemo_relay::error::FlowError, the existing 0.11 runtime export.retry-after, duplicate headers, request isolation, and concurrent buffered/streaming attempt selection.Validation on
release/0.11:just test-rust: 6,649 passed, four skipped.cargo check, and dependency audits.Where should the reviewer start?
Start with
CapturedUpstreamFailures::takeincrates/cli/src/gateway/mod.rs, then the gateway token tests and concurrent-attempt server tests. The only release-specific adaptation is the error import used by the server tests.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit