Skip to content

fix: report cancelled Python scopes as errors - #615

Closed
mnajafian-nv wants to merge 8 commits into
NVIDIA:release/0.7from
mnajafian-nv:fix/python-scope-cancel-status
Closed

fix: report cancelled Python scopes as errors#615
mnajafian-nv wants to merge 8 commits into
NVIDIA:release/0.7from
mnajafian-nv:fix/python-scope-cancel-status

Conversation

@mnajafian-nv

@mnajafian-nv mnajafian-nv commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Overview

Mark cancelled Python scopes as errors so scope end events do not leave otel.status_code=UNSET when asyncio.CancelledError unwinds through scope().

  • I confirm this contribution is my own work, or I have the right to submit it under this project's license.
  • I searched existing issues and open pull requests, and this does not duplicate existing work.

Details

  • Treat asyncio.CancelledError as an explicit error path in python/nemo_relay/scope.py
  • Set otel.status_code to ERROR and default the status description to cancelled when the cancellation has no message
  • Preserve the existing re-raise behavior so task cancellation semantics do not change
  • Add an async regression in python/tests/test_scope.py that cancels an active scope, flushes subscribers, and asserts the emitted end event metadata

Validation:

  • uv run pytest python/tests/test_scope.py
  • uv run pre-commit run --files python/nemo_relay/scope.py python/tests/test_scope.py
  • just test-python

Where should the reviewer start?

Start in python/nemo_relay/scope.py at the new asyncio.CancelledError branch in scope(), then review python/tests/test_scope.py for the cancellation regression that locks the emitted end-event status.

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • Relates to: none

Summary by CodeRabbit

  • New Features

    • Released version 0.8.0 across the NeMo Relay packages, plugins, CLI tools, and integrations.
    • Improved cancellation handling in asynchronous scopes, recording cancellation details and ensuring events are flushed before the cancellation is raised again.
  • Documentation

    • Updated installation guides, quick starts, examples, and integration instructions to use version 0.8.0.
  • Bug Fixes

    • Cancellation events now receive appropriate error status and descriptive metadata for improved observability.

GPUtester and others added 5 commits July 31, 2026 00:37
Forward-merge release/0.7 into main
Forward-merge release/0.7 into main
#### Overview

Prepare `main` for the NeMo Relay 0.7 code freeze and post-freeze development on 0.8.0.

