Repository navigation
feat(core): align grouped business-error recovery - #100
Conversation
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Task recovery selection lib/src/core/task.dart, test/core/task_test.dart, test/core/task_mask_test.dart, test/core/fiber_failure_routing_test.dart |
TaskOperations.recover selects the first business failure in an eligible cause, including a nullable error. Defects and causes without business failures bypass the handler. Tests cover replacement failures, cleanup, cancellation, and failure reporting. |
Flow recovery lifecycle lib/src/core/flow.dart, test/core/flow_test.dart |
FlowOperations.recover finishes the failed source before opening its replacement. Tests cover preserving prior values and cause order, and skipping recovery when cleanup adds a defect. |
Retry selection and scheduling lib/src/core/task.dart, lib/src/core/flow_timing.dart, test/core/task_timing_test.dart, test/core/flow_retry_test.dart |
Task and Flow retry use the selected business error for retry predicates. Defects and pure cancellation bypass retry. Tests cover predicate rejection, retries, and exhaustion. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant FlowOperations
participant CurrentFlow
participant TaskOperations
participant ReplacementFlow
FlowOperations->>CurrentFlow: finish failed pull with its exit
FlowOperations->>TaskOperations: recover selected business failure
TaskOperations->>ReplacementFlow: open replacement
Possibly related issues
odroe/any#28: The PR updates ordinary Flow recovery and retry to use the grouped business-failure selection rule.odroe/any#16: The PR updates Task and Flow retry predicates to receive the selected business error.
Merge Risk: 
Minimal · up to 00b8d
-
No specific issue remains that needs resolution before merging.
Pre-merge checks: 
4
-
Full details: Linked Issues check
-
Explanation
Issue
#14is directly linked and remains open. The Task change selects the first business failure from a defect-free grouped cause, including nullable errors and recorded cancellation. It bypasses defects and pure cancellation. The Flow and Flow retry changes reuse this rule, finish failed production before recovery, retain delivered values, and preserve replacement boundaries. The added tests cover grouped errors, cleanup defects, cancellation, retry predicates, replacement failures, and one-time fallback behavior. The diff adds no public API.
Full details: Out of Scope Changes check
-
Explanation
The changes stay within issue
#14. Source changes update Task recovery and retry, existing Flow recovery and retry, and related documentation. Tests validate the requested behavior. No implementation for separate Flow whole-cause operations in#28or competing-task winner selection in#38appears in the reviewed changes.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
@codex review Please review the current head, |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00b8de94d5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Adding concurrent failures no longer disables an existing business-error fallback. Task and Flow recovery and retry now select the first business error when the complete cause contains no defect, including nullable errors and recorded cancellation. The fallback handles the whole eligible cause; active owner cancellation still follows the existing mask protocol.
Flow retires failed production through
onExitbefore applying the same recovery rule. Cleanup defects preserve the complete original group, delivered values remain available, and replacement failures bypass the original handler. Selective timeout and configuration-default handlers preserve unmatched causes and their failure occurrences instead of treating the first business error as the whole failure. No new public APIs or compatibility paths are introduced.Related issues
Closes #14
Validation
dart pub getdart format --output=none --set-exit-if-changed .dart analyze --fatal-infosdart test— 1,365 tests passedCoverage includes grouped and nullable errors, recorded versus active cancellation, mask restoration, complete cleanup causes, one-time fallback reports, independent failure occurrences, Flow retry and replacement boundaries, non-timeout groups, and configuration groups containing non-missing causes.