Skip to content

refactor(pipeline): extract _models.py from ingest_batch _core.py (#781) - #796

Merged
Sinity merged 1 commit into
masterfrom
feature/refactor/split-ingest-batch-v2
May 4, 2026
Merged

Sinity merged 1 commit into
masterfrom
feature/refactor/split-ingest-batch-v2

Conversation

@Sinity

@Sinity Sinity commented May 4, 2026

Copy link
Copy Markdown
Owner

Extract 234 lines of SQL constants, protocols, and dataclasses into _models.py. _core.py: 1326→1123 lines.

Extract 234 lines of SQL constants, protocol classes, and dataclasses
into ingest_batch/_models.py. _core.py reduced from 1326 to 1123 lines.
Private symbols re-exported in __init__.py for test compatibility.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Copilot AI review requested due to automatic review settings May 4, 2026 02:42
@Sinity
Sinity merged commit 1c4e35e into master May 4, 2026
@Sinity
Sinity deleted the feature/refactor/split-ingest-batch-v2 branch May 4, 2026 02:42
@coderabbitai

coderabbitai Bot commented May 4, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Sinity has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 16 minutes and 50 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: e0205c5c-d04e-429f-adaa-d7867132f4bb

📥 Commits

Reviewing files that changed from the base of the PR and between 8a84434 and 423fe95.

📒 Files selected for processing (5)
  • docs/plans/topology-target.yaml
  • docs/topology-status.md
  • polylogue/pipeline/services/ingest_batch/__init__.py
  • polylogue/pipeline/services/ingest_batch/_core.py
  • polylogue/pipeline/services/ingest_batch/_models.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/refactor/split-ingest-batch-v2

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
Review rate limit: 0/1 reviews remaining, refill in 16 minutes and 50 seconds.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Refactors the batch ingest service by extracting SQL strings and supporting type/protocol/dataclass definitions out of the large _core.py module into a new _models.py, and updates topology tracking docs accordingly.

Changes:

  • Added polylogue.pipeline.services.ingest_batch._models to host SQL constants + protocol/type/dataclass “models”.
  • Updated _core.py and package __init__.py imports/exports to reference the extracted definitions.
  • Updated topology plan/status docs to reflect the new file and adjusted LOC totals.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
polylogue/pipeline/services/ingest_batch/_models.py New module containing extracted SQL constants and internal typing/dataclass helpers.
polylogue/pipeline/services/ingest_batch/_core.py Removes inlined SQL/types and imports them from _models.
polylogue/pipeline/services/ingest_batch/init.py Re-exports moved internal types from _models for test access.
docs/topology-status.md Regenerated topology status counts after adding the new module.
docs/plans/topology-target.yaml Adds _models.py to the plan and updates _core.py LOC.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +7 to +10
from typing import TYPE_CHECKING, Protocol

from polylogue.pipeline.services.ingest_worker import ConversationData
from polylogue.storage.raw.models import RawConversationStateUpdate
Sinity added a commit that referenced this pull request May 7, 2026
…) (#796)

Extract 234 lines of SQL constants, protocols, and dataclasses into
_models.py. _core.py: 1326→1123 lines.

Co-authored-by: Claude Opus 4.7 <[email protected]>
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