Skip to content

fix(generate): preserve outputs when chunked generation fails - #588

Merged
SunnyHaze merged 1 commit into
OpenDCAI:mainfrom
JustinBinber:codex/fix-chunked-generation-failures
Nov 16, 2026
Merged

SunnyHaze merged 1 commit into
OpenDCAI:mainfrom
JustinBinber:codex/fix-chunked-generation-failures

Conversation

@JustinBinber

Copy link
Copy Markdown
Contributor

Fixes #587.

ChunkedPromptedGenerator currently turns serving failures into empty successful output, overwriting previous results and publishing metadata. Propagate the original failure and validate the full response batch's container, count and string contents before opening any destination.

Keep successful chunk order, output paths, prompts, schema and separator behavior. Assign output metadata by row position so duplicate DataFrame index labels do not overwrite each other's paths, and skip serving for a zero-row batch. Filesystem/storage errors still propagate; this does not make independent file writes transactional.

Validation: 19 offline tests passed (14 new regressions plus five existing output-path tests), using the real public operator/FileStorage and an offline serving double. The new suite fails on unmodified main: 8 failed, 6 passed. Coverage includes preserving previous outputs/cache on failure, late malformed responses, multi-row chunk alignment, list/tuple compatibility, custom/duplicate indices, options forwarding and empty input. New-test Black/isort checks and git diff --check pass.

@SunnyHaze

Copy link
Copy Markdown
Collaborator

Looks good to me. Thanks.

@SunnyHaze
SunnyHaze merged commit 13d5de8 into OpenDCAI:main Nov 16, 2026
6 checks passed
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.

ChunkedPromptedGenerator overwrites previous output after generation failure

2 participants