- [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

- Adds `release/0.7` to the nightly alpha branch configuration. Release-bound PRs should now target that branch.
- Runs `just set-version 0.8.0` to advance Cargo, Python, Node, CLI, OpenClaw, and coding-agent package surfaces on `main`.
- Updates current-version installation and plugin examples from 0.7.0 to 0.8.0.

#### Where should the reviewer start?

Start with `.github/nightly-alpha-branches.yaml` and `Cargo.toml`; the remainder is the synchronized 0.8.0 version and documentation update.

#### Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

- Relates to: none



## Summary by CodeRabbit

* **Release**
  * Updated the project, packages, plugins, and integrations to version 0.8.0.
  * Added the release/0.7 branch to nightly alpha builds.

* **Documentation**
  * Updated installation and quick-start examples across Node.js, Python, Rust, CLI, OpenClaw, and plugin integrations to reference version 0.8.0.

* **Validation**
  * Improved release preparation checks by regenerating fixture lockfiles and validating locked builds.

Authors:
  - Will Killian (https://github.com/willkill07)

Approvers:
  - Zhongxuan (Daniel) Wang (https://github.com/zhongxuanwang-nv)

URL: NVIDIA#601
Forward-merge release/0.7 into main
Signed-off-by: mnajafian-nv <mnajafian@nvidia.com>
@mnajafian-nv mnajafian-nv added this to the 0.7 milestone Jul 31, 2026
@mnajafian-nv
mnajafian-nv requested review from a team as code owners July 31, 2026 21:07
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: dc9b9281-52c0-441e-a77f-027cbe62cbc0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The release updates workspace and package versions from 0.7.0 to 0.8.0, refreshes installation references, extends freeze validation, adds the release/0.7 nightly branch, and records asyncio.CancelledError as an OpenTelemetry error before re-raising it.

Changes

Release version alignment

Layer / File(s) Summary
Version metadata and installation references
Cargo.toml, crates/node/package.json, integrations/*, packages/cli-bin/package.json, python/*/pyproject.toml, pyproject.toml, README.md, docs/getting-started/*, docs/supported-integrations/*
Package metadata, internal dependencies, plugin manifests, and installation examples now use version 0.8.0.
Code-freeze fixture validation
.agents/skills/prepare-code-freeze/SKILL.md, .github/nightly-alpha-branches.yaml
The freeze checks regenerate and build the worker-plugin fixture with a locked Cargo build. The nightly branch list includes release/0.7.

Scope cancellation handling

Layer / File(s) Summary
CancelledError handling and test coverage
python/nemo_relay/scope.py, python/tests/test_scope.py
scope() records cancellation as an OpenTelemetry error, stores cancellation metadata, and re-raises CancelledError. An asynchronous test validates the scope-end event and subscriber flush.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Task
  participant Scope
  participant Subscribers
  participant OpenTelemetry
  Task->>Scope: Cancel task with asyncio.CancelledError
  Scope->>OpenTelemetry: Record ERROR status and cancellation description
  Scope->>Subscribers: Flush scope-end event
  Scope->>Task: Re-raise asyncio.CancelledError
Loading

Possibly related PRs

  • NVIDIA/NeMo-Relay#601: Shares the code-freeze workflow, branch configuration, and version-bump changes.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title follows Conventional Commits format and clearly describes the cancellation error-handling change.
Description check ✅ Passed The description includes all required sections, explains the change, identifies review starting points, and lists validation steps.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:M PR is medium lang:python PR changes/introduces Python code labels Jul 31, 2026
@mnajafian-nv mnajafian-nv self-assigned this Jul 31, 2026
@mnajafian-nv
mnajafian-nv marked this pull request as draft July 31, 2026 21:09
…cope-cancel-status

Signed-off-by: mnajafian-nv <mnajafian@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.agents/skills/prepare-code-freeze/SKILL.md:
- Around line 43-48: Insert a blank line immediately after the closing Markdown
fence of the cargo generate-lockfile command in the numbered list, before the
next list item begins.

In `@python/tests/test_scope.py`:
- Around line 106-131: Extend
test_scope_ctx_mgr_cancelled_task_sets_error_status to cover cancellation with a
supplied message by calling task.cancel("shutdown") and asserting
otel.status_description is "shutdown". Preserve the existing no-message case to
continue covering the "cancelled" fallback, using a separate or parameterized
test case.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: a752456a-f906-4dc2-b2c9-76327369db78

📥 Commits

Reviewing files that changed from the base of the PR and between b671256 and 1f7ae41.

⛔ Files ignored due to path filters (4)
  • Cargo.lock is excluded by !**/*.lock
  • crates/core/tests/fixtures/worker_plugin/Cargo.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (20)
  • .agents/skills/prepare-code-freeze/SKILL.md
  • .github/nightly-alpha-branches.yaml
  • Cargo.toml
  • README.md
  • crates/node/package.json
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/getting-started/installation.mdx
  • docs/getting-started/quick-start/nodejs.mdx
  • docs/getting-started/quick-start/python.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • integrations/coding-agents/claude-code/.claude-plugin/plugin.json
  • integrations/coding-agents/codex/.codex-plugin/plugin.json
  • integrations/openclaw/package.json
  • packages/cli-bin/package.json
  • pyproject.toml
  • python/cli-bin/pyproject.toml
  • python/nemo_relay/scope.py
  • python/plugin/pyproject.toml
  • python/tests/test_scope.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (44)
**/*.toml

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all TOML files using the # comment form.

Files:

  • python/cli-bin/pyproject.toml
  • pyproject.toml
  • python/plugin/pyproject.toml
  • Cargo.toml
**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

**/*: Format changed files with the language-native formatter before the final lint/test pass.
If dynamic plugin behavior changed, use maintain-dynamic-plugins and include the native SDK, worker protocol, Python SDK, docs, packaging, and Codecov surfaces in the validation plan.
If code changes alter APIs, bindings, commands, paths, packaging behavior, observability/adaptive semantics, or documented best practices, update any dependent maintainer or consumer skills in the same branch.
During iteration, prefer uv run pre-commit run --files <changed files...>.
Before review or handoff, run uv run pre-commit run --all-files.

Files:

  • python/cli-bin/pyproject.toml
  • crates/node/package.json
  • packages/cli-bin/package.json
  • README.md
  • pyproject.toml
  • python/plugin/pyproject.toml
  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • integrations/openclaw/package.json
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
  • docs/getting-started/installation.mdx
  • Cargo.toml
crates/node/**/*.{js,ts,jsx,tsx,json}

📄 CodeRabbit inference engine (.agents/skills/test-node-binding/SKILL.md)

Format changed Node files with npm run format --workspace=nemo-relay-node

Files:

  • crates/node/package.json
crates/node/package.json

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Keep the Node package metadata in crates/node/package.json consistent with the package name, versioning, and publish surface.

Keep the crates/node/package.json package version aligned with the workspace-root package-lock.json, and keep its dependencies["nemo-relay-node"] entry aligned when the Node package version changes.

Files:

  • crates/node/package.json
crates/{python,ffi,node}/**/*

⚙️ CodeRabbit configuration file

crates/{python,ffi,node}/**/*: Treat binding changes as public API changes. Check for parity with the other language bindings, FFI ownership/lifetime safety,
callback error propagation, stable type conversion, and consistent async/stream semantics.
Flag changes that update one binding without corresponding tests or documentation for the same surface elsewhere.

Files:

  • crates/node/package.json
.github/nightly-alpha-branches.yaml

📄 CodeRabbit inference engine (.agents/skills/prepare-code-freeze/SKILL.md)

Update .github/nightly-alpha-branches.yaml to include the new release branch.

Files:

  • .github/nightly-alpha-branches.yaml
{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}

⚙️ CodeRabbit configuration file

{.github/**,.gitlab-ci.yml,.pre-commit-config.yaml,justfile,scripts/**}: Review automation changes for reproducibility, pinned versions where appropriate, secret handling, and consistency with the documented validation matrix.
Pay attention to commands that need generated native artifacts, FFI libraries, or platform-specific environment variables.

Files:

  • .github/nightly-alpha-branches.yaml
**/*.{md,rst,html,txt}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)

**/*.{md,rst,html,txt}: Always spell NVIDIA in all caps. Do not use Nvidia, nvidia, nVidia, nVIDIA, or NV.
Use an NVIDIA before a noun because the name starts with an 'en' sound.
Do not add a registered trademark symbol after NVIDIA when referring to the company.
Use trademark symbols with product names only when the document type or legal guidance requires them.
Verify official capitalization, spacing, and hyphenation for product names.
Precede NVIDIA product names with NVIDIA on first mention when it is natural and accurate.
Do not rewrite product names for grammar or title-case rules.
Preserve third-party product names according to the owner's spelling.
Include the company name and full model qualifier on first use when it helps identify the model.
Preserve the official capitalization and punctuation of model names.
Use shorter family names only after the full name is established.
Spell out a term on first use and put the acronym in parentheses unless the acronym is widely understood by the intended audience.
Use the acronym on later mentions after it has been defined.
For long documents, reintroduce the full term if readers might lose context.
Form plurals of acronyms with s, not an apostrophe, such as GPUs.
In headings, common acronyms can remain abbreviated. Spell out the term in the first or second sentence of the body.
Common terms such as CPU, GPU, PC, API, and UI usually do not need to be spelled out for developer audiences.

Files:

  • README.md
**/*.{md,rst,html}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-brand-terminology.md)

Link the first mention of a product name when the destination helps the reader.

Files:

  • README.md
**/*.{md,rst,txt}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)

Spell NVIDIA in all caps. Do not use Nvidia, nvidia, or NV.

Files:

  • README.md
**/*.{md,rst}

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-guide.md)

**/*.{md,rst}: Format commands, code elements, expressions, package names, file names, and paths as inline code.
Use descriptive link text. Avoid raw URLs and weak anchors such as "here" or "read more."
Use title case consistently for technical documentation headings.
Introduce code blocks, lists, tables, and images with complete sentences.
Write procedures as imperative steps. Keep steps parallel and split long procedures into smaller tasks.
Prefer active voice, present tense, short sentences, contractions, and plain English.
Use can for possibility and reserve may for permission.
Use after for temporal relationships instead of once.
Prefer refer to over see when the wording points readers to another resource.
Avoid culture-specific idioms, unnecessary Latinisms, jokes, and marketing exaggeration in technical docs.
Spell out months in body text, avoid ordinal dates, and use clear time zones.
Spell out whole numbers from zero through nine unless they are technical values, parameters, versions, or UI values.
Use numerals for 10 or greater and include commas in thousands.
Do not add trademark symbols to learning-oriented docs unless the source, platform, or legal guidance explicitly requires them.

Files:

  • README.md
**/*.md

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/assets/nvidia-style-technical-docs.md)

**/*.md: Use title case consistently in technical documentation headings
Avoid quotation marks, ampersands, and exclamation marks in headings
Keep product, event, research, and whitepaper names in their official title case
Use title case for table headers
Do not force social-media sentence case into technical docs
Format code elements, commands, parameters, package names, and expressions in monospace
Format directories, file names, and paths in monospace using backticks
Use angle brackets inside monospace for variables inside paths, such as /home/<username>/.login
Format error messages and strings in quotation marks, keeping literal code strings in code formatting when clearer
Format UI buttons, menus, fields, and labels in bold
Use angle brackets between UI labels for menu paths, such as File > Save As
Use italics for new terms on first use, sparingly and only when introducing the term
Use italics for publication titles
Format keyboard shortcuts in plain text, such as Press Ctrl+Alt+Delete
Use owner/repo link text for GitHub repositories, preferring [NVIDIA/NeMo](link) over prose references like 'the GitHub repo'
Introduce every code block with a complete sentence
Do not make a code block complete the grammar of the previous sentence
Do not continue a sentence after a code block
Use syntax highlighting when the format supports it for code blocks
Avoid the word 'snippet' unless the surrounding docs already use it as a term of art
Keep inline method, function, and class references consistent with nearby docs, omitting empty parentheses for prose readability when no call is shown
Use descriptive anchor text that matches the destination title when possible for links
Avoid raw URLs in running text
Avoid generic anchor text such as 'here,' 'this page,' and 'read more'
Include acronyms in link text when a linked term includes an acronym
Do not link long sentences or multiple sentences
Avoid links that pull readers away from a procedure unless the link is a p...

Files:

  • README.md
**/*.{md,mdx}

📄 CodeRabbit inference engine (AGENTS.md)

Update README.md, fern/, package READMEs, and binding-support notes when public behavior, package names, examples, or supported bindings change.

**/*.{md,mdx}: Prefer the documented public API, not internal shortcuts
Keep package names, repo references, and build commands current
Keep release-process and release-notes guidance in repo-maintainer docs such as RELEASING.md, not as user-facing docs pages or CHANGELOG.md
Keep stable user-facing wrappers at scripts/ root in docs and examples; only point at namespaced helper paths when documenting internal maintenance work
When detailed dynamic plugin guides exist, keep Rust native plugin examples, Python worker plugin examples, and grpc-v1 protocol details on separate pages

If links in documentation change, run just docs-linkcheck.

Files:

  • README.md
  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • docs/getting-started/installation.mdx
**/*.{md,markdown,mdx}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Add the SPDX license header to all Markdown/MDX documentation files using the HTML comment block form.

Files:

  • README.md
  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • docs/getting-started/installation.mdx
{docs/**/*.md,README.md}

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Update reference docs, language-binding docs, READMEs, and example documentation when the public surface or expected usage changes.

Files:

  • README.md
{README.md,docs/index.md}

📄 CodeRabbit inference engine (.agents/skills/contribute-docs/SKILL.md)

Update entry-point docs when examples or reading paths change

Files:

  • README.md
README.md

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If documentation examples or commands in README.md change, run the targeted docs checks appropriate to the change.

Files:

  • README.md
**/*.{md,mdx,py,go,js,ts}

📄 CodeRabbit inference engine (.agents/skills/maintain-observability/SKILL.md)

Examples and documentation must use each exporter's documented flush/deregister order before shutdown.

Files:

  • README.md
  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
  • docs/getting-started/installation.mdx
{README.md,docs/**/*.md,fern/**/*}

📄 CodeRabbit inference engine (.agents/skills/prepare-code-freeze/SKILL.md)

Update appropriate current-version documentation references from the old version to <next-version>, including install commands, package examples, and configuration examples; preserve intentional historical, generated, and third-party attribution references.

Files:

  • README.md
{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}

⚙️ CodeRabbit configuration file

{docs/**,README.md,CONTRIBUTING.md,RELEASING.md,SECURITY.md}: Review documentation for technical accuracy against the current API, command correctness, and consistency across language bindings.
Flag stale examples, missing SPDX headers where required, and instructions that no longer match CI or pre-commit behavior.

Files:

  • README.md
  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • docs/getting-started/installation.mdx
pyproject.toml

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Keep Python packaging metadata in the root pyproject.toml consistent with the package’s published name, imports, and build behavior.

Files:

  • pyproject.toml
{crates/core/src/plugin/dynamic/**,crates/plugin/**,crates/worker/**,crates/worker-proto/**,crates/types/**,python/plugin/**,examples/rust-native-plugin/**,examples/python-grpc-worker-plugin/**,docs/build-plugins/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

Keep the stable boundary explicit: native plugins cross a C ABI, and worker plugins cross grpc-v1.

Files:

  • python/plugin/pyproject.toml
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
python/plugin/pyproject.toml

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Keep the Python worker plugin SDK packaging metadata in python/plugin/pyproject.toml aligned with the project’s release and import paths.

Files:

  • python/plugin/pyproject.toml
**/*.mdx

📄 CodeRabbit inference engine (.agents/skills/review-doc-style/SKILL.md)

MDX top-of-file SPDX comments must use {/* ... */} delimiters instead of HTML comment delimiters (Must-Fix)

In MDX files, top-of-file comments must use JSX comment delimiters ({/* to open and */} to close); do not use HTML comments for MDX SPDX headers

Files:

  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • docs/getting-started/installation.mdx
{docs,examples}/**/*

📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)

Update docs and examples.

Files:

  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • docs/getting-started/installation.mdx
docs/**/*

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If documentation examples or commands under docs/ change, run the targeted docs checks appropriate to the change.

Files:

  • docs/getting-started/quick-start/nodejs.mdx
  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
  • docs/supported-integrations/openclaw-plugin.mdx
  • docs/getting-started/quick-start/rust.mdx
  • docs/getting-started/quick-start/python.mdx
  • docs/getting-started/installation.mdx
{crates/core/src/plugin/dynamic/**,examples/rust-native-plugin/**,examples/python-grpc-worker-plugin/**,docs/build-plugins/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

Native and worker plugins are trusted extensions; document that native plugins are in-process and unsandboxed, and worker plugins provide process isolation but not a security sandbox.

Files:

  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
{docs/build-plugins/**,examples/rust-native-plugin/**,examples/python-grpc-worker-plugin/**}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

When detailed dynamic plugin guides exist, keep Rust native, Python worker, and grpc-v1 protocol details on separate pages.

Files:

  • docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx
integrations/openclaw/package.json

📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)

Keep the integrations/openclaw/package.json package version aligned with the workspace-root package-lock.json, and keep its dependencies["nemo-relay-node"] entry aligned when the OpenClaw package version changes.

Files:

  • integrations/openclaw/package.json
**/*.{rs,py}

📄 CodeRabbit inference engine (AGENTS.md)

Follow binding naming conventions in Rust and Python: use snake_case.

Files:

  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
**/*.{rs,py,js,mjs,cjs,ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{rs,py,js,mjs,cjs,ts,tsx}: Use Json = serde_json::Value in Rust-facing runtime APIs where the existing code expects JSON payloads.
Use Result<T> with FlowError in core runtime paths, and keep errors explicit and binding-appropriate at the wrapper layer.
Keep async behavior on the existing tokio-based model; bindings should preserve callback and future lifetimes rather than blocking or hiding async work unexpectedly.

Files:

  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
**/*.py

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.py: When changing the Python wrapper package, tests, or docs tooling, lint with Ruff (E, F, W, I), format with Ruff formatter (120-character lines, double quotes), and pass ty type checking.
Add the SPDX license header to all Python source files using the # comment form.

Files:

  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
**/*.{rs,py,go,js,ts,c,h}

📄 CodeRabbit inference engine (CONTRIBUTING.md)

Use language-appropriate naming conventions: Rust snake_case, C FFI exports prefixed nemo_relay_, Go PascalCase, Node.js camelCase, and Python snake_case.

Files:

  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
{crates/**/src/**/*.rs,python/**/*.py}

📄 CodeRabbit inference engine (.agents/skills/maintain-dynamic-plugins/SKILL.md)

Do not add tests under src; Rust tests belong in crate tests/ trees, and Python SDK tests belong under python/tests.

Files:

  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
python/tests/**/*.py

📄 CodeRabbit inference engine (.agents/skills/test-python-binding/SKILL.md)

python/tests/**/*.py: Pytest is used to run tests.
Do not add @pytest.mark.asyncio to any test; async tests are automatically detected and run by the async runner.
Do not add a -> None return type annotation to test functions.
When mocking a class, do not define a new class; use unittest.mock.MagicMock or unittest.mock.AsyncMock, with the spec constructor argument when necessary.
Name mocked classes with the mock prefix, not fake.
Prefer pytest fixtures over helper methods.
Do not repeat fixtures; if a fixture is needed in multiple test files, place it in a conftest.py file.
When creating a fixture, use @pytest.fixture(name="<fixture_name>"[, scope="<scope>"]) and define the fixture function as def <fixture_name>_fixture() -> <return_type>:; only specify scope when it is not function.
Prefer pytest.mark.parametrize over creating individual tests for different input types.

Files:

  • python/tests/test_scope.py
**/*.{rs,py,go,js,ts}

📄 CodeRabbit inference engine (.agents/skills/validate-change/SKILL.md)

If a language surface changed, always run that language's test target even when Rust core did not change.

**/*.{rs,py,go,js,ts}: When observability configuration or lifecycle is exposed, keep FFI and Python, Go, and Node.js binding-native config objects and subscriber/exporter methods aligned in logical knobs and semantics.
Require every OpenTelemetry endpoint to have a type and nonblank destination; resolve header_env values at activation and reject missing, blank, or duplicate headers.
Concatenate layered ATOF sink, ATIF storage, and OpenTelemetry endpoint lists with higher-precedence entries first.
Preserve correct handling of mark events, start/end events, orphan cases, and span or trajectory fields derived from intended event data.
Run affected Rust tests and just test-rust when event fields change; run just test-python, just test-go, and just test-node when binding-native configuration or lifecycle changes.

Files:

  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
**/*.{rs,py,js,ts,tsx,go,java,kt,swift}

📄 CodeRabbit inference engine (.agents/skills/add-middleware/SKILL.md)

Add tests covering registration and duplicate names, deregistration and missing names, priority ordering, callback failure policy, scope-local inheritance and cleanup, event payload semantics, immutable mark and scope fields, and parity across affected bindings.

Files:

  • python/tests/test_scope.py
  • python/nemo_relay/scope.py
{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}

⚙️ CodeRabbit configuration file

{crates/**/tests/**,python/tests/**,go/nemo_relay/**/*_test.go}: Tests should cover the behavior promised by the changed API surface, including error paths and cross-request isolation where relevant.
Prefer assertions on lifecycle events, scope stacks, middleware ordering, and binding parity over shallow smoke tests.

Files:

  • python/tests/test_scope.py
python/nemo_relay/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Python wrapper modules live under python/nemo_relay/, and the native extension is built from crates/python with maturin.

Files:

  • python/nemo_relay/scope.py
{crates/python/src/py_api/mod.rs,python/nemo_relay/**/*.py,python/nemo_relay/**/*.pyi,go/nemo_relay/**/*.go,crates/node/src/api/**/*.rs}

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Update the language-native bindings for every exposed surface in Python, Go, and Node.js.

Files:

  • python/nemo_relay/scope.py
{python/nemo_relay/**/*.py,python/nemo_relay/**/*.pyi,go/nemo_relay/**/*.go}

📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)

Update language wrapper helpers such as Python wrapper modules, Python type stubs, and Go shorthand packages when the new behavior belongs in those helper layers.

Files:

  • python/nemo_relay/scope.py
python/nemo_relay/**/*

⚙️ CodeRabbit configuration file

python/nemo_relay/**/*: Review Python wrapper changes for typed API consistency, contextvars-based scope isolation, async behavior, and parity with the native extension.
Stubs and runtime implementations should stay aligned.

Files:

  • python/nemo_relay/scope.py
**/Cargo.toml

📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)

Keep Rust package names and workspace metadata in Cargo.toml internally consistent across the project.

OpenTelemetry and OpenInference dependencies must be unconditional rather than Cargo feature-gated.

Run just set-version <next-version> to update all release-versioned package surfaces on main.

Files:

  • Cargo.toml
Cargo.toml

📄 CodeRabbit inference engine (.agents/skills/update-project-version/SKILL.md)

In Cargo.toml, treat [workspace.package].version as the source of truth for the Rust workspace and Python build versioning, and keep workspace.dependencies.nemo-relay.version, workspace.dependencies.nemo-relay-adaptive.version, workspace.dependencies.nemo-relay-pii-redaction.version, workspace.dependencies.nemo-relay-ffi.version, and workspace.dependencies.nemo-relay-cli.version aligned when the workspace version changes.

Confirm or infer the target release version from upstream/main:Cargo.toml.

Files:

  • Cargo.toml
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-07-31T21:08:01.962Z
Learning: Derive the release branch name as `release/<major>.<minor>` and create it from the latest `upstream/main`; verify an existing remote release branch points to the expected commit before continuing.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-07-31T21:08:01.962Z
Learning: Run targeted validation including version bump checks, lockfile regeneration, documentation reference review, and `git diff --check`; document any intentional remaining old-version references in the PR description.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-07-31T21:08:01.962Z
Learning: Do not create release tags during a code freeze; create only the release branch and the main code-freeze PR.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-07-31T21:08:01.962Z
Learning: Do not target the code-freeze PR at the release branch; it must target `main`.
Learnt from: CR
Repo: NVIDIA/NeMo-Relay

Timestamp: 2026-07-31T21:08:01.962Z
Learning: Do not leave uncommitted user changes mixed into the code-freeze PR branch.
🪛 markdownlint-cli2 (0.23.1)
.agents/skills/prepare-code-freeze/SKILL.md

[warning] 48-48: Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)

🔇 Additional comments (20)
python/nemo_relay/scope.py (2)

19-19: LGTM!


253-256: LGTM!

python/tests/test_scope.py (1)

6-15: LGTM!

Cargo.toml (1)

24-40: LGTM!

packages/cli-bin/package.json (1)

3-3: LGTM!

docs/getting-started/quick-start/python.mdx (1)

23-23: LGTM!

docs/getting-started/quick-start/rust.mdx (1)

21-21: LGTM!

Also applies to: 30-30, 50-50

docs/supported-integrations/openclaw-plugin.mdx (1)

45-45: LGTM!

Also applies to: 58-58

.agents/skills/prepare-code-freeze/SKILL.md (1)

65-66: LGTM!

.github/nightly-alpha-branches.yaml (1)

6-6: LGTM!

crates/node/package.json (1)

3-3: 🗄️ Data Integrity & Integration

Package-lock alignment is correct. All specified entries use version 0.8.0.

			> Likely an incorrect or invalid review comment.
pyproject.toml (1)

70-70: LGTM!

python/cli-bin/pyproject.toml (1)

10-10: LGTM!

python/plugin/pyproject.toml (1)

11-11: LGTM!

integrations/coding-agents/claude-code/.claude-plugin/plugin.json (1)

3-3: LGTM!

integrations/coding-agents/codex/.codex-plugin/plugin.json (1)

3-3: LGTM!

docs/build-plugins/dynamic-plugins/native-dynamic/rust-native-plugin-example.mdx (1)

32-32: LGTM!

README.md (1)

235-235: LGTM!

docs/getting-started/installation.mdx (1)

126-126: LGTM!

Also applies to: 150-150, 204-204, 219-220, 222-228, 245-245, 283-283

docs/getting-started/quick-start/nodejs.mdx (1)

22-22: LGTM!

Comment thread .agents/skills/prepare-code-freeze/SKILL.md Outdated
Comment thread python/tests/test_scope.py
@mnajafian-nv mnajafian-nv changed the title Fix/python scope cancel status Fix: python scope cancel status Jul 31, 2026
@mnajafian-nv mnajafian-nv changed the title Fix: python scope cancel status fix: python scope cancel status Jul 31, 2026
@github-actions github-actions Bot added the Bug issue describes bug; PR fixes bug label Jul 31, 2026
@github-actions

Copy link
Copy Markdown

Signed-off-by: mnajafian-nv <mnajafian@nvidia.com>
@github-actions

Copy link
Copy Markdown

License Diff

Compared against origin/release/0.7.

Lockfile license changes

Lockfile License Changes

Rust

Added

  • None

Removed

  • None

Updated/Changed

  • None

Node

Added

  • None

Removed

  • None

Updated/Changed

  • None

Python

Added

  • None

Removed

  • None

Updated/Changed

  • None
Status output
[license-diff] selected languages: rust, node, python
[license-diff] generating current inventory
[license-diff] current: generating Rust inventory
[license-diff] current: Rust inventory complete (449 packages)
[license-diff] current: generating Node inventory
[license-diff] current: Node inventory complete (367 packages)
[license-diff] current: generating Python inventory
[license-diff] current: Python inventory complete (105 packages)
[license-diff] current inventory complete
[license-diff] checking out base ref origin/release/0.7 into a temporary worktree
[license-diff] base: generating Rust inventory
[license-diff] base: Rust inventory complete (449 packages)
[license-diff] base: generating Node inventory
[license-diff] base: Node inventory complete (367 packages)
[license-diff] base: generating Python inventory
[license-diff] base: Python inventory complete (105 packages)
[license-diff] base inventory complete
[license-diff] removing temporary base worktree
[license-diff] comparing inventories
[license-diff] rendering Markdown output
[license-diff] done

@github-actions github-actions Bot added size:S PR is small and removed size:M PR is medium labels Jul 31, 2026
@mnajafian-nv mnajafian-nv changed the title fix: python scope cancel status fix: report cancelled Python scopes as errors Jul 31, 2026
Signed-off-by: mnajafian-nv <mnajafian@nvidia.com>
@mnajafian-nv

Copy link
Copy Markdown
Contributor Author

Closing this in favor of PR 620. It carries the same scoped fix on a fresh branch from release/0.7 and is the PR to review going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug issue describes bug; PR fixes bug lang:python PR changes/introduces Python code size:S PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants