fix(concurrency): resolve impossible-to-succeed TODO and align with TypeScript behavior#72
Closed
fix(concurrency): resolve impossible-to-succeed TODO and align with TypeScript behavior#72
Conversation
- Adds completion reason inference based on the rules outlined in the typescript implementation / spec. fixes: #36
…ypeScript behavior - Remove impossible-to-succeed early termination logic to match TypeScript implementation - Refactor ExecutionCounters with separate should_continue() and is_complete() methods - Add comprehensive documentation explaining TypeScript parity decisions - Update completion logic to properly handle ALL_COMPLETED with failures when all tasks finish - Maintain existing _get_completion_reason logic for correct completion reason inference Resolves TODO at line 416 by implementing TypeScript-compatible completion behavior where operations continue until normal completion criteria are met rather than terminating early on impossible-to-succeed conditions.
yaythomas
requested changes
Oct 21, 2025
| return CompletionReason.MIN_SUCCESSFUL_REACHED | ||
|
|
||
| # Otherwise, assume failure tolerance was exceeded | ||
| return CompletionReason.FAILURE_TOLERANCE_EXCEEDED |
Contributor
There was a problem hiding this comment.
see comment in other PR for this: this logic can be in from_items rather than in this arbitrary function
| items: Iterable[BatchItem[R]], | ||
| completion_config: CompletionConfig | None = None, | ||
| ): | ||
| items = list(items) |
This pull request was closed.
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.
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.