Skip to content

chore: switch to ruff; added pre-commit rule for auto-fixing lint errors #3217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nirga
Copy link
Member

@nirga nirga commented Aug 2, 2025

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

Important

Switch to Ruff for linting and add pre-commit rule for auto-fixing lint errors across multiple packages.

  • Linting Tool Update:
    • Switch from flake8 and autopep8 to ruff for linting in pyproject.toml files across multiple packages.
    • Add ruff configuration for linting and formatting in pyproject.toml.
  • Pre-commit and Linting Configuration:
    • Add lint:fix target in project.json files for auto-fixing lint errors.
    • Update nx.json to include ruff-check executor for lint and lint:fix targets.
  • Code Quality and Maintenance:
    • Remove redundant lint configurations in project.json files.
    • Standardize project configuration formatting across packages.

This description was created by Ellipsis for b784e09. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • Chores
    • Standardized project configuration formatting across packages.
    • Replaced existing linting configurations with new default lint and lint:fix targets.
    • Added a new lint:fix target for automatic lint issue fixing in all packages.
    • Updated root configuration to define default linting behavior for Python files.
    • Integrated pre-commit hooks and lint-staged tooling for improved code quality enforcement.
    • Consolidated linting dependencies by replacing multiple tools with a single unified linter.

Copy link

coderabbitai bot commented Aug 2, 2025

Walkthrough

This change updates the lint configuration across numerous project.json files in the packages directory. Each package removes its previous flake8-based lint target configuration and replaces it with an empty object, and adds a new empty lint:fix target. Formatting of arrays (such as outputs and tags) is changed from single-line to multi-line. Additionally, the root nx.json file introduces targetDefaults for lint and lint:fix, now using the @nxlv/python:ruff-check executor with appropriate options. The pyproject.toml files in these packages replace autopep8 and flake8 dev dependencies with a single ruff dependency. A new .husky/pre-commit hook is added to run lint-staged before commits, and package.json is updated to include husky and lint-staged tooling with relevant scripts and devDependencies. Minor code style improvements and import reorganizations are applied across many instrumentation packages. Test files receive formatting and assertion clarity improvements, including removal of unused variable assignments in some tests.

Changes

Cohort / File(s) Change Summary
Root Lint Target Defaults
nx.json
Added targetDefaults with lint and lint:fix using @nxlv/python:ruff-check; updated plugin entry.
Husky and Lint-Staged Setup
.husky/pre-commit, package.json
Added pre-commit hook to run lint-staged; updated package.json with husky and lint-staged dependencies, scripts, and lint-staged config.
Project Lint Target Refactor
packages/*/project.json
For each package: removed flake8 lint configuration, replaced lint with empty object, added empty lint:fix, and reformatted outputs/tags arrays.
Development Dependency Updates
packages/*/pyproject.toml
Removed autopep8 and flake8 dev dependencies; added ruff dependency (version ^0.12.7) in place.
Instrumentation Import and Code Style Updates
packages/opentelemetry-instrumentation-*/**/*.py
Replaced typing.List and typing.Collection imports with built-in generics and collections.abc.Collection; simplified conditional statements; replaced .format() string formatting with f-strings; refactored try-except blocks to use contextlib.suppress; reorganized import statements for clarity; combined nested conditionals into single-line expressions; minor code style improvements.
Test Code Improvements
packages/opentelemetry-instrumentation-langchain/tests/test_llms.py, test_documents_chains.py, test_agents.py, and others
Improved assertion clarity by simplifying list and set comparisons; removed unused variable assignments; reformatted multi-line string literals for readability; reordered imports; removed explicit file open modes where redundant; minor formatting adjustments in test files.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Nx as nx.json
    participant Pkg as packages/*/project.json

    Dev->>Nx: Runs "nx lint"
    Nx->>Pkg: Applies targetDefaults for "lint" (ruff-check)
    Dev->>Nx: Runs "nx lint:fix"
    Nx->>Pkg: Applies targetDefaults for "lint:fix" (ruff-check with fix)
    Dev->>Git: Commits code
    Git->>.husky/pre-commit: Runs lint-staged
    .husky/pre-commit->>Nx: Runs "nx affected --target=lint:fix" on staged Python files
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

A rabbit hopped from file to file,
Tidying lint with a ruff new style.
Flake8’s gone, the fixers in,
Arrays now line up, neat and thin.
With nx at root and targets clear,
The codebase shines—spring cleaning’s here!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch auto-fix-lint

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to a68dc92 in 1 minute and 29 seconds. Click for details.
  • Reviewed 2105 lines of code in 64 files
  • Skipped 32 files when reviewing.
  • Skipped posting 6 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .husky/pre-commit:1
  • Draft comment:
    Consider adding a trailing newline for POSIX compliance.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. package.json:20
  • Draft comment:
    Verify that the lint-staged configuration using 'npx nx affected --target=lint:fix' meets your project's needs.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to verify their configuration, which is against the rules. It doesn't provide a specific suggestion or point out a potential issue with the code.
3. packages/opentelemetry-instrumentation-alephalpha/project.json:48
  • Draft comment:
    Lint target now uses '@nxlv/python:ruff-check' with a dedicated fix target; ensure that both CI and local workflows handle ruff output as expected.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to ensure that CI and local workflows handle the ruff output as expected. This falls under the rule of not asking the author to ensure behavior is intended or tested. It doesn't provide a specific suggestion or point out a specific issue.
4. packages/opentelemetry-instrumentation-alephalpha/pyproject.toml:33
  • Draft comment:
    Removed autopep8 and flake8 dependencies in favor of ruff; double‐check that the ruff version '^0.12.7' and its configuration satisfy your linting rules.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to double-check the ruff version and its configuration, which violates the rule against asking the author to confirm or double-check things. The comment is not making a specific code suggestion or asking for a specific test to be written. Therefore, it should be removed.
5. packages/opentelemetry-instrumentation-weaviate/project.json:77
  • Draft comment:
    The build-release target now includes a 'dependsOn' field; ensure this dependency chain aligns with your release process.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is asking the PR author to ensure that the dependency chain aligns with their release process, which is a form of asking them to double-check their work. This violates the rule against asking the author to ensure behavior is intended or to double-check things.
6. packages/traceloop-sdk/pyproject.toml:23
  • Draft comment:
    Review the SDK dependency declarations to ensure compatibility with the new ruff-based linting in instrumentation packages.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_CjKNjpD78qkTkUvB

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@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: 7

🔭 Outside diff range comments (2)
packages/opentelemetry-instrumentation-google-generativeai/pyproject.toml (1)

28-33: Ruff added – legacy linter references still present in generator templates
Several of our project‐scaffolding templates continue to reference flake8 and autopep8. You’ll need to remove or replace these entries so that newly generated projects use only ruff. Found occurrences in:

  • plugin/package/src/generators/uv-project/test/custom-template/pyproject.toml (autopep8==1.5.7)
  • plugin/package/src/generators/uv-project/files/base/pyproject.toml
    • autopep8>=…
    • conditional blocks for flake8
    • commented plugins (# flake8-bugbear, # flake8-simplify)
  • plugin/package/src/generators/poetry-project/files/base/pyproject.toml
    • autopep8 = “…”
    • conditional blocks for flake8
    • commented plugins (# flake8-bugbear, # flake8-simplify)
  • plugin/package/src/generators/project/files/pyproject.toml
    • flake8 = “4.0.1” and several flake8-* plugins
    • autopep8 = “1.5.7”
  • plugin/package/src/generators/poetry-project/test/custom-template/pyproject.toml (autopep8)

Please update these templates (and any related CI/config files) to drop flake8/autopep8 in favor of ruff.

packages/opentelemetry-instrumentation-langchain/project.json (1)

5-5: Incorrect sourceRoot – points to the Anthrop(ic) package

"opentelemetry_instrumentation_anthropic" is clearly a copy-paste error and will break Nx source-set resolution, affected lint/file-watch tasks, and IDE navigation for this package.

-  "sourceRoot": "packages/opentelemetry-instrumentation-langchain/opentelemetry_instrumentation_anthropic",
+  "sourceRoot": "packages/opentelemetry-instrumentation-langchain/opentelemetry/instrumentation/langchain",
♻️ Duplicate comments (55)
packages/opentelemetry-instrumentation-mcp/pyproject.toml (1)

29-32: Same Ruff version pin as in the replicate package

See previous comment – the rationale and diff apply verbatim.

packages/opentelemetry-instrumentation-cohere/pyproject.toml (1)

32-35: Same Ruff version pin as in the replicate package

See earlier note about upgrading from 0.12.x to the current 0.4.x stream.

packages/opentelemetry-instrumentation-haystack/pyproject.toml (1)

32-35: Same Ruff version pin as in the replicate package

Refer to the first comment for details and the suggested diff.

packages/opentelemetry-instrumentation-openai/pyproject.toml (1)

32-34: Same note as above – ensure obsolete lint deps are fully removed.

packages/opentelemetry-instrumentation-sagemaker/pyproject.toml (1)

28-30: Same note as above – ensure obsolete lint deps are fully removed.

packages/opentelemetry-semantic-conventions-ai/pyproject.toml (1)

27-30: Same note as above – ensure obsolete lint deps are fully removed.

packages/opentelemetry-instrumentation-llamaindex/pyproject.toml (1)

33-35: Same note as above – ensure obsolete lint deps are fully removed.

packages/opentelemetry-instrumentation-pinecone/pyproject.toml (1)

33-33: Same Ruff-version concern as noted for the CrewAI package

See earlier comment about upgrading / deduplicating the ruff = "^0.12.7" declaration.

packages/opentelemetry-instrumentation-anthropic/pyproject.toml (1)

33-33: Same Ruff-version concern as noted for the CrewAI package

See earlier comment about upgrading / deduplicating the ruff = "^0.12.7" declaration.

packages/opentelemetry-instrumentation-mistralai/pyproject.toml (1)

29-29: Same Ruff-version concern as noted for the CrewAI package

See earlier comment about upgrading / deduplicating the ruff = "^0.12.7" declaration.

packages/opentelemetry-instrumentation-vertexai/pyproject.toml (1)

34-34: Same Ruff-version concern as noted for the CrewAI package

See earlier comment about upgrading / deduplicating the ruff = "^0.12.7" declaration.

packages/opentelemetry-instrumentation-bedrock/pyproject.toml (1)

34-36: Same observation as above

See previous comment about verifying the repo is fully cleansed of flake8 / autopep8 remnants.

packages/opentelemetry-instrumentation-openai-agents/pyproject.toml (1)

29-32: Same observation as above

packages/opentelemetry-instrumentation-chromadb/pyproject.toml (1)

32-35: Same observation as above

packages/opentelemetry-instrumentation-milvus/pyproject.toml (1)

32-35: Same observation as above

packages/sample-app/pyproject.toml (1)

100-103: Same Ruff version-range concern as in traceloop-sdk

For consistency & reproducibility, apply the same pinning / lock-file strategy discussed for the SDK package.

packages/opentelemetry-instrumentation-marqo/project.json (2)

49-55: Duplicate of the earlier comment: please ensure the ruff-check executor is available and that CI is updated accordingly.


78-85: Same observation on redundant lint:fix target – consider relying on the --fix flag instead of per-package duplication.

packages/opentelemetry-instrumentation-sagemaker/project.json (2)

49-55: Duplicate of the earlier comment about verifying executor availability and CI integration.


78-85: Duplicate of the earlier suggestion to drop the extra lint:fix target in favour of --fix.

packages/opentelemetry-instrumentation-groq/project.json (2)

49-55: Duplicate of the earlier comment about confirming ruff-check executor presence.


78-85: Duplicate of the earlier suggestion regarding redundant lint:fix targets.

packages/traceloop-sdk/project.json (2)

49-55: Duplicate of the earlier comment – confirm executor availability and CI configuration.


78-85: Duplicate of the earlier suggestion to avoid per-package lint:fix targets.

packages/opentelemetry-instrumentation-ollama/project.json (2)

48-56: Same glob-scope concern as the Pinecone package.
See previous comment; restricting lintFilePatterns improves speed and avoids touching generated paths.


78-86: Consider target defaults to remove duplication.
See detailed suggestion in Pinecone project.json.

packages/opentelemetry-semantic-conventions-ai/project.json (2)

48-56: Ruff lint glob could be tightened.
Refer to earlier comment; scanning the entire package tree might be unnecessary.


68-76: Duplicated lint vs lint:fix blocks.
Same DRY recommendation as given for Pinecone.

packages/opentelemetry-instrumentation-crewai/project.json (2)

48-56: Broad lint glob – optional refinement.
See prior comments.


78-86: Reduce config duplication via Nx defaults.
Same as previous.

packages/opentelemetry-instrumentation-cohere/project.json (2)

48-56: Wide **/*.py glob – consider narrowing.
See initial comment for justification.


78-86: Repeated target configuration.
Refer to DRY suggestion in Pinecone file.

packages/opentelemetry-instrumentation-together/project.json (1)

49-55: Same concern as raised in the MCP project – please ensure the option keys match the executor’s schema

packages/opentelemetry-instrumentation-alephalpha/project.json (1)

49-55: Same concern as raised in the MCP project – please ensure the option keys match the executor’s schema

packages/opentelemetry-instrumentation-google-generativeai/project.json (1)

49-55: Same concern as raised in the MCP project – please ensure the option keys match the executor’s schema

packages/opentelemetry-instrumentation-weaviate/project.json (1)

49-55: Same concern as raised in the MCP project – please ensure the option keys match the executor’s schema

packages/opentelemetry-instrumentation-mistralai/project.json (1)

49-55: Same Ruff-executor concern applies

See the comment in opentelemetry-instrumentation-replicate/project.json about pinning the Ruff version and ensuring the executor is available.

packages/opentelemetry-instrumentation-qdrant/project.json (1)

49-55: Same Ruff-executor concern applies

See the comment in opentelemetry-instrumentation-replicate/project.json about pinning the Ruff version and ensuring the executor is available.

packages/opentelemetry-instrumentation-vertexai/project.json (1)

49-55: Same Ruff-executor concern applies

See the comment in opentelemetry-instrumentation-replicate/project.json about pinning the Ruff version and ensuring the executor is available.

packages/opentelemetry-instrumentation-anthropic/project.json (1)

49-55: Same Ruff-executor concern applies

See the comment in opentelemetry-instrumentation-replicate/project.json about pinning the Ruff version and ensuring the executor is available.

packages/opentelemetry-instrumentation-haystack/project.json (1)

78-85: Apply the same scoped pattern to lint:fix

Mirror the change above so the auto-fix target only rewrites files inside this package.

-        "lintFilePatterns": [
-          "**/*.py"
-        ],
+        "lintFilePatterns": [
+          "{projectRoot}/**/*.py"
+        ],
packages/opentelemetry-instrumentation-openai/project.json (2)

49-55: Same glob-scope concern as noted for haystack

Please scope lintFilePatterns to {projectRoot}/**/*.py to avoid linting the whole repo from each package target.


78-85: Propagate the scoped pattern to lint:fix

Update the auto-fix target accordingly.

packages/opentelemetry-instrumentation-bedrock/project.json (2)

49-55: Scope the lint glob to this package

Replace "**/*.py" with {projectRoot}/**/*.py for faster, isolated lint runs.


78-85: Do the same for the fix target

Keep the glob consistent with the regular lint target.

packages/opentelemetry-instrumentation-lancedb/project.json (2)

49-55: Limit linting to package files

Please update the glob to {projectRoot}/**/*.py.


78-85: Align lint:fix glob with the change above

Avoid repo-wide writes during auto-fixing.

packages/opentelemetry-instrumentation-langchain/project.json (2)

49-55: Use a package-scoped glob for linting

Same performance concern as the other packages.

-        "lintFilePatterns": [
-          "**/*.py"
-        ],
+        "lintFilePatterns": [
+          "{projectRoot}/**/*.py"
+        ],

78-85: Update lint:fix glob accordingly

Keep fix behaviour consistent with lint behaviour.

packages/opentelemetry-instrumentation-watsonx/project.json (2)

49-55: Same duplication comment as on the milvus package.

Reuse an nx target default for the ruff-check configuration to keep per-package files minimal.


79-85: Disable caching for the fixer, as noted in the milvus review.

packages/opentelemetry-instrumentation-openai-agents/project.json (2)

49-55: Same duplication comment as on the milvus package.


79-85: Disable caching for the fixer, as noted in the milvus review.

packages/opentelemetry-instrumentation-llamaindex/project.json (2)

49-55: Same duplication comment as on the milvus package.


79-85: Disable caching for the fixer, as noted in the milvus review.

🧹 Nitpick comments (13)
packages/opentelemetry-instrumentation-groq/pyproject.toml (1)

28-32: Confirm Ruff version constraint – it locks the project to an outdated minor line

^0.12.7 restricts upgrades to <0.13.0, preventing adoption of the much-newer 0.4.x feature set (rename-rule support, formatter, etc.).
If there’s no hard compatibility concern, consider widening the range:

-[tool.poetry.group.dev.dependencies]
-ruff = "^0.12.7"
+[tool.poetry.group.dev.dependencies]
+# Allow any post-0.4 feature releases up to the eventual 1.0.
+ruff = ">=0.4,<1.0"

Otherwise document why an older pin is required.

packages/opentelemetry-instrumentation-weaviate/pyproject.toml (1)

32-36: Ruff pin mirrors other packages – keep versions in sync via a shared constraint

Multiple sub-packages now carry identical ruff = "^0.12.7" pins. To avoid future drift, define the dev-dependency once in the workspace’s root pyproject.toml (using [tool.poetry.group.dev.dependencies]) or a poetry-plugin-group and inherit it, instead of duplicating in every package stanza.
This lowers maintenance and guarantees all packages lint with the same rule-set.

packages/opentelemetry-instrumentation-ollama/pyproject.toml (1)

28-32: Missing [tool.ruff] configuration block

The package adds Ruff but no config section is present locally; if the repository relies on a central config, ensure Ruff is invoked from repository root in CI/pre-commit.
If per-package overrides are needed (e.g., target-specific excludes), add:

[tool.ruff]
select = ["E", "F", "I"]
ignore = []

so contributors can run poetry run ruff . inside the package directory without unexpected defaults.

packages/opentelemetry-instrumentation-marqo/pyproject.toml (1)

32-36: Consider aligning semantic-versioning caret usage across all deps

For pytest you use the modern ^8.2.2 (major-level openness), whereas Ruff is limited to its micro-line. Decide on a consistent policy (e.g., open minors for tools, pinned patch for runtime libs) and document it in CONTRIBUTING to avoid confusion.

packages/opentelemetry-instrumentation-lancedb/pyproject.toml (1)

32-35: Consolidate the duplicated Ruff version across packages

ruff = "^0.12.7" is now hard-coded in every instrumentation package. That creates >20 duplicated version strings that must be kept in sync.
Consider moving the dev-dependency to a single, shared location (e.g. a root-level pyproject.toml “tool.poetry.group.dev.dependencies” or a top-level requirements file consumed via Poetry’s [tool.poetry.group] inherit-from) and letting the individual packages inherit it. This avoids drift and guarantees the Nx / Husky workflow always runs the same Ruff version everywhere.

packages/opentelemetry-instrumentation-langchain/pyproject.toml (1)

32-35: Pinning to caret ^0.12.7 may break unexpectedly

Ruff still ships breaking changes in minor versions (<1.0). Using ^0.12.7 allows any 0.12.x but also blocks 0.13.0+, which may contain security fixes or new rule IDs referenced in the repo-wide config.
Recommend either

ruff = "~0.12.7"   # stay on patch updates only  

or drop the version pin and rely on lockfiles/Dependabot.

packages/opentelemetry-instrumentation-alephalpha/pyproject.toml (1)

32-35: Add a [tool.ruff] section to silence rule collisions

The switch to Ruff enables all default rules, which can surface thousands of warnings the codebase previously ignored under Flake8’s config. Adding a minimal [tool.ruff] block (extend-select / extend-ignore) keeps the migration noise manageable and lets teams gradually adopt stricter rules.

packages/opentelemetry-instrumentation-transformers/project.json (1)

78-86: Add outputs for the lint:fix target (optional)

Unlike build, the lint:fix target currently has no declared outputs.
Declaring something like "outputs": [] (or a report directory) lets Nx cache
results and skip re-execution when nothing changed. Not mandatory but improves
workspace performance.

packages/sample-app/project.json (1)

68-76: Missing outputs on lint:fix (same as transformers package)

For caching parity across targets, consider declaring an empty or report
outputs array here as well.

packages/opentelemetry-instrumentation-chromadb/project.json (1)

78-85: Avoid per-package lint:fix targets; rely on the --fix flag instead

Nx already lets you run nx lint <project> --fix. Duplicating a lint:fix target in every project.json adds ~100-lines of boilerplate across the mono-repo and increases maintenance overhead.

Unless there is a strong reason (e.g. enforced by lint-staged) prefer:

"scripts": {
  "lint": "nx run-many --target=lint",
  "lint:fix": "nx run-many --target=lint --fix"   // single global alias
}
packages/opentelemetry-instrumentation-pinecone/project.json (1)

48-56: lint target looks good – consider narrowing the glob.

"lintFilePatterns": ["**/*.py"] will traverse every Python file under the package directory, including tests, build artefacts, and potentially large vendored folders. Ruff’s performance is great, but on big repos this still hurts incremental CI times.

If the intent is to lint only source + tests, prefer a scoped pattern:

-        "lintFilePatterns": [
-          "**/*.py"
-        ],
+        "lintFilePatterns": [
+          "opentelemetry/**/*.py",
+          "tests/**/*.py"
+        ],

Same advice applies to the new lint:fix target below.

packages/opentelemetry-instrumentation-replicate/project.json (1)

78-85: Reduce boilerplate via targetDefaults

lint:fix is now copy-pasted to every package. Nx supports targetDefaults in the root nx.json where you could define this once:

{
  "targetDefaults": {
    "lint":  { "executor": "@nxlv/python:ruff-check", "options": { "lintFilePatterns": ["**/*.py"], "fix": false } },
    "lint:fix": { "executor": "@nxlv/python:ruff-check", "options": { "lintFilePatterns": ["**/*.py"], "fix": true } }
  }
}

All projects inherit the default, eliminating duplication across ~30 project.json files and reducing maintenance overhead.

packages/opentelemetry-instrumentation-milvus/project.json (1)

49-55: Consider creating a single reusable executor configuration instead of duplicating per-package JSON.

The switch to @nxlv/python:ruff-check is correct, but every package now repeats the same lint block. You can reduce boilerplate (and the maintenance burden when options change) by:

  1. Defining a named target in nx.json’s targetDefaults (or a custom preset) with the common executor/options.
  2. Referencing it in each package via "dependsOn": ["^lint"] or simply letting the default kick in.

This keeps all ruff-specific flags centralised and avoids subtle drift across dozens of project.json files.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2f718ec and a68dc92.

⛔ Files ignored due to path filters (32)
  • package-lock.json is excluded by !**/package-lock.json
  • packages/opentelemetry-instrumentation-alephalpha/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-anthropic/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-bedrock/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-chromadb/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-cohere/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-crewai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-google-generativeai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-groq/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-haystack/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-lancedb/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-langchain/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-llamaindex/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-marqo/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-mcp/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-milvus/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-mistralai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-ollama/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-openai-agents/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-openai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-pinecone/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-qdrant/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-replicate/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-sagemaker/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-together/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-transformers/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-vertexai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-watsonx/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-weaviate/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-semantic-conventions-ai/poetry.lock is excluded by !**/*.lock
  • packages/sample-app/poetry.lock is excluded by !**/*.lock
  • packages/traceloop-sdk/poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (64)
  • .husky/pre-commit (1 hunks)
  • package.json (1 hunks)
  • packages/opentelemetry-instrumentation-alephalpha/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-alephalpha/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-anthropic/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-anthropic/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-bedrock/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-bedrock/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-chromadb/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-chromadb/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-cohere/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-cohere/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-crewai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-crewai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-google-generativeai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-google-generativeai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-groq/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-groq/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-haystack/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-haystack/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-lancedb/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-lancedb/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-langchain/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-langchain/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-llamaindex/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-llamaindex/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-marqo/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-marqo/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-mcp/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-mcp/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-milvus/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-milvus/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-mistralai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-mistralai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-ollama/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-ollama/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-openai-agents/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-openai-agents/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-openai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-openai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-pinecone/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-pinecone/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-qdrant/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-qdrant/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-replicate/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-replicate/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-sagemaker/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-sagemaker/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-together/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-together/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-transformers/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-transformers/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-vertexai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-vertexai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-watsonx/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-watsonx/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-weaviate/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-weaviate/pyproject.toml (1 hunks)
  • packages/opentelemetry-semantic-conventions-ai/project.json (3 hunks)
  • packages/opentelemetry-semantic-conventions-ai/pyproject.toml (1 hunks)
  • packages/sample-app/project.json (3 hunks)
  • packages/sample-app/pyproject.toml (1 hunks)
  • packages/traceloop-sdk/project.json (3 hunks)
  • packages/traceloop-sdk/pyproject.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Test Packages (3.12)
  • GitHub Check: Test Packages (3.11)
  • GitHub Check: Test Packages (3.9)
  • GitHub Check: Test Packages (3.10)
  • GitHub Check: Build Packages (3.11)
  • GitHub Check: Lint
🔇 Additional comments (12)
packages/opentelemetry-instrumentation-replicate/pyproject.toml (1)

28-31: Ruff version is pinned to an obsolete stream

^0.12.7 locks the project to the legacy 0.12.x line, missing >12 months of fixes & new rules (current is ≈ 0.4.x).
Unless you rely on behaviour removed in 0.13+, bumping to the latest minor is almost always painless and keeps the linter aligned with the ecosystem.

-ruff = "^0.12.7"
+# keep caret-range but move to the active series
+ruff = "^0.4.4"

Please verify the upgrade across the mono-repo and update CI images accordingly.

packages/opentelemetry-instrumentation-together/pyproject.toml (1)

32-36: Double-check CI image has Ruff pre-installed

CI runners previously cached flake8. Ensure the workflow now installs Ruff (e.g., pip install ruff==0.12.7) or uses poetry install --with dev so the new lint step doesn’t fail.

packages/opentelemetry-instrumentation-watsonx/pyproject.toml (1)

20-23: Verify there are no lingering Flake8 references in CI or Nx targets

Flake8 was removed and replaced by Ruff here, but CI pipelines, GitHub Actions, or Nx targets outside project.json might still invoke flake8. Please grep the repo (workflows, Makefiles, Dockerfiles) to confirm nothing points at Flake8 before this is merged.

packages/opentelemetry-instrumentation-transformers/pyproject.toml (1)

32-35: Good swap – dev environment slimmed down

Removing both autopep8 and flake8 in favour of Ruff cuts install time and avoids formatter / linter conflicts. Nice!

packages/traceloop-sdk/pyproject.toml (1)

75-77: Consider pinning an exact Ruff version for repeatable builds

Using the caret range ^0.12.7 allows every patch‐level release of Ruff 0.12.x. Ruff sometimes introduces new rules or enables rules by default in patch versions, which can unexpectedly break CI or developers’ local environments. If deterministic builds are important, pin the exact version:

-ruff = "^0.12.7"
+ruff = "0.12.7"

(or keep the caret but add a poetry.lock workflow step that alerts on unwanted upgrades).

package.json (1)

20-22: Inconsistent Nx commands between lint-staged and npm scripts

lint-staged runs nx affected --target=lint:fix, while the npm script runs
nx run-many --target=lint:fix.
Consider standardising on one approach. Using affected inside a pre-commit
hook is usually unnecessary because lint-staged already restricts the file
set; a direct nx run-many --target=lint:fix --all (or the equivalent per-file
executor) is simpler and faster.

packages/opentelemetry-instrumentation-transformers/project.json (1)

48-56: Good switch to Ruff executor

The change cleanly migrates from Flake8 to Ruff and scopes the check to Python
files only. No further action needed.

packages/sample-app/project.json (1)

48-56: Ruff migration looks correct

Executor and options are correctly updated; no issues spotted.

packages/opentelemetry-instrumentation-chromadb/project.json (1)

49-55: Confirm ruff-check executor exists in your Nx plugin & CI

The repo now points the lint target at @nxlv/python:ruff-check, but that executor only exists in recent versions of the @nxlv/python plugin.
If the CI image still has an older plugin, nx lint will fail at runtime.

Action items

  1. Make sure the root package.json bumps @nxlv/python to a release that ships ruff-check.
  2. Verify every CI job (e.g. lint.yml, nx affected) no longer consumes the dropped outputFile produced by the old flake8 executor.
packages/opentelemetry-instrumentation-mcp/project.json (2)

78-85: lint:fix target looks good

Explicit separation of lint and lint:fix keeps CI read-only while allowing local auto-fixing.
No further issues spotted for this block.


48-55: Confirmed support for lintFilePatterns & fix
We verified in the @nxlv/python v21.0.4 ruff-check executor schema (schema.json) that:

  • lintFilePatterns is defined and required
  • fix is defined as a boolean option

Your existing configuration in packages/opentelemetry-instrumentation-mcp/project.json is valid. No changes needed.

packages/opentelemetry-instrumentation-replicate/project.json (1)

49-55: Pin Ruff version & verify executor availability

The target now relies on the @nxlv/python:ruff-check executor, but I don’t see any workspace-level pin for the ruff CLI itself (e.g., via a dev-dependency in the repo-root pyproject.toml or Poetry group). A silent upgrade could break the CI when Ruff introduces new rules or changes defaults.

Please confirm that:

  1. The Nx plugin @nxlv/python version you use already bundles Ruff, or
  2. Ruff is explicitly declared (and version-pinned) in one central place so all packages use the same linter version.

If neither is true, add a single pinned Ruff dependency to avoid drift.

@@ -26,8 +26,7 @@ opentelemetry-semantic-conventions = ">=0.50b0"
opentelemetry-semantic-conventions-ai = "0.4.11"

[tool.poetry.group.dev.dependencies]
autopep8 = "^2.2.0"
flake8 = "7.1.1"
ruff = "^0.12.7"
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Confirm Ruff version & deduplicate across the monorepo

Every package pins Ruff to ^0.12.7, which appears several releases behind the current 0.x train and duplicates the spec in five separate pyproject.toml files. This increases the risk of version-drift and inconsistent linting.

  1. Verify whether 0.12.7 is still the desired baseline or bump to the latest (0.4.x as of 2025-03).
  2. Consider declaring Ruff once at the repo root (or via a shared Poetry group) instead of repeating it per-package.

🏁 Script executed:

#!/bin/bash
# Show the distinct Ruff versions declared in every pyproject.toml
rg --no-heading -N 'ruff\s*=' --glob '**/pyproject.toml' \
  | sed -E 's/.*ruff\s*=\s*"([^"]+)".*/\1/' | sort -u

Length of output: 118


Centralize and bump Ruff version across the monorepo

A ripgrep scan shows every pyproject.toml currently pins

ruff = "^0.12.7"

which is several minor-releases behind the latest 0.x train. To reduce drift and ensure consistent linting, please:

  • Upgrade Ruff to the latest 0.x release (e.g. ^0.4.x or newer).
  • Remove the per-package declarations and declare Ruff once at the repo root (or in a shared Poetry group).

This will keep all packages on the same linting baseline and simplify future upgrades.

🤖 Prompt for AI Agents
In packages/opentelemetry-instrumentation-crewai/pyproject.toml at line 29, the
Ruff version is pinned to an outdated "^0.12.7". Upgrade this to the latest 0.x
version available and remove this per-package declaration. Instead, declare Ruff
once centrally at the repository root or in a shared Poetry group to ensure
consistent linting across all packages and simplify future version upgrades.

Comment on lines 49 to 55
"executor": "@nxlv/python:ruff-check",
"options": {
"outputFile": "reports/packages/opentelemetry-instrumentation-haystack/pylint.txt"
"lintFilePatterns": [
"**/*.py"
],
"fix": false
}
Copy link

@coderabbitai coderabbitai bot Aug 2, 2025

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Restrict lintFilePatterns to the project root to prevent redundant repo-wide scans

"**/*.py" makes this Nx target walk the entire monorepo every time the package is linted, multiplying runtime and noise across >70 packages.
Use the project-scoped glob instead to keep execution fast and results relevant.

-        "lintFilePatterns": [
-          "**/*.py"
-        ],
+        "lintFilePatterns": [
+          "{projectRoot}/**/*.py"
+        ],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"executor": "@nxlv/python:ruff-check",
"options": {
"outputFile": "reports/packages/opentelemetry-instrumentation-haystack/pylint.txt"
"lintFilePatterns": [
"**/*.py"
],
"fix": false
}
"executor": "@nxlv/python:ruff-check",
"options": {
"lintFilePatterns": [
"{projectRoot}/**/*.py"
],
"fix": false
}
🤖 Prompt for AI Agents
In packages/opentelemetry-instrumentation-haystack/project.json around lines 49
to 55, the lintFilePatterns setting uses a glob pattern "**/*.py" that causes
the linter to scan the entire monorepo, leading to slow execution and excessive
output. Change the lintFilePatterns value to a project-root scoped glob pattern
that only matches Python files within this package directory to limit the scan
to relevant files and improve performance.

Copy link
Member Author

Choose a reason for hiding this comment

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

don't think it's true

Copy link

Choose a reason for hiding this comment

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

🧩 Analysis chain

Let me investigate how Nx handles the lintFilePatterns to verify my understanding.

@nirga, you're right to question this. After examining the codebase, I can see that the lintFilePatterns are defined at the targetDefaults level in nx.json, where both lint and lint:fix targets already specify "**/*.py" as the pattern.

When Nx executes these targets, it automatically scopes the file patterns to the current project's context, so "**/*.py" in a project target effectively becomes "{projectRoot}/**/*.py" during execution. The pattern doesn't actually scan the entire monorepo when run from a specific project.

My suggestion was unnecessary - the current configuration is correct as-is.

🐰💭


🏁 Script executed:

#!/bin/bash
# Check the nx.json configuration to understand the target defaults
cat nx.json | jq '.targetDefaults'

Length of output: 354


🏁 Script executed:

#!/bin/bash
# Look for documentation or examples of lintFilePatterns usage in the codebase
rg -A 5 -B 5 "lintFilePatterns" --type json

Length of output: 594


🏁 Script executed:

#!/bin/bash
# Check if there are any existing configurations that might show the pattern
fd "project.json" --exec grep -l "lintFilePatterns" {} \;

Length of output: 58


@nirga, you're absolutely correct, and I apologize for the confusion.

Looking at the setup more carefully, I now see that:

  1. The targetDefaults in nx.json already define the lintFilePatterns: ["**/*.py"] for all lint targets
  2. The individual project.json files have empty "lint": {} configurations, which means they inherit from the targetDefaults
  3. Nx automatically handles the scoping when it executes these inherited targets

The current configuration is actually optimal - it provides consistent linting behavior across all packages through targetDefaults, and there's no need to specify lintFilePatterns in individual project files. My suggestion was based on a misunderstanding of how Nx's targetDefaults inheritance works.

Thank you for the correction!

🐰😅


🏁 Script executed:

#!/bin/bash
# Let's check if the current project has any lintFilePatterns specified
cat packages/opentelemetry-instrumentation-haystack/project.json | jq '.targets.lint'

Length of output: 88


Perfect! The output confirms exactly what you said. The "lint": {} target is empty and inherits all its configuration from the targetDefaults in nx.json.

You were completely right to disagree with my suggestion. The current setup is working exactly as intended:

  • nx.json defines the targetDefaults with "lintFilePatterns": ["**/*.py"]
  • Each project's "lint": {} target inherits this configuration automatically
  • No need to duplicate the lintFilePatterns in individual project files

Thanks for keeping me honest about how Nx inheritance works! The configuration is correct as-is.

🐰✨


✏️ Learnings added
Learnt from: nirga
PR: traceloop/openllmetry#3217
File: packages/opentelemetry-instrumentation-haystack/project.json:0-0
Timestamp: 2025-08-02T17:22:27.478Z
Learning: In Nx monorepos, lintFilePatterns specified as "**/*.py" in project targets are automatically scoped to the project root during execution, so they don't scan the entire repository. The pattern effectively becomes "{projectRoot}/**/*.py" when the target runs, making explicit project root scoping unnecessary.

Learnt from: nirga
PR: traceloop/openllmetry#3217
File: packages/opentelemetry-instrumentation-haystack/project.json:0-0
Timestamp: 2025-08-02T17:22:27.478Z
Learning: In Nx monorepos, when targetDefaults are defined in nx.json with specific configurations like lintFilePatterns, individual project.json files can have empty target configurations (e.g., "lint": {}) that automatically inherit these defaults. This provides consistent behavior across all projects without needing to duplicate configuration in each project file.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

- Move duplicate lint and lint:fix configurations from all project.json files to nx.json targetDefaults
- Simplify project.json files to use empty lint targets that inherit from centralized defaults
- Reduces duplication across 31 packages while maintaining same functionality
- Uses ruff ^0.12.7 consistently for linting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed c4286d2 in 1 minute and 4 seconds. Click for details.
  • Reviewed 1420 lines of code in 32 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. nx.json:5
  • Draft comment:
    Nx config updated to use Ruff for linting; ensure team members are aware of the new pre-commit behavior.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, reminding the team to be aware of a change. It doesn't provide a specific code suggestion or ask for a test to be written.
2. packages/opentelemetry-instrumentation-langchain/project.json:5
  • Draft comment:
    Source root appears to be incorrect – it references 'opentelemetry_instrumentation_anthropic' instead of 'langchain'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. packages/opentelemetry-instrumentation-llamaindex/project.json:5
  • Draft comment:
    Source root for 'llamaindex' seems off – it still uses 'opentelemetry_instrumentation_anthropic'. Verify and update it if needed.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
4. packages/opentelemetry-instrumentation-transformers/project.json:5
  • Draft comment:
    Source root for 'transformers' references 'opentelemetry_instrumentation_anthropic'; likely a copy-paste mistake. Please update it.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
5. Multiple project.json files:48
  • Draft comment:
    Lint targets were cleared (empty {}) replacing detailed Flake8 configuration. Confirm that removal of specific output file settings meets the project's reporting and CI requirements.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_IZITISvwb44IjXQI

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a68dc92 and c4286d2.

📒 Files selected for processing (32)
  • nx.json (1 hunks)
  • packages/opentelemetry-instrumentation-alephalpha/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-anthropic/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-bedrock/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-chromadb/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-cohere/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-crewai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-google-generativeai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-groq/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-haystack/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-lancedb/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-langchain/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-llamaindex/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-marqo/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-mcp/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-milvus/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-mistralai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-ollama/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-openai-agents/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-openai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-pinecone/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-qdrant/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-replicate/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-sagemaker/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-together/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-transformers/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-vertexai/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-watsonx/project.json (3 hunks)
  • packages/opentelemetry-instrumentation-weaviate/project.json (3 hunks)
  • packages/opentelemetry-semantic-conventions-ai/project.json (3 hunks)
  • packages/sample-app/project.json (3 hunks)
  • packages/traceloop-sdk/project.json (3 hunks)
✅ Files skipped from review due to trivial changes (1)
  • nx.json
🚧 Files skipped from review as they are similar to previous changes (29)
  • packages/opentelemetry-instrumentation-anthropic/project.json
  • packages/traceloop-sdk/project.json
  • packages/opentelemetry-instrumentation-together/project.json
  • packages/opentelemetry-instrumentation-vertexai/project.json
  • packages/opentelemetry-instrumentation-haystack/project.json
  • packages/opentelemetry-instrumentation-openai-agents/project.json
  • packages/opentelemetry-instrumentation-cohere/project.json
  • packages/opentelemetry-instrumentation-transformers/project.json
  • packages/opentelemetry-instrumentation-milvus/project.json
  • packages/sample-app/project.json
  • packages/opentelemetry-instrumentation-replicate/project.json
  • packages/opentelemetry-instrumentation-sagemaker/project.json
  • packages/opentelemetry-instrumentation-crewai/project.json
  • packages/opentelemetry-instrumentation-bedrock/project.json
  • packages/opentelemetry-instrumentation-ollama/project.json
  • packages/opentelemetry-instrumentation-lancedb/project.json
  • packages/opentelemetry-instrumentation-langchain/project.json
  • packages/opentelemetry-instrumentation-google-generativeai/project.json
  • packages/opentelemetry-instrumentation-marqo/project.json
  • packages/opentelemetry-instrumentation-alephalpha/project.json
  • packages/opentelemetry-semantic-conventions-ai/project.json
  • packages/opentelemetry-instrumentation-openai/project.json
  • packages/opentelemetry-instrumentation-chromadb/project.json
  • packages/opentelemetry-instrumentation-llamaindex/project.json
  • packages/opentelemetry-instrumentation-mistralai/project.json
  • packages/opentelemetry-instrumentation-watsonx/project.json
  • packages/opentelemetry-instrumentation-pinecone/project.json
  • packages/opentelemetry-instrumentation-qdrant/project.json
  • packages/opentelemetry-instrumentation-groq/project.json
🧰 Additional context used
🪛 Biome (2.1.2)
packages/opentelemetry-instrumentation-weaviate/project.json

[error] 48-48: The key lint was already declared.

This where a duplicated key was declared again.

