fix(tables): write the cell state when a resumed run throws - #8401
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
runResumeAndCellTerminal only wrote the cell terminal after a resume returned, so a resume that threw left the cell on its last partial running state, where it could not even be cancelled. The resume manager now records, on the error it rethrows, when the attempt kept its pause resumable (admission refused, run buffer unavailable). The resume job mirrors that onto the cell: back to paused when the pause was kept, failed otherwise. A failed cell write is logged without masking the resume error, which is still rethrown.
…from the error An admission refusal can also mean the execution already finished, so treating every refusal as a kept pause wrote paused over a completed cell. markResumeAttemptFailed and markResumeFailed now return what their transaction actually did (pause still resumable / execution failed), the manager records that outcome on the rethrown error, and the resume job writes paused, error, or nothing.
1918976 to
e19a8ab
Compare
|
@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 5 files
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
…sisted vocabulary
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
…of the error The outcome rode on the thrown error through a module WeakMap, so it was lost when draining queued resumes threw after the settle. startResumeExecution now takes onAttemptFailed, called right after the settle transaction; a hook failure is logged and never replaces the attempt's error.
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
Summary
runResumeAndCellTerminalwrote the cell terminal only after a resume returned. A resume that threw left the table cell on its last partialrunningstate — stuck, and not cancellable (the cancel path sees a failed log with a running sidecar and returnsconflict)wasPausedExecutionRetained): true for an admission refusal or an unavailable run buffer, which go throughmarkResumeAttemptFailed; false for every other failure, whichmarkResumeFailedmakes terminalerrorwith the message otherwise — the same shapeworkflow-column-executionwrites when a first run throws. A cancelled cell is protected by the existing cancellation guard inwriteWorkflowGroupStateType of Change
Testing
ResumeAdmissionError) keeps the pause resumable; a failed run does not. Removing the new record from the admission branch turns its test rederror; a kept pause writes paused; a failing cell write still rethrows the original error (red with the write guard removed)Checklist