fix(tables): settle a resume whose pause cannot be saved as failed, and never fail a completed run - #8417
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
…nd never fail a completed run A resumed run that paused but whose pause state could not be persisted failed its log yet returned a paused result, so the cell showed paused and the resume entry was marked completed. It now throws after failing the log, so the attempt settles as failed and reports execution_failed. markResumeFailed also rewrote a completed log as failed when a step after a completed run threw. A completed run's outcome now stands, and an already failed log keeps its original end time.
…ater step throws Leaving a completed log alone reported no outcome, so the cell stayed on its last running state. markResumeFailed now reports what the attempt left the execution as, and a run that completed before a later step threw settles the cell as completed. The pause point is still marked failed as before.
aa14823 to
6be9ba0
Compare
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…r step threw A completed run's cell is completed, so its downstream workflow groups still start; the failure is still rethrown. A pause that cannot be saved now throws a stable message with the underlying error on cause, so API callers never see internal persistence details.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 4 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
|
@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
Two gaps in how a failed resume attempt settles, raised on the v0.9.6 release PR (#8410).
persistPauseResultthrew), the log was failed but the paused result was still returned. So the table cell showed paused and the resume entry was marked completed. It now fails the log with the same reason, then throws, so the attempt settles through the shared failure path: slot released, resume entry and pause point failed,execution_failedreported toonAttemptFailed, and queued resumes drained. Every caller ofstartResumeExecutionalready handles a throw.markResumeFailedonly skipped cancelled logs. If a step after a completed run threw (for examplemarkResumeCompletedorprocessQueuedResumes), the log was rewritten fromcompletedtofailed, and the cell was set to error. A completed log now keeps its outcome.markResumeFailedreports what the attempt left the execution as, and a newexecution_completedoutcome settles the cell as completed, which is what the success path would have written. Without that outcome, the cell would stay on its lastrunningprogress state. The pause point and resume entry are still marked failed, as before. An already failed log still reportsexecution_failedbut keeps its original end time.runResumeExecutionawaits the log's finalization before returning or throwing, so the status read here reflects this attempt's run.Type of Change
Testing
markResumeFailed: a completed log reportsexecution_completedwithout rewriting the log; a failed log reportsexecution_failedwithout rewriting it; a running log is failed as before; cancelled and cancelling report nothing.execution_completed.startResumeExecution: a failed pause persistence and a missing snapshot seed both reject and reportexecution_failed.apps/simsuite pass.Checklist