Skip to content

Conversation

@joaomariolago
Copy link
Collaborator

@joaomariolago joaomariolago commented Jan 22, 2026

API calls can be validated at http://blueos.local:81/v1.0/docs

Summary by Sourcery

Migrate the helper service into the secondary Python virtual environment and align its configuration and dependencies with the updated workspace layout.

Bug Fixes:

  • Prevent potential runtime issues in the helper service by ensuring optional metadata defaults to None.

Enhancements:

  • Upgrade helper service dependencies (FastAPI, Pydantic, requests, uvicorn, BeautifulSoup, loguru, psutil, fastapi-versioning) to newer versions and refresh lockfiles.
  • Adjust workspace and dependency wiring so the helper service is no longer part of the primary core environment and is instead managed under python-venv2.

@sourcery-ai
Copy link

sourcery-ai bot commented Jan 22, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Migrates the helper service from the primary core workspace into the secondary python-venv2 environment and refreshes its dependency stack (FastAPI, Pydantic, etc.), including lockfiles and startup wiring, with one minor model default tweak for compatibility.

Updated class diagram for ServiceInfo model default change

classDiagram
  class ServiceMetadata

  class ServiceInfo {
    +str name
    +List~str~ versions
    +int port
    +Optional~str~ path
    +Optional~ServiceMetadata~ metadata = None
    +int __hash__()
  }

  ServiceInfo --> ServiceMetadata
Loading

File-Level Changes

Change Details Files
Upgrade helper service runtime dependencies to newer library versions.
  • Bump beautifulsoup4, fastapi, fastapi-versioning, loguru, psutil, pydantic, requests, and uvicorn to newer pinned versions in helper's pyproject configuration
  • Keep helper marked as a non-installable package via tool.uv.package=false
core/services/helper/pyproject.toml
Move helper service from the primary core environment into python-venv2 and rewire workspace membership.
  • Remove helper from core/pyproject dependencies and workspace sources
  • Exclude services/helper from the core workspace member glob so it is no longer managed by the primary environment
  • Add helper as a dependency and workspace member in python-venv2/pyproject, alongside commonwealth, versionchooser, and kraken
  • Update python-venv2 workspace members to include ../services/helper so uv resolves it in the secondary venv
  • Regenerate uv.lock files for both core and python-venv2 to reflect the new environment layout and dependency graph
  • Adjust start-blueos-core startup script wiring so helper runs under python-venv2 (details are in the regenerated script/lockfile)
core/pyproject.toml
core/python-venv2/pyproject.toml
core/python-venv2/uv.lock
core/uv.lock
core/start-blueos-core
Improve helper ServiceInfo model definition for compatibility with updated Pydantic.
  • Set a default value of None for the optional metadata field on ServiceInfo to ensure correct optional handling under Pydantic v2 and to avoid missing-field validation issues
core/services/helper/main.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

* Update all libraries to latest
* Move helper to venv2
* Allow ServiceInfo model to receive optional metadata field to avoid
  validation error
@joaomariolago joaomariolago marked this pull request as ready for review January 29, 2026 12:41
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • With the bump to FastAPI 0.125 and Pydantic 2.12, review helper service code for any Pydantic v1-style APIs (e.g., .dict(), .json(), Config classes, arbitrary_types_allowed) and FastAPI behaviors that changed (e.g., response_model handling, jsonable_encoder) to ensure they’re updated to the v2 patterns.
  • Now that metadata on ServiceInfo is explicitly defaulted to None, verify any callers that relied on it being required or always present so they don’t break on None and adjust type hints or runtime checks accordingly.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- With the bump to FastAPI 0.125 and Pydantic 2.12, review helper service code for any Pydantic v1-style APIs (e.g., `.dict()`, `.json()`, `Config` classes, `arbitrary_types_allowed`) and FastAPI behaviors that changed (e.g., response_model handling, `jsonable_encoder`) to ensure they’re updated to the v2 patterns.
- Now that `metadata` on `ServiceInfo` is explicitly defaulted to `None`, verify any callers that relied on it being required or always present so they don’t break on `None` and adjust type hints or runtime checks accordingly.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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