Commit 1f37e12
committed
🤖 Pass abort controllers through runtime stack
Add abort signal support to all long-running runtime operations to prevent indefinite hangs. Operations with timeouts <10s are excluded per design to avoid noise.
Changes:
- Runtime interface: Add optional abortSignal to readFile/writeFile/stat and workspace operations
- LocalRuntime: Accept and check abort signals in file operations and workspace lifecycle
- SSHRuntime: Pass abort signals through to exec() calls for long-running operations:
- File I/O (300s timeout)
- Git clone operations (300s timeout)
- Init hook execution (3600s timeout)
- Workspace rename/delete (30s timeout)
- Helper functions: Accept and propagate abort signals through readFileString/writeFileString
- Bash tool: Pass abort signal to runtime.writeFile() for overflow files
All abort signals are optional parameters for backward compatibility.
Testing:
- 794 unit tests pass
- 57 integration tests pass (executeBash, runtimeExecuteBash, runtimeFileEditing, createWorkspace, renameWorkspace, removeWorkspace)
- Typecheck and lint clean
# Conflicts:
# src/runtime/LocalRuntime.ts1 parent 9013859 commit 1f37e12
File tree
5 files changed
+113
-45
lines changed- src
- runtime
- services/tools
- utils/runtime
5 files changed
+113
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
220 | 234 | | |
221 | 235 | | |
222 | 236 | | |
| |||
233 | 247 | | |
234 | 248 | | |
235 | 249 | | |
| 250 | + | |
| 251 | + | |
236 | 252 | | |
237 | 253 | | |
238 | 254 | | |
239 | 255 | | |
240 | 256 | | |
241 | | - | |
| 257 | + | |
242 | 258 | | |
243 | 259 | | |
244 | | - | |
245 | | - | |
246 | 260 | | |
247 | 261 | | |
248 | 262 | | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
259 | 266 | | |
260 | 267 | | |
261 | 268 | | |
262 | | - | |
| 269 | + | |
263 | 270 | | |
264 | 271 | | |
265 | 272 | | |
266 | | - | |
| 273 | + | |
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
270 | 285 | | |
271 | 286 | | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
272 | 290 | | |
273 | 291 | | |
274 | 292 | | |
275 | 293 | | |
276 | 294 | | |
277 | 295 | | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
| 296 | + | |
283 | 297 | | |
284 | 298 | | |
285 | 299 | | |
| |||
304 | 318 | | |
305 | 319 | | |
306 | 320 | | |
307 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
308 | 327 | | |
309 | 328 | | |
310 | 329 | | |
| |||
480 | 499 | | |
481 | 500 | | |
482 | 501 | | |
483 | | - | |
| 502 | + | |
| 503 | + | |
484 | 504 | | |
485 | 505 | | |
486 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
487 | 511 | | |
488 | 512 | | |
489 | 513 | | |
| |||
503 | 527 | | |
504 | 528 | | |
505 | 529 | | |
506 | | - | |
| 530 | + | |
| 531 | + | |
507 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
508 | 538 | | |
509 | 539 | | |
510 | 540 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| 122 | + | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
208 | 212 | | |
209 | 213 | | |
210 | 214 | | |
| 215 | + | |
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
214 | | - | |
| 219 | + | |
215 | 220 | | |
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
| 224 | + | |
219 | 225 | | |
220 | 226 | | |
221 | 227 | | |
222 | | - | |
| 228 | + | |
223 | 229 | | |
224 | 230 | | |
225 | 231 | | |
226 | 232 | | |
| 233 | + | |
227 | 234 | | |
228 | 235 | | |
229 | 236 | | |
230 | | - | |
| 237 | + | |
231 | 238 | | |
232 | 239 | | |
233 | 240 | | |
| |||
310 | 317 | | |
311 | 318 | | |
312 | 319 | | |
| 320 | + | |
313 | 321 | | |
314 | 322 | | |
315 | 323 | | |
316 | 324 | | |
317 | 325 | | |
318 | | - | |
| 326 | + | |
| 327 | + | |
319 | 328 | | |
320 | 329 | | |
321 | 330 | | |
| |||
333 | 342 | | |
334 | 343 | | |
335 | 344 | | |
| 345 | + | |
336 | 346 | | |
337 | 347 | | |
338 | 348 | | |
339 | 349 | | |
340 | 350 | | |
341 | | - | |
| 351 | + | |
| 352 | + | |
342 | 353 | | |
343 | 354 | | |
344 | 355 | | |
| |||
0 commit comments