Repository navigation
Commit 3fa33cf
authored
improvement(sandbox): return a timed-out workbench run's output and the files it already wrote (#9596)
* improvement(sandbox): return a timed-out workbench run's output and the files it already wrote
A run_code call killed at its own timeout returned an empty stdout and only
"timed out after Nms", so models reran long jobs from scratch. E2B's SDK throws
a stream-less TimeoutError, which dropped the output the stream callbacks had
already observed.
- E2B adapter: a timed-out command returns the stdout/stderr its callbacks observed
- Workbench runs (session sandboxes) that hit their own timeout throw a timeout
abort carrying the output tail (64 KB) and the files already in the call's
output directory; every existing timeout check still accepts it
- The route returns that output in stdout with a 408 and says the workbench and
its files persist, so the next call can rerun only the remaining work
- Output goes through the same session provenance check and secret-name
reporting as any other result; one-shot sandboxes and billing are unchanged
* fix(sandbox): keep a cancellation during the timed-out output listing a cancellation1 parent 5f4ea51 commit 3fa33cf
8 files changed
Lines changed: 375 additions & 20 deletions
File tree
- apps/sim/lib
- execution/remote-sandbox
- function-execution
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
613 | 613 | | |
614 | 614 | | |
615 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
616 | 646 | | |
617 | 647 | | |
618 | 648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
376 | 384 | | |
377 | 385 | | |
378 | 386 | | |
| |||
676 | 684 | | |
677 | 685 | | |
678 | 686 | | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | 687 | | |
686 | 688 | | |
687 | 689 | | |
| |||
727 | 729 | | |
728 | 730 | | |
729 | 731 | | |
730 | | - | |
731 | | - | |
732 | 732 | | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
733 | 736 | | |
734 | | - | |
735 | | - | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
736 | 741 | | |
737 | 742 | | |
738 | 743 | | |
739 | 744 | | |
| 745 | + | |
| 746 | + | |
740 | 747 | | |
741 | 748 | | |
742 | 749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
68 | 73 | | |
69 | 74 | | |
70 | 75 | | |
| |||
258 | 263 | | |
259 | 264 | | |
260 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
261 | 300 | | |
262 | 301 | | |
263 | 302 | | |
| |||
969 | 1008 | | |
970 | 1009 | | |
971 | 1010 | | |
| 1011 | + | |
972 | 1012 | | |
973 | 1013 | | |
974 | 1014 | | |
975 | | - | |
| 1015 | + | |
976 | 1016 | | |
977 | 1017 | | |
978 | 1018 | | |
| |||
984 | 1024 | | |
985 | 1025 | | |
986 | 1026 | | |
987 | | - | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
988 | 1034 | | |
989 | 1035 | | |
990 | 1036 | | |
| |||
1166 | 1212 | | |
1167 | 1213 | | |
1168 | 1214 | | |
| 1215 | + | |
1169 | 1216 | | |
1170 | 1217 | | |
1171 | 1218 | | |
| |||
1177 | 1224 | | |
1178 | 1225 | | |
1179 | 1226 | | |
1180 | | - | |
| 1227 | + | |
1181 | 1228 | | |
1182 | 1229 | | |
1183 | 1230 | | |
| |||
1189 | 1236 | | |
1190 | 1237 | | |
1191 | 1238 | | |
1192 | | - | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1193 | 1246 | | |
1194 | 1247 | | |
1195 | 1248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
0 commit comments