Skip to content

Implement retry limits to prevent ingestion pipeline blockage#161

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/limit-message-retry-attempts
Draft

Implement retry limits to prevent ingestion pipeline blockage#161
Copilot wants to merge 3 commits intomainfrom
copilot/limit-message-retry-attempts

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

Sequential ingestion gets stuck indefinitely on a single bad message, blocking all subsequent sources from processing.

Changes

Schema

  • Added retryCount?: number to InternalMessageSchema to track failed ingestion attempts

Ingestion logic (from-sources.ts)

  • MAX_RETRY_ATTEMPTS = 3 - sources exceeding this limit are skipped
  • getAlreadyIngestedSet() now returns { alreadyIngestedIds, maxRetriesReachedIds } for filtering
  • incrementRetryCount() updates Firestore on actual failures (excludes boundary/filter outcomes)
  • Added maxRetriesReached to summary logging

Example flow

// Attempt 1: FAIL → retryCount = 1
// Attempt 2: FAIL → retryCount = 2  
// Attempt 3: FAIL → retryCount = 3
// Next run: SKIPPED (logged as warning)

Configuration

  • Removed shared/ from lint-staged (schema-only package, no eslint config needed)
Original prompt

This section details on the original issue you should resolve

<issue_title>Ingestion is sequential which means it is blockable</issue_title>
<issue_description>Since the ingestion process is sequential, if a message fails to ingest and fails the process the next time the process runs it will attempt to process the same message. This means that the process may go completely stuck because of one wrong/bad message,

We should only retry one message a limited number of times.

We could try and see what we have stored in the process field to determine how many times a message has been attempted. If such info is not available in plain in process we could define a separate field where we store that.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
oborishte-map Skipped Skipped Feb 12, 2026 3:58pm

Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
Co-authored-by: vbuch <5102057+vbuch@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix blockable ingestion by limiting message retry attempts Implement retry limits to prevent ingestion pipeline blockage Feb 12, 2026
Copilot AI requested a review from vbuch February 12, 2026 16:02
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.

Ingestion is sequential which means it is blockable

2 participants