Skip to content

chore: Comprehensive dependency upgrade and code review#5

Open
jlevy wants to merge 9 commits intomainfrom
claude/full-repo-review-smClk
Open

chore: Comprehensive dependency upgrade and code review#5
jlevy wants to merge 9 commits intomainfrom
claude/full-repo-review-smClk

Conversation

@jlevy
Copy link
Owner

@jlevy jlevy commented Feb 2, 2026

Summary

Full repository code review with comprehensive dependency upgrades. All dependencies updated to latest versions including major version upgrades (OpenAI 2.x, pandas 3.0, pyrate-limiter 4.0). Includes code review document tracking architecture, issues, and improvement opportunities.

Changes

Dependency Upgrades (Final Versions)

  • openai: 1.99.9 → 2.16.0 (major version upgrade, was previously pinned)
  • litellm: 1.78.7 → 1.81.6
  • mcp: 1.19.0 → 1.26.0
  • mcp-proxy: 0.8.2 → 0.11.0
  • xonsh: 0.19.9 → 0.22.1
  • pandas: 2.3.3 → 3.0.0 (major version)
  • pyrate-limiter: 3.9.0 → 4.0.2 (breaking API change - code updated)
  • fastapi: 0.120.0 → 0.128.0
  • numpy: 2.3.4 → 2.4.2
  • pytest: 8.4.2 → 9.0.2
  • ruff: 0.14.2 → 0.14.14
  • rich: 14.2.0 → 14.3.2
  • cachetools: 6.2.4 → 7.0.0
  • packaging: 25.0 → 26.0
  • huggingface-hub: 0.36.0 → 1.3.7
  • websockets: 15.0.1 → 16.0
    • many transitive dependency upgrades

Code Changes

  • Fixed pyrate-limiter 4.0 API breaking change in cache_requests_limited.py
    • Limiter constructor no longer accepts raise_when_fail/max_delay
    • Now uses try_acquire(blocking=True, timeout=ms) instead
  • Removed deprecated UP038 from ruff ignore list

Tooling Updates

  • GitHub Actions uv: 0.9.5 → 0.9.26
  • Added tbd issue tracking setup with Claude Code integration

Documentation

  • Created comprehensive code review document: docs/CODE_REVIEW_2026-01.md
    • Architecture analysis with module breakdown
    • Test coverage assessment (145 tests passing)
    • Type safety analysis (zero basedpyright errors)
    • TODO/FIXME catalogue (50+ items)
    • Creative improvement ideas
    • Prioritized action items

Test Plan

  • All 145 unit tests pass (uv run pytest)
  • Lint checks pass (uv run ruff check)
  • Type checks pass (uv run basedpyright - 0 errors)
  • Full lint suite passes (make lint)
  • Dependencies resolve correctly (make upgrade)
  • CI workflow passes on GitHub Actions (Python 3.11, 3.12, 3.13)

Manual Verification Completed

  • OpenAI SDK 2.16.0 works with LiteLLM 1.81.6
  • pyrate-limiter 4.0 API migration verified and tested
  • pandas 3.0 compatible with existing code
  • Shell startup works (uv run kash --help)
  • All major version upgrades verified compatible

Edge Cases Considered

  • pyrate-limiter 4.0 breaking API change required code update to cache_requests_limited.py
  • OpenAI pin was constraining LiteLLM version (resolved by upgrading both together)
  • Transitive dependencies fully upgraded via make upgrade
  • Multiple rounds of make upgrade to catch all outdated packages

Related Beads

No beads tracked yet - this is initial project setup with tbd.

Includes:
- Full architecture analysis with module breakdown
- Test coverage assessment (145 tests passing)
- Type safety analysis (zero pyright errors)
- Dependency audit with upgrade recommendations
- 50+ TODO/FIXME items catalogued
- Creative improvement ideas (pipelines, plugins, sync)
- Best practices alignment with Python guidelines
- Prioritized action items
Dependencies upgraded:
- litellm: 1.78.7 → 1.80.0
- mcp: 1.19.0 → 1.25.0
- mcp-proxy: 0.8.2 → 0.11.0
- xonsh: 0.19.9 → 0.22.1
- fastapi: 0.120.0 → 0.128.0
- flowmark: 0.5.4 → 0.6.1
- deepgram-sdk: 5.2.0 → 5.3.1
- clideps: 0.1.7 → 0.1.8
- curl-cffi: 0.13.0 → 0.14.0
- numpy: 2.3.4 → 2.4.1
- pytest: 8.4.2 → 9.0.2
- ruff: 0.14.2 → 0.14.13
- uvicorn: 0.38.0 → 0.40.0
- pydantic: 2.12.3 → 2.12.5

Tooling updates:
- Remove deprecated UP038 from ruff ignore list
- Upgrade GitHub Actions uv to 0.9.26

All 145 tests passing after upgrades.
The previous OpenAI pin at 1.99.9 was due to a ResponseTextConfig import
error. This is now resolved by upgrading LiteLLM to 1.80.16 which properly
supports OpenAI SDK 2.x.

Changes:
- openai: 1.99.9 → 2.15.0 (major version upgrade)
- litellm: 1.80.0 → 1.80.16
- Added grpcio 1.76.0 (new dependency)

All 145 tests passing with zero lint/type errors.
Full dependency refresh using `uv sync --upgrade`. Notable upgrades:
- anyio: 4.11.0 → 4.12.1
- certifi: 2025.10.5 → 2026.1.4
- cryptography: 46.0.3 → 47.0.0 (new)
- filelock: 3.20.0 → 3.20.3
- googleapis-common-protos: 1.70.0 → 1.72.0
- httpcore: 1.1.0 → 1.2.0
- httpx: 0.28.1 → 0.29.0
- huggingface-hub: 0.36.0 → 1.3.2
- orjson: 3.13.1 → 3.13.3
- pydantic-settings: 2.11.0 → 2.12.0
- python-dotenv: 1.1.1 → 1.2.1
- regex: 2025.10.23 → 2026.1.15
- rpds-py: 0.28.0 → 0.30.0
- ruamel-yaml: 0.18.16 → 0.19.1
- selectolax: 0.4.0 → 0.4.6
- send2trash: 1.8.3 → 2.1.0
- starlette: 0.48.0 → 0.50.0
- urllib3: 2.5.0 → 2.6.3
- websockets: 15.0.1 → 16.0

All 145 tests passing, zero lint/type errors.
- Initialize tbd with prefix "kash"
- Configure Claude Code hooks and scripts
- Add tbd skill file for agent integration

The .tbd/docs/ cache and other generated files are gitignored.
Major upgrades:
- openai: 2.15.0 → 2.16.0
- litellm: 1.80.16 → 1.81.6
- mcp: 1.25.0 → 1.26.0
- pandas: 2.3.3 → 3.0.0
- pyrate-limiter: 3.9.0 → 4.0.2 (API breaking change - updated code)
- rich: 14.2.0 → 14.3.2
- numpy: 2.4.1 → 2.4.2
- ruff: 0.14.13 → 0.14.14
- cachetools: 6.2.4 → 7.0.0
- packaging: 25.0 → 26.0

Fix pyrate-limiter 4.0 API change:
- Limiter constructor no longer accepts raise_when_fail/max_delay
- Use try_acquire(blocking=True, timeout=ms) instead

All 145 tests passing, zero lint/type errors.
@jlevy jlevy changed the title chore: upgrade dependencies and add comprehensive code review chore: Comprehensive dependency upgrade and code review Feb 2, 2026
jlevy pushed a commit that referenced this pull request Feb 8, 2026
- Upgrade openai from 1.x pin to >=2.15.0 (now resolves to 2.17.0)
- Upgrade litellm to >=1.80.16 (now resolves to 1.81.9)
- Run uv lock --upgrade to update all transitive deps
- Update CI uv version from 0.9.5 to 0.9.26
- Include CODE_REVIEW_2026-01.md from PR #5

All 301 tests pass with the upgraded dependencies.

https://claude.ai/code/session_01Pv152sQEpeLvwDoJTdz9Fm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants