Skip to content

fix: eliminate orphan DEFERRED warning false positives (F3)#573

Merged
Muizzkolapo merged 1 commit into
integration/batch-online-unificationfrom
fix/f3-orphan-warning-timing
May 19, 2026
Merged

fix: eliminate orphan DEFERRED warning false positives (F3)#573
Muizzkolapo merged 1 commit into
integration/batch-online-unificationfrom
fix/f3-orphan-warning-timing

Conversation

@Muizzkolapo
Copy link
Copy Markdown
Owner

Summary

  • Bug: _warn_orphaned_deferred() reported all N records as orphans after batch completion, even when they had terminal dispositions (SUCCESS, FAILED, etc.) — the stale DEFERRED row just hadn't been cleared yet. Observed on product_listing_enrichment: 71 false orphan warnings.
  • Fix: Changed the query from "get all DEFERRED" to "get all dispositions for the action", then filter in Python: only records with DEFERRED and NO terminal sibling (SUCCESS, FAILED, FILTERED, EXHAUSTED, SKIPPED) are genuine orphans.
  • Scope: batch.py:_warn_orphaned_deferred() only — no other files modified.

Verification

  • 6 new regression tests covering: no false positives when terminal sibling exists, genuine orphan detection, mixed scenarios, exception handling, all-orphan scenario
  • 122 batch manager tests pass
  • Full suite: 4992 passed, 2 pre-existing failures (ollama vendor split + JSON trailing comma — both on base branch)
  • ruff format --check + ruff check clean

The _warn_orphaned_deferred() query reported all records with DEFERRED
disposition as orphans, even when those records had already received a
terminal disposition (SUCCESS, FAILED, etc.) — the stale DEFERRED row
just hadn't been cleared yet.

Changed to a two-step approach: first query DEFERRED records (indexed,
fast — returns 0 in the happy path). Only if deferred records exist,
query terminal dispositions to filter out false positives. Genuine
orphans = deferred IDs with no terminal sibling.

Observed: product_listing_enrichment had 71 false orphan warnings that
are now suppressed.
@Muizzkolapo Muizzkolapo force-pushed the fix/f3-orphan-warning-timing branch from 67638e4 to 7db8e37 Compare May 19, 2026 17:30
@Muizzkolapo Muizzkolapo merged commit 292e68f into integration/batch-online-unification May 19, 2026
1 check passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant