Skip to content

fix(devtools): include all workspace packages in bump pin rewrites#5778

Merged
greysonlalonde merged 2 commits into
mainfrom
fix/bump-rewrite-workspace-packages
May 12, 2026
Merged

fix(devtools): include all workspace packages in bump pin rewrites#5778
greysonlalonde merged 2 commits into
mainfrom
fix/bump-rewrite-workspace-packages

Conversation

@greysonlalonde
Copy link
Copy Markdown
Contributor

@greysonlalonde greysonlalonde commented May 12, 2026

Summary

  • _DEFAULT_WORKSPACE_PACKAGES only listed crewai, crewai-tools, crewai-devtools, so version bumps silently left crewai-core, crewai-cli, and crewai-files pins on the previous version. This is what caused the stale 1.14.5a4 pins in lib/crewai/pyproject.toml and lib/cli/pyproject.toml flagged on the 1.14.5a5 bump (Cursor bugbot on a3b3d13).
  • Adds the missing packages and a regression test that fails if any [tool.uv.workspace] members entry is absent from the rewrite list.

Test plan

  • uv run pytest lib/devtools/tests/test_toml_updates.py — 28 passed
  • Simulated bump on lib/crewai/pyproject.toml now rewrites all four pins (crewai-core, crewai-cli, crewai-tools, crewai-files)
  • After merge, re-run the 1.14.5a5 bump (or any future bump) and confirm no stale pins remain

Note

Low Risk
Low risk: changes are limited to devtools version-bump pin rewrites and add regression tests to prevent missing workspace packages; no runtime product logic is affected.

Overview
Fixes devtools version bumping so update_pyproject_dependencies rewrites pins for all workspace packages by expanding _DEFAULT_WORKSPACE_PACKAGES to include crewai-cli, crewai-core, and crewai-files.

Adds tests ensuring every [tool.uv.workspace] member is covered by the default rewrite list, that pins across dependencies and optional-dependencies are updated, and that crewai==... does not incorrectly collide with crewai-core==....

Reviewed by Cursor Bugbot for commit f575667. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Improvements

    • Enhanced workspace dependency update logic to target additional crewai packages (including crewai-cli, crewai-core, crewai-files) during version bumps and releases.
  • Tests

    • Added comprehensive tests to ensure all workspace packages are covered, workspace-scoped dependency pins are rewritten to the provided version, unrelated constraints remain unchanged, and bare package entries aren’t confused with similarly named packages.

Review Change Stack

The bump rewrite logic only knew crewai, crewai-tools, crewai-devtools,
so split-package pins (crewai-core, crewai-cli, crewai-files) were left
on the previous version after each bump.

Adds a regression test that fails if any workspace member is missing
from _DEFAULT_WORKSPACE_PACKAGES.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dc0a558a-cad0-4314-934b-cfe3befa2bc4

📥 Commits

Reviewing files that changed from the base of the PR and between 66e94be and f575667.

📒 Files selected for processing (1)
  • lib/devtools/tests/test_toml_updates.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • lib/devtools/tests/test_toml_updates.py

📝 Walkthrough

Walkthrough

The PR expands the workspace package list to include crewai-cli, crewai-core, and crewai-files, enabling the dependency update logic to rewrite version pins for these additional packages during releases. New tests validate that the constant covers all workspace members, that all matching dependency pins are rewritten correctly, and that similarly named packages do not collide.

Changes

Workspace Packages Expansion

Layer / File(s) Summary
Workspace packages constant expansion
lib/devtools/src/crewai_devtools/cli.py
The _DEFAULT_WORKSPACE_PACKAGES constant is expanded to include crewai-cli, crewai-core, and crewai-files for targeting during workspace-wide dependency pin updates.
Workspace packages and dependency update tests
lib/devtools/tests/test_toml_updates.py
Three new test methods verify that the expanded constant covers all workspace members by reading pyproject.toml files, that update_pyproject_dependencies rewrites all matching workspace pins (including extras) to target versions while leaving unrelated constraints unchanged, and that similarly named packages such as crewai and crewai-core are updated independently without collision.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • crewAIInc/crewAI#5752: Expands default workspace packages and adds tests for update_pyproject_dependencies to include crewai-cli, crewai-core, and crewai-files alongside corresponding version bump updates for those packages.

Suggested labels

size/S

Suggested reviewers

  • renatonitta

Poem

🐰 A workspace grows with packages new,
Crewai-cli, core, and files too!
Tests now verify the pins align,
No collisions when names intertwine,
All dependencies in perfect design! 🚀

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: expanding _DEFAULT_WORKSPACE_PACKAGES to include additional workspace packages for version bump rewrites.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bump-rewrite-workspace-packages

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@lib/devtools/tests/test_toml_updates.py`:
- Around line 244-246: The test imports tomllib which only exists on Python
3.11+, causing failures on Python 3.10; update the import near where
tomllib.loads is used (in lib/devtools/tests/test_toml_updates.py) to use a
guarded fallback that tries to import tomllib and falls back to tomli (e.g., try
importing tomllib and except ModuleNotFoundError import tomli as tomllib) so
that the call to tomllib.loads and the variable members continue to work on
Python 3.10, or alternatively update the project's requires-python to >=3.11 if
dropping 3.10 support.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ebacf16-182b-4906-a1dd-6ca937c82430

📥 Commits

Reviewing files that changed from the base of the PR and between 63a9e7e and 66e94be.

📒 Files selected for processing (2)
  • lib/devtools/src/crewai_devtools/cli.py
  • lib/devtools/tests/test_toml_updates.py

Comment thread lib/devtools/tests/test_toml_updates.py Outdated
@greysonlalonde greysonlalonde merged commit ba523f4 into main May 12, 2026
55 checks passed
@greysonlalonde greysonlalonde deleted the fix/bump-rewrite-workspace-packages branch May 12, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant