fix(execution): publish a pause only after its run log is finalized - #8446
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…ad of publishing it
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
executeWorkflowCorefinalizes the run log (running→redacting→pending) in a background post-execution promise, and callers published the pause right after, so a pause could be resumable while its log was stillrunningclaimResumeExecutionLogaccepts onlypending/paused) with a non-retryableResumeAdmissionError: Execution can no longer be resumed; a timed-wait auto-resume that lost the race was parked asintervention_requiredwith no retryhandlePostExecutionPauseStatenow awaitswaitForPostExecution()before publishing a pause. It is the single path every initial-run entry point takes (sync/SSE execute routes, v2 execute service,executeWorkflow, background workflow/schedule/webhook), and matches the resume path, which already settles its log before persisting a re-pausemarkAsFailedinstead of publishing a pause no resume could claimType of Change
Testing
pause-persistence.integration.ts(2 cases):pendingand an immediate resume is admitted[false]at publish; log leftrunning). Each guard reverted on its own turns its case red; green with the fixbun run type-check,bun run lint, block-registry check,bun run check:audits,docs-manifest:checkChecklist
test-auditauthoring gate)