Skip to content

LCORE- Fix accidental namspace package#2219

Merged
tisnik merged 1 commit into
lightspeed-core:mainfrom
samdoran:correct-namespace-package
Jul 23, 2026
Merged

LCORE- Fix accidental namspace package#2219
tisnik merged 1 commit into
lightspeed-core:mainfrom
samdoran:correct-namespace-package

Conversation

@samdoran

@samdoran samdoran commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Description

src/utils/agents was missing an __init__.py, making it a namepsace package. A side effect of this was it was being skipped by pylint.

Change the namespace package to a package and address pylint failures.

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: crush using opus-4.6

Related Tickets & Documents

Found when doing work on #2167.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

To duplicate the failure:

  1. Checkout main
  2. Run pylint src. Errors will be reported.
  3. Run pylint src tests. No errors will be reported.

With the changes in this PR, running pylint src tests correctly inspects modules in the utils.agents package.

Summary by CodeRabbit

  • Refactor
    • Improved internal code quality and consistency in agent processing and streaming components.
    • Enhanced handling and logging of unrecognized tool events without changing user-facing behavior.
  • Documentation
    • Added documentation for agent helper utilities.

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@samdoran, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: c15a6132-a47c-4538-b917-9481321db1c5

📥 Commits

Reviewing files that changed from the base of the PR and between e31caa1 and 04bcd29.

📒 Files selected for processing (3)
  • src/utils/agents/__init__.py
  • src/utils/agents/streaming.py
  • src/utils/agents/tool_processor.py

Walkthrough

Agent helper modules gain package documentation, pylint directives, implicit None handling for unmapped events, and parameterized warnings for unknown native tools.

Changes

Agent helper cleanup

Layer / File(s) Summary
Module and dispatch cleanup
src/utils/agents/__init__.py, src/utils/agents/streaming.py
Adds an agents package docstring, disables selected pylint checks, and removes the explicit None return from the default stream event handler.
Parameterized tool warnings
src/utils/agents/tool_processor.py
Updates unknown native tool warnings to use parameterized logging in both processing paths.

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

Suggested reviewers: asimurka

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Performance And Algorithmic Complexity ✅ Passed PASS: The PR only adds a package init, a pylint comment, and logging/return-style tweaks; no new loops, N+1s, caches, or unbounded data structures were introduced.
Security And Secret Handling ✅ Passed PASS: Diff only adds a package docstring, pylint suppressions, implicit None return, and parameterized warnings; no secrets, auth, injection, or sensitive-data exposure found.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: converting utils.agents from an accidental namespace package to a regular package.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@samdoran
samdoran force-pushed the correct-namespace-package branch from e31caa1 to 73847ea Compare July 22, 2026 19:22
src/utils/agents was missing an __init__.py, making it a namepsace package. A
side effect of this was it was being skipped by pylint.

Change the namespace package to a package and address pylint failures.
@samdoran
samdoran force-pushed the correct-namespace-package branch from 73847ea to 04bcd29 Compare July 22, 2026 19:30
@samdoran

Copy link
Copy Markdown
Contributor Author

The E2E test failures are due to an outage affecting Quay.

@tisnik tisnik left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@tisnik
tisnik merged commit cefc3cc into lightspeed-core:main Jul 23, 2026
24 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants