Skip to content

fix(workflows): resolve finished resume runs on the run status endpoint - #7894

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/resume-run-status-lookup
Sep 16, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/resume-run-status-lookup

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A resume returns a new run ID and a statusUrl pointing at it, but the resume logs under the parent run's execution ID. The status read only matched that ID through a pending/claimed resume queue entry, so once the resume settled, GET /api/v2/workflows/{id}/runs/{runId} (and the v1 executions route) returned 404 forever
  • readWorkflowExecutionStatus now looks up the resume entry at any status; when it has settled and there is no log row of its own, it reads the parent run and projects it under the resume's run ID
  • The attempt keeps its own timings (claimedAt/queuedAtcompletedAt); a completed attempt reports the run's state (completed, failed, or paused again with the next pause context), with no end time if a later resume is still running the run
  • A failed attempt reports failed with the run's own error when the run failed, otherwise the entry's failureReason; it reports cancelled when the run was cancelled, and never exposes outputs or pause coordinates
  • Viewer log projection still applies on top, as before
  • Known limits, unchanged here: run files and resuming again are still keyed to the parent run ID, so files is empty and /resume on a resume run ID doesn't work

Type of Change

  • Bug fix

Testing

  • Added unit tests for completed, paused-again, still-running, failed, run-failed, cancelled, and missing-parent resume attempts; confirmed they fail without the fix
  • vitest on execution-status, read-workflow-run, workflow-runs, the v1 executions route, and v2 workflow routes (307 passing)
  • bun run type-check, bun run lint, bun run check:audits, docs-manifest:check passing

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Sep 16, 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 Sep 16, 2026 10:26pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

The PR appears safe to merge; no actionable introduced defects were identified.

Summary

Fixes status reads for settled resume IDs that have no execution log of their own by resolving their parent run.

  • Looks up resume entries across all statuses while preserving active-attempt handling.
  • Projects settled attempts under their own IDs and timings, with explicit failure and cancellation handling.
  • Preserves parent-ID output materialization and viewer-level field projection.
  • Adds regression tests for completed, paused-again, running, failed, cancelled, and missing-parent outcomes.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Read execution status] --> B[Look up log and resume attempt]
  B --> C{Existing log or active attempt?}
  C -->|Yes| D[Existing status resolution]
  C -->|No| E{Settled resume attempt?}
  E -->|No| F[Not found]
  E -->|Yes| G[Read parent run status]
  G --> H[Project resume ID and attempt timings]
  H --> I[Apply failure or cancellation overrides]
  D --> J[Apply viewer field projection]
  I --> J
Loading

Reviews (1) · Last reviewed commit: "fix(workflows): resolve finished resume ..."

@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 2 files

Confidence score: 5/5

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

Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 2243890 into staging Sep 16, 2026
33 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/resume-run-status-lookup branch September 16, 2026 22:35

This branch was previously deployed

1 inactive deployment
Preview b078d0d1 Deployed Sep 16, 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