Skip to content

fix(init): recover run-level stale resume errors#1025

Merged
betegon merged 2 commits into
mainfrom
fix/init-stale-run-recovery
May 26, 2026
Merged

fix(init): recover run-level stale resume errors#1025
betegon merged 2 commits into
mainfrom
fix/init-stale-run-recovery

Conversation

@betegon
Copy link
Copy Markdown
Member

@betegon betegon commented May 26, 2026

Summary

Handles Mastra's run-level "was not suspended" response as stale-resume recovery instead of surfacing the raw 500 to users. The CLI now polls run state briefly, which covers the small window where the resume was processed but D1/runById has not settled yet.

Changes

  • Treat both step-level and run-level not-suspended responses as stale resume cases.
  • Retry run-state recovery with a short backoff before giving up.
  • Add coverage for run-level recovery and transient runById failures.

Test Plan

  • pnpm exec vitest run test/lib/init/wizard-runner.test.ts
  • pnpm exec tsc --noEmit --pretty false
  • git diff --check

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://cli.sentry.dev/_preview/pr-1025/

Built to branch gh-pages at 2026-05-26 10:14 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 26, 2026

Codecov Results 📊

✅ Patch coverage is 84.62%. Project has 4285 uncovered lines.
✅ Project coverage is 81.96%. Comparing base (base) to head (head).

Files with missing lines (1)
File Patch % Lines
src/lib/init/wizard-runner.ts 84.62% ⚠️ 2 Missing and 1 partials
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    81.95%    81.96%    +0.01%
==========================================
  Files          329       329         —
  Lines        23749     23754        +5
  Branches     15502     15504        +2
==========================================
+ Hits         19463     19469        +6
- Misses        4286      4285        -1
- Partials      1643      1643         —

Generated by Codecov Action

@betegon betegon marked this pull request as ready for review May 26, 2026 10:30
@betegon betegon merged commit 176759d into main May 26, 2026
29 checks passed
@betegon betegon deleted the fix/init-stale-run-recovery branch May 26, 2026 10:35
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