Commit c57e81f
committed
fix(workflow): bound cancel/reclaim timeouts to prevent indefinite hangs
- Add RECLAIM_WORKTREE_TIMEOUT_MS (10s) to worktree.remove during reclaim
- Add RECLAIM_ACTOR_TIMEOUT_MS (5s) to actor.cancel during reclaim
- Add FIBER_INTERRUPT_TIMEOUT_MS (5s) to Fiber.interrupt in cancelEntry
These timeouts prevent cancel from hanging indefinitely when:
1. git worktree remove --force blocks on processes using the worktree
2. A child actor is stuck in an uninterruptible operation
3. Fiber.interrupt stalls on a hung LLM fetch
The specific fix addresses the 30s timeout in:
'WorkflowRuntime worktree isolation > cancel removes worktrees of in-flight isolated agents'
Root cause: PR #1709 added Instance.disposeDirectory calls in worktree.remove
which increased the time for cancel cleanup. Combined with git worktree remove
--force potentially blocking, the cancel operation could exceed the test timeout.1 parent b8ce1c6 commit c57e81f
1 file changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
439 | 445 | | |
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
443 | 449 | | |
444 | 450 | | |
445 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
446 | 459 | | |
447 | 460 | | |
448 | 461 | | |
449 | 462 | | |
450 | 463 | | |
451 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
452 | 472 | | |
453 | 473 | | |
454 | 474 | | |
| |||
472 | 492 | | |
473 | 493 | | |
474 | 494 | | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
475 | 498 | | |
476 | 499 | | |
477 | 500 | | |
478 | 501 | | |
479 | 502 | | |
480 | 503 | | |
481 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
482 | 511 | | |
483 | 512 | | |
484 | 513 | | |
| |||
0 commit comments