Skip to content

fix(notification_router): handle partial failures in batch_load_and_notify#77

Closed
bodymindarts wants to merge 1 commit intomainfrom
task/job-drain-batch-019d45bb
Closed

fix(notification_router): handle partial failures in batch_load_and_notify#77
bodymindarts wants to merge 1 commit intomainfrom
task/job-drain-batch-019d45bb

Conversation

@bodymindarts
Copy link
Copy Markdown
Member

@bodymindarts bodymindarts commented Mar 31, 2026

Summary

  • When repo.find_all() fails for an entire batch, fall back to individual find_by_id() calls so a failure for one job does not block notifications for the rest
  • Each individual failure is logged with a warning but processing continues for the remaining jobs
  • Successful jobs still get their waiters notified immediately

Addresses Bugbot observation 2 from #76.

Test plan

  • Existing integration tests pass (happy path unchanged — find_all still used as fast path)
  • If find_all encounters a transient DB error, individual loads proceed and unrelated waiters are notified

🤖 Generated with Claude Code


Note

Medium Risk
Changes notification delivery behavior in the terminal-state path; a find_all failure now triggers N individual DB reads, which could affect load/latency and retry semantics under DB errors.

Overview
Ensures terminal job notifications aren’t blocked when the batched repo.find_all() call fails in batch_load_and_notify.

On batch failure, it now logs the fallback and attempts load_and_notify per job ID, allowing unaffected jobs’ waiters to be notified immediately instead of waiting for the next sweep.

Written by Cursor Bugbot for commit a7f9288. This will update automatically on new commits. Configure here.

…otify

When repo.find_all() fails for the entire batch, all waiters in that
batch are stalled even for jobs unrelated to the failure. Fall back to
individual find_by_id() calls so a failure for one job does not block
notifications for the rest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bodymindarts
Copy link
Copy Markdown
Member Author

Closing per review — the find_all fallback adds unnecessary complexity for a case that shouldn't happen in practice.

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