Repository navigation
fix(enrichment): advance cursor past excluded rows and refill pull claims (#23558) - #23569
Open
huynhnhatquandongnai-source wants to merge 1 commit into
Conversation
…aims (BasedHardware#23558) ## Summary Fix bounded-discovery starvation in Firestore enrichment outbox pull claims (refs BasedHardware#23558). - In `backend/utils/enrichment/outbox.py`: update `due_rows` to page using an explicit Firestore cursor (`start_after`) so that full pages of live-leased or dormant rows do not hide subsequent runnable rows. Remove the silent clamp to 100 so explicit backlog budgets (e.g. 125) are honored. - In `backend/database/outbox_firestore.py`: update `FirestoreEnrichmentOutbox.claim` to refill candidate rows when earlier candidates retire via privacy-fencing, guaranteeing that actionable claim budgets are fulfilled up to `n`. - Add hermetic unit regression tests in `backend/tests/unit/test_enrichment_outbox_paging.py` validating all three parity invariants. ## Product invariants affected - KB PL-002: 101 earlier live-leased rows cannot hide the next runnable row from one pull claim. - KB PL-002: 101 earlier privacy-fenced rows retire without consuming the actionable claim budget. - KB PL-003: An explicit claim budget of 125 returns all 125 eligible due rows without silent cap at 100. Failure-Class: FC-bounded-discovery-pinned-by-blocked-page
Member
|
Verdict: the fix is correct and well scoped — no blocking issues found; two small follow-ups below. Verified against #23558 (maintainer-filed parity report):
Follow-ups (non-blocking):
USER IMPACT: none directly — internal reliability fix; users would at most notice enrichment/summaries no longer lagging behind a backlog of leased or privacy-retired rows. Leaving for human maintainer review: this is a data-pipeline surface from a first-time contributor and emulator qualification is still open, so maintainer sign-off before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
aryanorastar
requested changes
Oct 30, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix bounded-discovery starvation in Firestore enrichment outbox pull claims (closes #23558).
.
Product invariants affected
Validation
Failure-Class: FC-bounded-discovery-pinned-by-blocked-page