Commit 176759d
authored
fix(init): recover run-level stale resume errors (#1025)
## 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`1 parent 1bec084 commit 176759d
4 files changed
Lines changed: 74 additions & 29 deletions
File tree
- src/lib/init
- tools
- test/lib
- init
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
| 440 | + | |
| 441 | + | |
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
| |||
454 | 456 | | |
455 | 457 | | |
456 | 458 | | |
457 | | - | |
| 459 | + | |
458 | 460 | | |
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| 464 | + | |
| 465 | + | |
462 | 466 | | |
463 | 467 | | |
464 | 468 | | |
| |||
473 | 477 | | |
474 | 478 | | |
475 | 479 | | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
496 | 510 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | 511 | | |
| 512 | + | |
501 | 513 | | |
502 | 514 | | |
503 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
976 | 976 | | |
977 | 977 | | |
978 | 978 | | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
979 | 986 | | |
980 | 987 | | |
981 | 988 | | |
| |||
1005 | 1012 | | |
1006 | 1013 | | |
1007 | 1014 | | |
1008 | | - | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
1009 | 1039 | | |
1010 | 1040 | | |
1011 | 1041 | | |
1012 | 1042 | | |
1013 | 1043 | | |
1014 | | - | |
| 1044 | + | |
| 1045 | + | |
1015 | 1046 | | |
1016 | 1047 | | |
1017 | 1048 | | |
| |||
1022 | 1053 | | |
1023 | 1054 | | |
1024 | 1055 | | |
1025 | | - | |
| 1056 | + | |
1026 | 1057 | | |
1027 | | - | |
| 1058 | + | |
1028 | 1059 | | |
1029 | 1060 | | |
1030 | 1061 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
0 commit comments