chore: simplify dynamic code missing-return recovery - #1652
Conversation
Move missing-return detection, retry code shaping, and log merging into a stateless policy. Inject a non-async retry delegate so request construction and runtime execution remain owned by the use case.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe missing-return retry logic previously embedded inside ChangesMissing-return retry policy extraction
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant ExecuteDynamicCodeUseCase
participant DynamicCodeMissingReturnRetryPolicy
participant RetryDelegate
ExecuteDynamicCodeUseCase->>DynamicCodeMissingReturnRetryPolicy: RetryMissingReturnIfNeeded(result, originalCode)
DynamicCodeMissingReturnRetryPolicy->>DynamicCodeMissingReturnRetryPolicy: LooksLikeMissingReturn / CanRetryMissingReturn
alt eligible for retry
DynamicCodeMissingReturnRetryPolicy->>DynamicCodeMissingReturnRetryPolicy: AppendReturnIfMissing(originalCode)
DynamicCodeMissingReturnRetryPolicy->>RetryDelegate: executeRetryAsync(retryCode)
RetryDelegate-->>DynamicCodeMissingReturnRetryPolicy: retryResult
DynamicCodeMissingReturnRetryPolicy->>DynamicCodeMissingReturnRetryPolicy: MergeLogs(originalLogs, retryLogs)
end
DynamicCodeMissingReturnRetryPolicy-->>ExecuteDynamicCodeUseCase: final ExecutionResult
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Refs: Refactor round 3 ToDo R3-4
Summary
User Impact
Changes
Verification