Skip to content

fix(api): report a finished run's real status once its pauses have settled; show the request id in the CLI - #9924

Merged
waleedlatif1 merged 4 commits into
stagingfrom
fix/cli-request-id-and-settled-pause-status
Nov 12, 2026
Merged

waleedlatif1 merged 4 commits into
stagingfrom
fix/cli-request-id-and-settled-pause-status

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Run status after a failed resume. A run whose resume ran and failed was still reported as paused (with error: null) by Get workflow run and in the run list, because any open pause record overrode the finished log. When a resume fails, the run's log is marked failed and the point failed in the same transaction, and admission refuses any point that isn't paused, so nothing can resume it again. The run is now reported as paused only while a point can still be resumed. Once the log has finished and every point has resumed or failed, it reports the finished status, its error, and the failing block, like any other failed run. Seen in production on a run whose time pause resumed and then a later block failed.
  • Runs with a waiting human or time pause still read paused, including partially_resumed runs and finished runs that still have a waiting point. Cancellation's rollback of a failed point happens while the log is still running, so it's unaffected. The workspace paused-runs list and the approval link already required a waiting point.
  • The run list's status column applies the same rule through a shared PAUSE_POINT_ROWS SQL helper (both pause-point storage shapes), which the paused-runs list now also uses.
  • The paused status description is updated to match.
  • CLI request id. The server's requestId (or x-request-id when the body has none) is now shown on CLI errors: in the JSON error object and as a request id: line in human output. Rewritten errors also keep their exit code, which was previously reset to 1.

Test plan

  • Unit: a settled failed run reports failed with its error and failing block (fails with the old rule); runs with a waiting human or time pause still read paused
  • CLI: request id shown in JSON and human output (fails without the fix)
  • execution-status, projection, v2 workflow route and list tests pass; sim-cli type-check clean
  • generate/check: openapi, mcp-operations, cli-api, cli-docs; api-validation:strict, boundaries, comment-hygiene, file-names
  • CI integration: a settled failed run reads failed in the run detail and the run list; a finished run with a waiting point still reads paused

@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 12, 2026 5:15am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Finished runs now report their saved status once all pause points have settled. CLI errors also show the server’s request ID and keep their exit code when rewritten.

  • Run details and lists show a finished status when no pause can resume.
  • CLI errors keep and show the server's request ID.

Reviews (3) · Last reviewed commit: "fix(cli): read an internal route's reque..." · Reviewed by Greptile

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 16 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread packages/sim-cli/src/http/client.ts Resolved
Comment thread apps/docs/openapi-v2-workflows.json Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@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 cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread packages/sim-cli/src/http/client.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

@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 cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 17 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit d87daa7 into staging Nov 12, 2026
83 checks passed

This branch was previously deployed

1 inactive deployment
Preview — 4464cc5c Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant