fix(workflow-core): reuse only completed workflow executions - #2700
Conversation
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. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (13)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. Important Approval pendingCodeRabbit has no unresolved comments, but it could not review the latest commit because the review limit was reached. Follow the review guidance in this comment to continue. 📝 WalkthroughWalkthroughWorkflowRunner는 completed 실행만 재사용합니다. pending 또는 running 실행에는 충돌 Problem을, failed 또는 timed_out 실행에는 실패 Problem을 발생시킵니다. 새 Problem 코드와 공개 API, 테스트, 복구 문서를 추가했습니다. Changes워크플로 실행 재사용
Priority: ⬆️ High — Impact reflects high issue severity. Estimated code review effort: 3 (Moderate) | ~25 minutes Severity of issue fixed: High Merge Risk: ⚪ Minimal · up to Duplicate workflow invocations now reuse only completed results; active executions return a conflict and failed executions retain failure details. The changed behavior and public Problem contracts are covered without an actionable current-head risk. Sequence Diagram(s)sequenceDiagram
participant WorkflowCaller
participant WorkflowRunner
participant ExecutionManager
WorkflowCaller->>WorkflowRunner: 멱등성 키로 execute 요청
WorkflowRunner->>ExecutionManager: 기존 실행 상태 조회
ExecutionManager-->>WorkflowRunner: 상태와 결과 또는 실패 정보 반환
alt completed
WorkflowRunner-->>WorkflowCaller: reused 결과 반환
else pending 또는 running
WorkflowRunner-->>WorkflowCaller: workflow-execution-in-progress 발생
else failed 또는 timed_out
WorkflowRunner-->>WorkflowCaller: workflow-execution-failed 발생
else 기타 상태
WorkflowRunner-->>WorkflowCaller: execution/invalid-state-transition 발생
end
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 |
📊 Benchmark Results✅ All benchmarks passed
Updated: 2026-09-08T05:43:31.778Z · Commit: 99e9656 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e54f1a5e2
ℹ️ 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".
Summary
Workflow replays return cached success only when the stored execution is completed. Duplicate pending or running invocations raise a conflict Problem. Failed or timed-out executions raise a non-retryable failure Problem while retaining the original persisted failure and its retryability. Cancelled executions, missing failure records, and foreign retrying records reject explicitly.
Existing matching retry resumption and completed-step reuse remain intact. Both public Problems are covered by API snapshots, generated registries, recovery guidance, API documentation, and patch changesets.
Closes #2660
Validation
Elevated profile for concurrency, idempotency, retry semantics, and public Problem contracts.
Head:
99e9656d4ae8413e2ea080c14346dde590ba0b04. Validation base:98fcaed613d648bde489686c5f1ae622f59070cd.Visual evidence
Generated documentation, stable built preview, 1440 × 1000. All six routes returned HTTP 200 with no console/page errors or horizontal overflow.
/api/problems-core/src/classes/problem/— new workflow Problems in subclass list/api/problems-core/src/variables/croco_problem_code_registry/— terminal workflow failure is not retryable/api/workflow-core/src/classes/workflowexecutionfailedproblem/— new public Problem constructor/api/workflow-core/src/classes/workflowexecutioninprogressproblem/— new public Problem constructor/en/reference/problem-recovery-cookbook/#workflow-core-workflow-execution-failed— failed execution recovery section/en/reference/problem-recovery-cookbook/#workflow-core-workflow-execution-in-progress— in-progress execution recovery sectionCI and integration evidence
Current head is
99e9656d4ae8413e2ea080c14346dde590ba0b04. The normal pre-push test and guarded typecheck hooks passed. CI run 34191519443 passed the requiredvalidate,repository-contracts, anddocs-sync-checkgates. The benchmark gate and companion also passed. All selected CI gates are complete.The sole actionable review thread was fixed, replied to with regression evidence, and resolved. No requested changes or review requests remain. GitHub reports no merge conflict.
Current base advanced to
c2a26539a965065486813fda9462a0bae6d82212. The cumulative changes cover auth tenant claims, customer-health schema indexes, and Meilisearch document keys with separate docs/tests; inspection found no interaction with workflow reuse, execution persistence, the modified Problem contracts, or their generated artifacts. The dry-run companion retains the same issue scope; prior applicable gates are reused. No rebase was performed. GitHub candidatebda5613139d9ac0c4a64b59a3f68c9d6cda9b063has this base and the validated head as parents; its tree differs only by those inspected base changes.All six GitHub-hosted images were verified decoded and visible in the PR at 1440 × 1000. The two changed recovery/registry surfaces explicitly show
not-retryable; four unchanged surfaces reuse byte-identical documentation evidence.Final convergence: all four GitHub-required checks passed on head
99e9656d4ae8413e2ea080c14346dde590ba0b04. Current base is98b1a1792bc422912b18c873c7da9d217654e709; the additional billing webhook/order-store changes have no workflow/execution consumers or changes to the modified Problem contracts. Cumulative base drift remains non-interacting; no rebase or duplicate full validation was needed. No unresolved review threads, requested changes, or merge conflicts remain.The optional coverage-security shadow failed on unbuilt
@croco/ratelimit-coreimports in eight unchanged HTTP suites (393 tests passed); the affected problems-core suite passed119 tests. The optional split-validation-shadow failure aggregates that failure and its skipped dependent coverage warning. Both failures were inspected and are not counted as passing. Requiredvalidatepassed independently, including its blocking checks. These shadow failures do not affect the selected workflow contract or the ordinary merge policy.