Skip to content

refactor(pipeline): split ingest_batch.py into package (#781) - #794

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

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

Conversation

@Sinity

@Sinity Sinity commented May 4, 2026

Copy link
Copy Markdown
Owner

Extract 1326-line ingest_batch.py into ingest_batch/ package. All private helpers re-exported for test compatibility.

Extract 1326-line ingest_batch.py into ingest_batch/ package with
_core.py containing the main logic and __init__.py re-exporting
process_ingest_batch and refresh_session_insights_bulk for backward
compatibility. Future splits (models, topo_sort, worker_pool) can
follow incrementally.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
Copilot AI review requested due to automatic review settings May 4, 2026 02:24
@Sinity
Sinity merged commit b446236 into master May 4, 2026
@Sinity
Sinity deleted the feature/refactor/split-ingest-batch branch May 4, 2026 02:24
@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 34 minutes and 22 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: ce46ab6c-4b5b-4bc2-b02a-8a4c3daf8129

📥 Commits

Reviewing files that changed from the base of the PR and between ba1b0e1 and b8e388c.

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

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 34 minutes and 22 seconds.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b8e388ccc7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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 pipeline ingest-batch orchestration by extracting the former monolithic ingest_batch.py into a dedicated ingest_batch/ package while keeping the public API surface focused on batch ingest + bulk session insight refresh.

Changes:

  • Introduces polylogue.pipeline.services.ingest_batch._core containing the ingest batch implementation (process pool decode/parse + sync sqlite writes + side effects).
  • Adds polylogue.pipeline.services.ingest_batch.__init__ to re-export selected internals for test compatibility and to expose the public API.
  • Updates topology projection/status docs to reflect the new package/module layout.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

File Description
polylogue/pipeline/services/ingest_batch/_core.py New core implementation module for batch ingest + DB writes + observations/side effects.
polylogue/pipeline/services/ingest_batch/init.py Package entrypoint re-exporting internals + public API.
docs/topology-status.md Regenerated topology status counts after the file move/split.
docs/plans/topology-target.yaml Updates topology projection entries to point at the new package files.

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

Comment on lines +8 to +12
from polylogue.pipeline.services.ingest_batch._core import (
_build_batch_memory_observation,
_ConversationEntry,
_drain_ready_conversation_entries,
_failed_raw_state_update,
loc: 1295
target: polylogue/pipeline/services/ingest_batch.py
- path: polylogue/pipeline/services/ingest_batch/__init__.py
loc: 1
@Sinity

Sinity commented Oct 1, 2026

Copy link
Copy Markdown
Owner Author

Historical Codex triage: evidence checked at 5ebcfe5. This records that source revision; it does not claim a fresh review of current master.

  • 68.F072 / P1: refuted at the checked revision: AGENTS.md:103-105 makes compatibility and legacy shapes removal targets, not required module interfaces. The two ingest functions still intentionally exported are imported at polylogue/pipeline/services/ingest_batch/init.py:30-31; restoring incidental module attributes such as os solely for legacy patch sites is not required.

Only the rows listed above are dispositioned. Held findings remain open.

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