Skip to content

fix: empty LLM response records no longer vanish from output (F10)#571

Merged
Muizzkolapo merged 2 commits into
integration/batch-online-unificationfrom
fix/f10-empty-success-vanish
May 19, 2026
Merged

fix: empty LLM response records no longer vanish from output (F10)#571
Muizzkolapo merged 2 commits into
integration/batch-online-unificationfrom
fix/f10-empty-success-vanish

Conversation

@Muizzkolapo
Copy link
Copy Markdown
Owner

Summary

  • Bug: When on_empty=warn (the default), an empty LLM response produced ProcessingResult.success() with data=[]. The result collector wrote DISPOSITION_SUCCESS but added zero rows to output — the record silently vanished.
  • Fix: on_empty=warn now returns ProcessingResult.failed() so the record gets DISPOSITION_FAILED and surfaces in error reporting. on_empty=skip now returns ProcessingResult.skipped() with a tombstone record so it appears in output with a skip reason.
  • No changes to on_empty=error behavior (still raises EmptyOutputError).

Verification

  • 4 new regression tests covering warn (explicit + default), skip, and a guard test confirming non-empty responses still succeed
  • Full test suite: 7013 passed, 2 skipped
  • ruff check and ruff format --check clean

When on_empty=warn (the default), an empty LLM response fell through to
_transform_response producing data=[], which result_collector wrote as
DISPOSITION_SUCCESS with zero output records — the record vanished.

Now: on_empty=warn returns ProcessingResult.failed() so the record gets
DISPOSITION_FAILED and is visible in error reporting. on_empty=skip
returns ProcessingResult.skipped() with a tombstone so the record
appears in output with a skip reason.
- Add EMPTY_OUTPUT to record/reasons.py (bare string violated module contract)
- Remove logger.warning for on_empty=warn (RecordEmptyOutputEvent already fires)
- Fix misleading "silently skip" comment — tombstone IS visible in output
@Muizzkolapo Muizzkolapo merged commit 5c380e0 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