Skip to content

chore: upgrade ty to 0.0.91 - #1498

Merged
willkill07 merged 2 commits into
NVIDIA:mainfrom
greysonlalonde:chore/upgrade-ty
Oct 25, 2026
Merged

willkill07 merged 2 commits into
NVIDIA:mainfrom
greysonlalonde:chore/upgrade-ty

Conversation

@greysonlalonde

@greysonlalonde greysonlalonde commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Bumps ty to latest, updates resulting type errors.

  • 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

  • raise dev floor to ty>=0.0.91, lock and attributions change ty only
  • annotate context managers with Generator[X] and AsyncGenerator[X]
  • drop casts ty marks as redundant
  • check LangChain message and tool lists with _are_objects before use
  • type LangGraph graph bubble sentinel as JsonObject
  • edit ADK test fixtures through with_last_text and typed values
  • mark test overrides of inherited attributes with rule-named ty: ignore

Where should the reviewer start?

Summary by CodeRabbit

  • Bug Fixes
    • LangChain integrations now validate message entries and tool definitions during decoding. Malformed message entries raise a type error, and malformed tool entries raise a value error, rather than being passed along as valid data.
    • Restoring model-request messages continues to ignore validation errors, preserving existing behavior for that flow.
  • Maintenance
    • Updated internal type annotations and test helpers; these changes do not alter runtime behavior.

- raise dev floor to `ty>=0.0.91`, lock and attributions change ty only
- annotate context managers with `Generator[X]` and `AsyncGenerator[X]`
- drop casts ty marks as redundant
- check LangChain message and tool lists with `_are_objects` before use
- type LangGraph graph bubble sentinel as `JsonObject`
- edit ADK test fixtures through `with_last_text` and typed values
- mark test overrides of inherited attributes with rule-named `ty: ignore`

Signed-off-by: Greyson Lalonde <[email protected]>
@greysonlalonde greysonlalonde self-assigned this Oct 25, 2026
@greysonlalonde
greysonlalonde requested review from a team as code owners October 25, 2026 00:40
@github-actions github-actions Bot added size:S PR is small Maintenance CI or Build or general repository maintenance lang:python PR changes/introduces Python code labels Oct 25, 2026
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 848c19a and 6150ae7.

Files selected for processing: 1
  • pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Recent review details
Context from checks skipped due to timeout: 2
  • GitHub Check: Preview docs
  • GitHub Check: Changes / Detect
Additional context used
Code guidelines: 2
.agents/skills/maintain-packaging/SKILL.md — configured
.agents/skills/update-project-version/SKILL.md — configured
Path-based instructions: 2
Source excerpt: Python packaging in `pyproject.toml`

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

Files:

  • pyproject.toml
Source excerpt: Python surfaces use PEP 440 translations where required; Cargo, npm, and plugin manifests use the repository SemVer form.

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

Files:

  • pyproject.toml
Additional comments: 2
pyproject.toml: 2

189-194: LGTM!

60-60: 📐 Maintainability & Code Quality

No stale ty version remains in tracked manifests.

The exact 0.0.1a7 value does not occur in tracked files, so no manifest change is required.

Walkthrough

The pull request updates the ty development dependency and typing configuration, refines Python type annotations, adds object-entry validation to LangChain deserialization, and adjusts tests and supporting scripts.

Changes

Typing and serialization updates

Layer / File(s) Summary
Type-checker configuration and annotations
pyproject.toml, ATTRIBUTIONS-Python.md, python/nemo_relay/..., python/plugin/..., scripts/...
The ty minimum version changes to 0.0.91, and a skills/** rule override is added. Generator annotations replace iterator annotations in library, plugin, and benchmark code. The LangGraph result type uses JsonObject. Supporting scripts update typing directives or remove a cast.
LangChain deserialization validation
python/nemo_relay/integrations/langchain/_serialization.py
Message entries are checked as objects before deserialization. Tool entries are also checked, and the shared validation helpers are used by message restoration and tool-schema validation.
Test and supporting-code adjustments
python/tests/integrations/google_adk_tests/*, python/tests/integrations/langchain_tests/*, python/tests/plugin/*, python/tests/test_*.py
Google ADK tests use a shared helper to replace the last message text. Other tests update JSON typing, assertions, callback handling, and middleware declarations.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: Minimal · up to 6150a

No merge-blocking issue is established; the change is mergeable after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 34.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 82 functions across 27 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title follows Conventional Commits with the allowed type 'chore', lowercase, imperative, 27 characters, no trailing period. It names the main change: upgrading ty to 0.0.91, which matches the depe…
Description check Passed The description fills the Overview section with a short statement of purpose and checks both confirmation boxes. The Details section lists the concrete changes: dev floor raised to ty>=0.0.91, Generat…
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.
Full details: Title check

Explanation

The title follows Conventional Commits with the allowed type 'chore', lowercase, imperative, 27 characters, no trailing period. It names the main change: upgrading ty to 0.0.91, which matches the dependency floor, lockfile, attributions, and type-error fixes in the changeset.

Full details: Description check

Explanation

The description fills the Overview section with a short statement of purpose and checks both confirmation boxes. The Details section lists the concrete changes: dev floor raised to ty>=0.0.91, Generator and AsyncGenerator annotations, removed redundant casts, LangChain validation, LangGraph sentinel typing, ADK fixture edits, and rule-named ty: ignore comments. The template's 'Where should the reviewer start?' section is present but left empty, and the 'Related Issues' section with its 'Closes #' line is missing entirely.

Resolution

Optional improvements: point reviewers to a starting file (for example python/nemo_relay/integrations/langchain/_serialization.py, which has the most behavioral logic) under 'Where should the reviewer start?', and add the 'Related Issues' section with a linked issue or 'Relates to' entry, or remove it if none applies.

Full details: Docstring Coverage

Explanation

Docstring coverage is 34.15% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 82 functions across 27 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions

Copy link
Copy Markdown

License Diff

Compared against origin/main.

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

ty

Before:

  • ty 0.0.29 (MIT)

After:

  • ty 0.0.91 (MIT)
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 (487 packages)
[license-diff] current: generating Node inventory
[license-diff] current: Node inventory complete (424 packages)
[license-diff] current: generating Python inventory
[license-diff] current: Python inventory complete (158 packages)
[license-diff] current inventory complete
[license-diff] checking out base ref origin/main into a temporary worktree
[license-diff] base: generating Rust inventory
[license-diff] base: Rust inventory complete (487 packages)
[license-diff] base: generating Node inventory
[license-diff] base: Node inventory complete (424 packages)
[license-diff] base: generating Python inventory
[license-diff] base: Python inventory complete (158 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

Copy link
Copy Markdown

@willkill07

Copy link
Copy Markdown
Member

/nvskills-ci

@willkill07 willkill07 added the DO NOT MERGE PR should not be merged; see PR for details label Oct 25, 2026
@willkill07

Copy link
Copy Markdown
Member

We need to either get the skills CI to pass or drop the changes to the public skill

- skip ty's deprecated rule under `skills/**` where an edit needs a new NVSkills signature

Signed-off-by: Greyson Lalonde <[email protected]>
@willkill07 willkill07 removed the DO NOT MERGE PR should not be merged; see PR for details label Oct 25, 2026
@willkill07
willkill07 merged commit 4246dab into NVIDIA:main Oct 25, 2026
66 checks passed

This branch was previously deployed

1 inactive deployment
fern — 6150ae70 Deployed Oct 25, 2026 by willkill07 via Clean up docs preview #6533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang:python PR changes/introduces Python code Maintenance CI or Build or general repository maintenance size:S PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants