Skip to content

refactor: Phase 1.4 - Remove Old Monolithic Structure#115

Merged
JacobCoffee merged 9 commits intomainfrom
feature/phase1-4-cleanup-monolith
Nov 23, 2025
Merged

refactor: Phase 1.4 - Remove Old Monolithic Structure#115
JacobCoffee merged 9 commits intomainfrom
feature/phase1-4-cleanup-monolith

Conversation

@JacobCoffee
Copy link
Owner

@JacobCoffee JacobCoffee commented Nov 23, 2025

Summary

Completes Phase 1.4 of the microservices migration by removing the old monolithic byte_bot/ directory and cleaning up related configuration.

This PR removes all legacy code that has been successfully migrated to the new microservices architecture:

  • Bot code → services/bot/
  • API code → services/api/
  • Shared code → packages/byte-common/

Changes

Removed

  • byte_bot/ directory (113 files, 15,550 lines)
    • Old bot code (byte_bot/byte/)
    • Old API code (byte_bot/server/)
    • Old CLI (byte_bot/cli.py)
    • Old shared utilities (byte_bot/utils.py)

Updated

  • .gitignore: Removed obsolete byte_bot/ path references

Testing

  • ✅ All 75 tests pass
  • ✅ Coverage maintained at 68%+ for byte-common
  • ✅ No regression in functionality

Migration Progress

Notes

  • The railway.json still references old commands but will be updated in Phase 4 (Production Readiness)
  • Type checking errors in other worktrees are expected and will be resolved when those branches merge the new structure

🤖 Generated with Claude Code

Summary by Sourcery

Remove the deprecated monolithic byte_bot implementation now that its functionality has been migrated to the new microservices structure.

Enhancements:

  • Clean up the repository by deleting the legacy byte_bot/ bot, API, CLI, and shared utility code no longer used in the microservices architecture.
  • Update .gitignore to drop obsolete references to the removed byte_bot/ directory.

All code has been migrated to services:
- Bot code → services/bot/
- API code → services/api/
- Shared code → packages/byte-common/

This completes Phase 1.4 of the microservices migration.
Remove references to the old monolithic byte_bot directory structure
that no longer exists after the microservices migration.
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Nov 23, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR completes Phase 1.4 of the microservices migration by deleting the legacy monolithic byte_bot/ codebase and cleaning up the remaining configuration reference in .gitignore, leaving only the new services- and packages-based structure in use.

File-Level Changes

Change Details Files
Remove the legacy monolithic application code now replaced by microservices.
  • Delete the old bot implementation, including plugins, views, and supporting libraries that have been migrated to services/bot/.
  • Delete the old API/server implementation, including domain modules, web templates/assets, DB layer, and Alembic migrations now handled elsewhere.
  • Delete the legacy shared utilities and CLI entrypoints that have been superseded by code in packages/byte-common/ and new service entrypoints.
byte_bot/__init__.py
byte_bot/__main__.py
byte_bot/__metadata__.py
byte_bot/app.py
byte_bot/byte/**
byte_bot/cli.py
byte_bot/server/**
byte_bot/utils.py
Update repository configuration to stop tracking the removed monolith directory.
  • Remove obsolete ignore patterns that referenced byte_bot/ from .gitignore so the ignore config reflects the new workspace layout.
.gitignore

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

@railway-app
Copy link

railway-app bot commented Nov 23, 2025

🚅 Environment byte-pr-115 in byte has no services deployed.

@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 04:50 Destroyed
Copy link
Contributor

@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 there - I've reviewed your changes - here's some feedback:

  • Now that the entire byte_bot/ tree is removed, it’s worth running a quick repo-wide search for byte_bot to catch any remaining import paths, entry points, or config references that could cause runtime errors.
  • Double-check CI/build scripts (e.g., Makefiles, workflow YAMLs, packaging configs) for any commands that previously invoked byte_bot/cli.py or the old server entry points so they align fully with the new services layout.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Now that the entire byte_bot/ tree is removed, it’s worth running a quick repo-wide search for `byte_bot` to catch any remaining import paths, entry points, or config references that could cause runtime errors.
- Double-check CI/build scripts (e.g., Makefiles, workflow YAMLs, packaging configs) for any commands that previously invoked `byte_bot/cli.py` or the old server entry points so they align fully with the new services layout.

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.

Remove [project] section and scripts that referenced deleted byte_bot/
directory. Convert to pure workspace configuration for microservices.

Changes:
- Remove [project], [project.scripts], and [project.entry-points]
- Update coverage to only track byte-common
- Update pytest to only cover byte-common
- Update ty paths to exclude removed byte_bot/
- Update ruff src paths for new structure
- Remove byte_bot-specific per-file-ignores
@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 04:57 Destroyed
uv was looking for byte_bot_service/ based on project name but the
actual module is byte_bot/. Configure build backend to use src/ as
module root.
@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 04:59 Destroyed
Change name from 'byte-bot-service' to 'byte-bot' to match the actual
module name 'byte_bot' (uv converts hyphens to underscores).
@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 05:01 Destroyed
Replace obsolete byte_bot.utils import with byte_common.utils.strings
@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 05:04 Destroyed
Required for dateutil.zoneinfo import in litestar plugin
@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 05:06 Destroyed
- Update docs/conf.py to not import from deleted byte_bot module
- Update models.rst to reference byte_common.models instead
- Add TODO note for full docs restructuring
@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 05:10 Destroyed
@railway-app railway-app bot temporarily deployed to byte (byte / byte-pr-115) November 23, 2025 05:13 Destroyed
@JacobCoffee JacobCoffee merged commit e29c8ba into main Nov 23, 2025
5 checks passed
@JacobCoffee JacobCoffee deleted the feature/phase1-4-cleanup-monolith branch November 23, 2025 05:18
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