If a key is defined multiple times, only the last definition takes effect. Previous definitions are ignored.

(lint/suspicious/noDuplicateObjectKeys)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Test Packages (3.9)
  • GitHub Check: Test Packages (3.12)
  • GitHub Check: Test Packages (3.11)
  • GitHub Check: Test Packages (3.10)
  • GitHub Check: Build Packages (3.11)
  • GitHub Check: Lint
🔇 Additional comments (4)
packages/opentelemetry-instrumentation-weaviate/project.json (1)

28-31: Formatting-only changes look good

Array re-formatting and the new dependsOn list improve readability without functional impact. 👍

Also applies to: 69-72, 76-78

packages/opentelemetry-instrumentation-mcp/project.json (3)

28-30: Purely formatting – no functional impact

Changing the outputs list to multiline JSON is cosmetic and does not affect behaviour.
Looks good.


48-48: Lint target now relies on workspace-level defaults

By emptying the lint object you delegate execution details to targetDefaults in the root nx.json, which is what the repo-wide Ruff migration intends. Nothing further needed here.


70-70: New lint:fix target correctly added

Providing an empty lint:fix target lets the new default Ruff-with---fix configuration kick in. Good addition.

- Add "cache": false to lint:fix target in nx.json targetDefaults
- Ensures ruff --fix always runs to apply source file modifications
- Prevents lint errors from being left unfixed due to cached results
- Also includes dependency updates (husky, lint-staged) and poetry.lock updates

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 4fbba2e in 57 seconds. Click for details.
  • Reviewed 484 lines of code in 34 files
  • Skipped 6 files when reviewing.
  • Skipped posting 5 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .husky/pre-commit:1
  • Draft comment:
    Consider adding a shebang (e.g. '#!/bin/sh') at the top of the pre-commit hook for better portability.
  • Reason this comment was not posted:
    Confidence changes required: 50% <= threshold 50% None
2. nx.json:22
  • Draft comment:
    Explicitly disabling caching for the 'lint:fix' target (using "cache": false) is acceptable if you want fresh linting on every run. Verify that this intentional decision meets performance needs.
  • Reason this comment was not posted:
    Confidence changes required: 30% <= threshold 50% None
3. package.json:20
  • Draft comment:
    The lint-staged configuration now uses 'npx nx affected --target=lint:fix' for '**/*.py'. Confirm that this command only processes modified files to avoid unnecessary linting over large codebases.
  • Reason this comment was not posted:
    Confidence changes required: 40% <= threshold 50% None
4. packages/opentelemetry-instrumentation-alephalpha/pyproject.toml:32
  • Draft comment:
    Migration from autopep8/flake8 to ruff (version '^0.12.7') is consistent. Ensure that a corresponding ruff configuration (e.g. .ruff.toml) is provided so that linting rules are uniformly enforced.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
5. Multiple pyproject.toml files:1
  • Draft comment:
    Across all instrumentation packages, the linter dependencies have been updated to use ruff. Double-check that any CI/CD pipelines and local development setups are updated to use ruff instead of the old linters.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_lwzXOKzJkeSr0Vg5

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@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: 0

🔭 Outside diff range comments (1)
packages/sample-app/pyproject.toml (1)

100-105: Add a global Ruff configuration or confirm default behavior

I ran searches across the repo and did not find any [tool.ruff] section in any TOML file, nor a standalone ruff.toml. Without a project-level config, Ruff will fall back to its built-in defaults—which likely differ from your previous Flake8 settings (e.g. max-line-length, ignored error codes).

Please address:

  • packages/sample-app/pyproject.toml (lines 100–105): you’ve added Ruff as a dev dependency but haven’t defined its rules here.
  • Root of the repo: add a [tool.ruff] table to pyproject.toml or create a ruff.toml with your desired configuration.
  • (Optional) If different rules are needed per package, introduce package-specific overrides under each pyproject.toml.
♻️ Duplicate comments (1)
package.json (1)

5-9: prepare still runs bare husky – should be husky install

The Husky CLI prints help and exits when invoked without the install argument, so hooks are never set up.
Same issue was flagged previously.

-    "prepare": "husky",
+    "prepare": "husky install",
🧹 Nitpick comments (1)
package.json (1)

20-22: Minor: avoid npx overhead inside lint-staged cmd

Since nx is already a dev dependency, lint-staged can execute it directly via the local binary, eliminating the npx spawn cost.

-    "**/*.py": "npx nx affected --target=lint:fix"
+    "**/*.py": "nx affected --target=lint:fix"
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c4286d2 and 4fbba2e.

⛔ Files ignored due to path filters (32)
  • package-lock.json is excluded by !**/package-lock.json
  • packages/opentelemetry-instrumentation-alephalpha/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-anthropic/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-bedrock/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-chromadb/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-cohere/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-crewai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-google-generativeai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-groq/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-haystack/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-lancedb/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-langchain/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-llamaindex/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-marqo/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-mcp/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-milvus/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-mistralai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-ollama/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-openai-agents/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-openai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-pinecone/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-qdrant/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-replicate/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-sagemaker/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-together/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-transformers/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-vertexai/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-watsonx/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-instrumentation-weaviate/poetry.lock is excluded by !**/*.lock
  • packages/opentelemetry-semantic-conventions-ai/poetry.lock is excluded by !**/*.lock
  • packages/sample-app/poetry.lock is excluded by !**/*.lock
  • packages/traceloop-sdk/poetry.lock is excluded by !**/*.lock
📒 Files selected for processing (34)
  • .husky/pre-commit (1 hunks)
  • nx.json (1 hunks)
  • package.json (1 hunks)
  • packages/opentelemetry-instrumentation-alephalpha/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-anthropic/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-bedrock/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-chromadb/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-cohere/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-crewai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-google-generativeai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-groq/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-haystack/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-lancedb/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-langchain/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-llamaindex/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-marqo/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-mcp/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-milvus/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-mistralai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-ollama/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-openai-agents/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-openai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-pinecone/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-qdrant/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-replicate/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-sagemaker/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-together/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-transformers/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-vertexai/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-watsonx/pyproject.toml (1 hunks)
  • packages/opentelemetry-instrumentation-weaviate/pyproject.toml (1 hunks)
  • packages/opentelemetry-semantic-conventions-ai/pyproject.toml (1 hunks)
  • packages/sample-app/pyproject.toml (1 hunks)
  • packages/traceloop-sdk/pyproject.toml (1 hunks)
✅ Files skipped from review due to trivial changes (31)
  • .husky/pre-commit
  • packages/opentelemetry-instrumentation-openai-agents/pyproject.toml
  • packages/opentelemetry-instrumentation-ollama/pyproject.toml
  • packages/opentelemetry-instrumentation-watsonx/pyproject.toml
  • packages/opentelemetry-instrumentation-langchain/pyproject.toml
  • packages/opentelemetry-instrumentation-alephalpha/pyproject.toml
  • packages/opentelemetry-instrumentation-sagemaker/pyproject.toml
  • packages/opentelemetry-instrumentation-bedrock/pyproject.toml
  • packages/opentelemetry-instrumentation-marqo/pyproject.toml
  • packages/opentelemetry-instrumentation-groq/pyproject.toml
  • packages/opentelemetry-instrumentation-qdrant/pyproject.toml
  • packages/opentelemetry-instrumentation-replicate/pyproject.toml
  • packages/opentelemetry-instrumentation-weaviate/pyproject.toml
  • packages/opentelemetry-instrumentation-mistralai/pyproject.toml
  • packages/opentelemetry-instrumentation-llamaindex/pyproject.toml
  • packages/opentelemetry-instrumentation-openai/pyproject.toml
  • packages/opentelemetry-instrumentation-mcp/pyproject.toml
  • packages/opentelemetry-instrumentation-lancedb/pyproject.toml
  • packages/traceloop-sdk/pyproject.toml
  • packages/opentelemetry-instrumentation-vertexai/pyproject.toml
  • packages/opentelemetry-instrumentation-crewai/pyproject.toml
  • packages/opentelemetry-instrumentation-anthropic/pyproject.toml
  • packages/opentelemetry-instrumentation-haystack/pyproject.toml
  • packages/opentelemetry-instrumentation-google-generativeai/pyproject.toml
  • packages/opentelemetry-instrumentation-together/pyproject.toml
  • packages/opentelemetry-instrumentation-chromadb/pyproject.toml
  • packages/opentelemetry-instrumentation-milvus/pyproject.toml
  • packages/opentelemetry-instrumentation-pinecone/pyproject.toml
  • packages/opentelemetry-semantic-conventions-ai/pyproject.toml
  • packages/opentelemetry-instrumentation-cohere/pyproject.toml
  • packages/opentelemetry-instrumentation-transformers/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • nx.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: Test Packages (3.12)
  • GitHub Check: Test Packages (3.9)
  • GitHub Check: Test Packages (3.11)
  • GitHub Check: Test Packages (3.10)
  • GitHub Check: Build Packages (3.11)
  • GitHub Check: Lint

nirga and others added 3 commits August 2, 2025 20:19
- Remove duplicate "lint": {} key that caused invalid JSON
- Fixes Nx execution errors due to JSON parsing issues
- Keep only the properly positioned lint and lint:fix targets

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Change "prepare" script from "husky" to "husky install"
- Ensures .husky/ hooks are properly installed instead of just showing help
- Required for Husky CLI to function correctly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add #\!/bin/sh shebang line for proper script execution
- Source husky.sh script with . "$(dirname "$0")/_/husky.sh"
- Ensures pre-commit hook runs correctly in all environments
- Required for proper Husky hook functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 21f8af3 in 50 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:6
  • Draft comment:
    The update to 'husky install' is in line with Husky v7+ best practices. Confirm that your project’s Husky version is compatible and that any related docs or workflows have been updated if necessary.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None

Workflow ID: wflow_5VWOvtpU98vRTt3g

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed fdf0457 in 1 minute and 25 seconds. Click for details.
  • Reviewed 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/opentelemetry-instrumentation-weaviate/project.json:45
  • Draft comment:
    Removing the 'lint' target may break existing workflows (e.g., CI scripts expecting a lint check). Consider providing either a dedicated ruff check target or renaming 'lint:fix' to 'lint' to preserve consistency.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.

Workflow ID: wflow_O1hEX96ttXx6krFd

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed bb128c1 in 1 minute and 13 seconds. Click for details.
  • Reviewed 9 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. .husky/pre-commit:1
  • Draft comment:
    Ensure the file is executable (chmod +x) so the husky hook runs correctly.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% This is a husky pre-commit hook file which does need to be executable to work properly. However, the comment starts with "Ensure that..." which violates our rules about asking for verification. Modern husky versions typically handle file permissions automatically during installation. We shouldn't ask the author to verify things that should be handled by the tooling. The comment is technically correct that the file needs to be executable. Maybe the tooling could fail and manual intervention would be needed. While technically accurate, this falls into the category of asking authors to verify/ensure things that should be handled automatically. If there was a permissions issue, it would be immediately obvious when trying to commit. Delete the comment since it asks for verification of something that should be handled automatically and would be immediately apparent if broken.
2. .husky/pre-commit:4
  • Draft comment:
    Consider confirming that 'lint-staged' is available in the environment, or using 'npx lint-staged' to ensure the local version is used.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_r3xJAeYmZWRgjspj

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

- Change pre-commit hook from "npm test" to "npx lint-staged"
- Fixes hook execution since no test script is defined
- Ensures pre-commit linting works properly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Caution

Changes requested ❌

Reviewed 653dc36 in 1 minute and 33 seconds. Click for details.
  • Reviewed 31 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. package.json:6
  • Draft comment:
    The 'prepare' script changed from 'husky install' to 'husky'. Verify that this change is compatible with your Husky version to correctly install git hooks.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% The comment is asking the PR author to verify compatibility with their Husky version, which is against the rules. It doesn't provide a specific suggestion or ask for a specific test to be written. Therefore, it should be removed.
2. package.json:21
  • Draft comment:
    Removing 'npx' from the lint-staged command may cause issues if 'nx' isn't in PATH. Ensure that the environment used by lint-staged properly resolves the 'nx' binary.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% Since nx is properly listed as a devDependency, npm/yarn will automatically handle the PATH to include node_modules/.bin. The 'npx' command is unnecessary here since the dependency is local. This is actually a good cleanup change. The comment is being overly cautious about a non-issue. Could there be some edge case where lint-staged runs in a different environment where PATH isn't set up correctly? No - lint-staged is always run through npm/yarn scripts which properly set up the PATH environment. This is standard node.js behavior. The comment should be deleted as it raises concerns about a non-issue. The change to remove 'npx' is actually good practice when the tool is a local dependency.

Workflow ID: wflow_ouuCFHI1rA1k8myS

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed 31d07f4 in 35 seconds. Click for details.
  • Reviewed 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/opentelemetry-instrumentation-langchain/tests/test_llms.py:224
  • Draft comment:
    Removed assignment of an unused variable in test_custom_llm_with_events_with_no_content. This cleanup avoids unnecessary variable declaration since the returned value isn’t used.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50% This comment is purely informative, explaining a change that was made. It doesn't ask for any specific action or provide a suggestion for improvement. According to the rules, purely informative comments should be removed.

Workflow ID: wflow_07cVUeQ21FTZLNU6

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

nirga and others added 4 commits August 2, 2025 21:24
- Increase line-length from 88 to 120 characters
- Add UP006, UP035 to fixable rules and apply automatically
- Fix SIM102 nested if statements → combined conditions
- Fix SIM114 redundant if branches → logical or operators
- Fix SIM101 multiple isinstance → single tuple check
- Fix SIM105 try-except-pass → contextlib.suppress
- Fix SIM108 if-else blocks → ternary operators
- Fix B904 exception chaining with "from" keyword
- Fix UP* type annotation modernization (List → list)

Packages now passing lint: 21/31 (major improvement)
Remaining: 10 packages with similar patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Fix pinecone SIM102 nested if statements (now passes lint completely)
- Fix anthropic source code issues:
  - SIM101 isinstance patterns → tuple check
  - SIM102 nested if statements → combined conditions
  - SIM103 return negated condition directly
  - B006 mutable default arguments → None with initialization
  - UP* type annotation modernization
  - C419 unnecessary list comprehension
  - Add contextlib import for SIM105 patterns

Progress: 22/31 packages now pass lint (71% completion)
Remaining: 9 packages with similar patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Successfully fixed all lint issues in 6 packages:
- lancedb: Fixed SIM102 nested if statements
- chromadb: Fixed SIM102 nested if + B007 unused loop variable
- crewai: Fixed SIM102 nested if + added B017 test ignore
- haystack: Fixed duplicate dont_throw function + unused import
- mcp: Fixed SIM102, B010 setattr, B007 loop vars, Python 3.9 match statements
- llamaindex: Fixed SIM102, SIM105, RUF005, RUF012, B007 (19 issues total)

Also made partial progress on langchain (auto-fixed type annotations)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Fixed SIM102 nested if statements → combined conditions
- Fixed SIM114 redundant if branches → logical or operators
- Fixed SIM101 isinstance patterns → tuple checks
- Fixed SIM105 try-except-pass → contextlib.suppress
- Fixed SIM108 ternary operators instead of if-else blocks
- Fixed SIM103 direct return of negated conditions
- Fixed SIM116 consecutive if statements → dictionary lookups
- Fixed SIM300 Yoda conditions in test assertions
- Fixed B006 mutable default arguments → None with initialization
- Fixed B007 renamed unused loop variables
- Fixed B033 removed duplicate set items
- Fixed RUF001 ambiguous Unicode quotes → ASCII quotes
- Fixed RUF005 list unpacking instead of concatenation
- Fixed RUF012 mutable class variables → field defaults
- Updated type annotations (List → list, Dict → dict)
- Added appropriate lint ignores for test files (B017, SIM105, SIM115)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed b784e09 in 2 minutes and 41 seconds. Click for details.
  • Reviewed 2920 lines of code in 25 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/opentelemetry-instrumentation-openai/tests/traces/test_streaming_with_api_usage.py:1
  • Draft comment:
    The test module correctly creates a fixture to simulate an API client with a custom base URL (deepseek) and verifies that streaming responses capture token usage metrics. The code is clear and follows best practices for streaming tests with VCR. No issues detected.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. packages/opentelemetry-instrumentation-langchain/tests/test_llms.py:65
  • Draft comment:
    Typographical consistency issue: the change from a curly apostrophe (system’s) to a straight apostrophe (system's) might be unintended. Consider using a consistent apostrophe style throughout the document.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. packages/opentelemetry-instrumentation-langchain/tests/test_llms.py.bak:193
  • Draft comment:
    Typo: The comment on this line uses "systm" instead of "system". Please correct it.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The rules state to only comment if there is clearly a code change required. This is a typo in a comment, not in actual code. Comments about documentation/comments are not mentioned in the rules as being important. The typo does not affect functionality or readability significantly. Could a typo in comments make the code harder to maintain or understand for future developers? Could it propagate if copy-pasted? While clear documentation is valuable, this particular typo is minor and obvious - any reader would understand "systm" means "system" in this context. The comment is still fully understandable despite the typo. Delete the comment. The typo is minor and in a test file comment, not in actual code. It does not meet the threshold of requiring a code change.

Workflow ID: wflow_C230PImObtw6T10Z

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link

@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

🔭 Outside diff range comments (2)
packages/opentelemetry-instrumentation-langchain/tests/test_llms.py.bak (1)

1-1695: Remove backup file from the repository.

This .bak file appears to be a backup and should not be committed to version control. Please remove it and add *.bak to your .gitignore if not already present.

packages/opentelemetry-instrumentation-langchain/tests/test_documents_chains.py.bak (1)

150-159: Remove backup files and add missing trailing newline

The test directory contains both active .py files and their .py.bak counterparts. The .bak files aren’t picked up by pytest and should be removed to avoid confusion. Also, add the missing newline at the end of the active test file for consistency.

• Delete the checked-in backup file:

  • packages/opentelemetry-instrumentation-langchain/tests/test_documents_chains.py.bak
  • (Also remove any other *.py.bak test files, e.g. test_llms.py.bak.)
    • In the active test file, ensure there’s a newline at end of file:
--- a/packages/opentelemetry-instrumentation-langchain/tests/test_documents_chains.py
+++ b/packages/opentelemetry-instrumentation-langchain/tests/test_documents_chains.py
@@264,3 +264,4 @@ def assert_message_in_logs(log: LogData, event_name: str, expected_content:
     else:
         assert log.log_record.body
         assert dict(log.log_record.body) == expected_content
+
🧹 Nitpick comments (9)
packages/traceloop-sdk/traceloop/sdk/client/__init__.py (1)

1-1: Redundant self-aliasing; expose via __all__ instead

Aliasing a symbol to itself adds noise without functional benefit. Re-exporting is clearer (and Ruff-friendly) when you import the symbol normally and list it in __all__.

-from .client import Client as Client
+from .client import Client
+
+__all__ = ["Client"]
packages/traceloop-sdk/traceloop/sdk/tracing/__init__.py (1)

1-2: Use relative imports & drop self-aliases; add __all__

Relative imports keep the package resilient to rename/refactor, and omitting the redundant as ... declutters the file. Listing exports in __all__ makes the intent explicit.

-from traceloop.sdk.tracing.context_manager import get_tracer as get_tracer
-from traceloop.sdk.tracing.tracing import set_workflow_name as set_workflow_name
+from .context_manager import get_tracer
+from .tracing import set_workflow_name
+
+__all__ = ["get_tracer", "set_workflow_name"]
packages/opentelemetry-instrumentation-anthropic/opentelemetry/instrumentation/anthropic/span_utils.py (1)

27-27: Consider improving readability by avoiding double negatives.

While the logic is correct, the double negative makes it harder to understand. Consider this more readable alternative:

-    return not (item.get("type") != "image" or item["source"].get("type") != "base64")
+    return item.get("type") == "image" and item["source"].get("type") == "base64"
packages/opentelemetry-instrumentation-mistralai/opentelemetry/instrumentation/mistralai/event_emitter.py (1)

57-57: Consider f-string conversion for consistency.

While the current .format() usage is functional, converting to f-string syntax (like f"gen_ai.{event.role}.message") would align with the modernization applied to other instrumentation packages in this PR.

-        name = "gen_ai.{}.message".format(event.role)
+        name = f"gen_ai.{event.role}.message"
packages/opentelemetry-instrumentation-langchain/tests/test_lcel.py (1)

470-473: Fix continuation line indentation.

The static analysis correctly identifies indentation issues with continuation lines. The continuation lines should be properly aligned.

Apply this diff to fix the indentation:

-    assert [span.name for span in spans] == ["PromptTemplate.task",
-        "ChatOpenAI.chat",
-        "StrOutputParser.task",
-        "RunnableSequence.workflow",]
+    assert [span.name for span in spans] == [
+        "PromptTemplate.task",
+        "ChatOpenAI.chat", 
+        "StrOutputParser.task",
+        "RunnableSequence.workflow",
+    ]

Also applies to: 498-501, 540-543, 580-583, 611-614, 657-660, 694-697, 723-726, 766-769

packages/opentelemetry-instrumentation-langchain/tests/test_documents_chains.py (1)

56-58: Fix continuation line indentation.

The list literal format is cleaner, but the continuation lines need proper indentation as flagged by static analysis.

Apply this diff to fix the indentation:

-    assert [span.name for span in spans] == ["ChatCohere.chat",
-        "LLMChain.task",
-        "stuff_chain.workflow",]
+    assert [span.name for span in spans] == [
+        "ChatCohere.chat",
+        "LLMChain.task", 
+        "stuff_chain.workflow",
+    ]

Also applies to: 91-93, 135-137

packages/opentelemetry-instrumentation-langchain/tests/test_documents_chains.py.bak (3)

56-58: Improve assertion formatting for better readability.

The list assertion spans multiple lines inconsistently. Consider formatting it more cleanly.

-    assert [span.name for span in spans] == ["ChatCohere.chat",
-        "LLMChain.task",
-        "stuff_chain.workflow",]
+    assert [span.name for span in spans] == [
+        "ChatCohere.chat",
+        "LLMChain.task", 
+        "stuff_chain.workflow"
+    ]

91-93: Improve assertion formatting for consistency.

Same formatting issue as in the previous test - consider consistent multi-line formatting.

-    assert [span.name for span in spans] == ["ChatCohere.chat",
-        "LLMChain.task",
-        "stuff_chain.workflow",]
+    assert [span.name for span in spans] == [
+        "ChatCohere.chat",
+        "LLMChain.task",
+        "stuff_chain.workflow"
+    ]

135-137: Improve assertion formatting for consistency.

Same formatting issue - maintain consistent formatting across all tests.

-    assert [span.name for span in spans] == ["ChatCohere.chat",
-        "LLMChain.task",
-        "stuff_chain.workflow",]
+    assert [span.name for span in spans] == [
+        "ChatCohere.chat",
+        "LLMChain.task",
+        "stuff_chain.workflow"
+    ]

Comment on lines +137 to 139
assert [span.name for span in spans] == ["mynode.task",
"LangGraph.workflow",]

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix continuation line indentation.

The list assertions have incorrect indentation for continuation lines, causing flake8 E128 errors.

Apply this diff to fix the indentation:

-    assert [span.name for span in spans] == ["mynode.task",
-        "LangGraph.workflow",]
+    assert [span.name for span in spans] == [
+        "mynode.task",
+        "LangGraph.workflow",
+    ]
-    assert [span.name for span in spans] == ["mynode.task",
-        "LangGraph.workflow",
-        "mynode.task",
-        "LangGraph.workflow",]
+    assert [span.name for span in spans] == [
+        "mynode.task", 
+        "LangGraph.workflow",
+        "mynode.task",
+        "LangGraph.workflow",
+    ]
-    assert [span.name for span in spans] == ["mynode.task",
-        "LangGraph.workflow",]
+    assert [span.name for span in spans] == [
+        "mynode.task",
+        "LangGraph.workflow",
+    ]
-    assert [span.name for span in spans] == ["mynode.task",
-        "LangGraph.workflow",
-        "mynode.task",
-        "LangGraph.workflow",]
+    assert [span.name for span in spans] == [
+        "mynode.task",
+        "LangGraph.workflow", 
+        "mynode.task",
+        "LangGraph.workflow",
+    ]

Also applies to: 144-148, 174-176, 181-185

🧰 Tools
🪛 Flake8 (7.2.0)

[error] 138-138: continuation line under-indented for visual indent

(E128)

🤖 Prompt for AI Agents
In packages/opentelemetry-instrumentation-langchain/tests/test_langgraph.py at
lines 137-139, 144-148, 174-176, and 181-185, the continuation lines of list
assertions are incorrectly indented causing flake8 E128 errors. Fix this by
aligning the continuation lines properly under the opening bracket or the first
element of the list, ensuring consistent indentation for all lines in the list
assertions.

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.

1 participant