Refine batch failure handling#591
Draft
dnagoda wants to merge 1 commit into
Draft
Conversation
This was referenced Jul 6, 2026
Keep --batch-continue-on-error (opt-in; batch stops on the first error by default) but fix the success/failure accounting. Previously every run that returned Ok was counted as a success, even when the function itself returned success: false. Now batch mode tracks processed/successful/failed counts from FunctionRunResult.success, and a function-level failure is treated like an error: it stops the batch by default and is skipped (still recorded) under --batch-continue-on-error. The stderr summary reports processed, successful, and failed counts. Add integration coverage for default stop-on-failure behavior and for --batch-continue-on-error processing every row with accurate counts. Also switch integration tests to assert_cmd::cargo::cargo_bin! instead of the deprecated Command::cargo_bin helper. Verified with: - cargo test batch_ - cargo test Assisted-By: devx/c659e918-9568-4750-b122-e3890447348a
02f146c to
da2da97
Compare
388e7a4 to
3e431cf
Compare
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.
📚 Stack (bottom → top)
--batch-full-outputopt-inWhy
The initial batch mode counted every run that returned
Okas a success — evenwhen the function itself returned
success: false— so batch summaries werewrong.
What
--batch-continue-on-error(opt-in; batch stops on the first error bydefault). No new flag.
FunctionRunResult.success; trackprocessed / successful / failed.
success: false) like an error: it stops thebatch by default, and is recorded-but-skipped under
--batch-continue-on-error.assert_cmd::cargo::cargo_bin!(thenon-deprecated API) in place of
Command::cargo_bin.Testing
cargo test batch_cargo test