Commit 8d17949
authored
refactor(sandbox): normalize Daytona recovery errors (#184)
## Why
Daytona currently reports an unhealthy sandbox host with a structured
HTTP 503 body but no provider error code. The sandbox lifecycle should
not depend on provider message text.
## What changed
- validate the Daytona error projection at the adapter boundary
- normalize the specific host-recovery response to an internal
`daytona_host_recovering` code
- make lifecycle classification depend only on the internal code and
HTTP status
- document the normalized adapter-to-lifecycle contract
This preserves the guarded same-volume runtime replacement behavior
merged in #183 while keeping provider response details isolated to the
Daytona adapter.
## Verification
- `pnpm lint`
- `pnpm typecheck`
- `pnpm turbo build --force`
- `pnpm deadcode`
- `pnpm architecture:check`
- `pnpm turbo skills:build`
- captured the live Daytona 503 response shape for the affected sandbox
without exposing credentials
Production behavior will be exercised after merge and exact-SHA
Cloudflare deployment.1 parent 7ca2b51 commit 8d17949
2 files changed
Lines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
78 | | - | |
| 87 | + | |
79 | 88 | | |
80 | 89 | | |
81 | 90 | | |
| |||
655 | 664 | | |
656 | 665 | | |
657 | 666 | | |
| 667 | + | |
658 | 668 | | |
659 | 669 | | |
660 | 670 | | |
661 | 671 | | |
662 | 672 | | |
663 | 673 | | |
664 | 674 | | |
| 675 | + | |
665 | 676 | | |
666 | 677 | | |
667 | 678 | | |
| |||
671 | 682 | | |
672 | 683 | | |
673 | 684 | | |
674 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
675 | 704 | | |
676 | 705 | | |
677 | 706 | | |
| |||
0 commit comments