Commit 4e4e050
committed
Fix dreamer key-files lease loss during long LLM call
The key-files post-task phase ran outside the dreamer task wrapper that
provides periodic lease renewal, so when the LLM call took longer than
the 2-minute lease TTL (e.g. 197s on this project's corpus), the
commit-time peekLeaseHolderAndExpiry check failed with "lease lost"
even though no other holder had taken over.
Three consecutive dream runs failed with this exact pattern after
v6 key-files shipped. The fix mirrors the proven setInterval pattern
used by the smart-notes post-task phase at runner.ts:1068.
Wraps the LLM call + commit in a setInterval that calls renewLease
every 60s, cleared in finally.1 parent 925e4aa commit 4e4e050
1 file changed
Lines changed: 39 additions & 22 deletions
Lines changed: 39 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
516 | 529 | | |
517 | | - | |
518 | | - | |
519 | | - | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
520 | 548 | | |
521 | | - | |
522 | | - | |
523 | | - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
524 | 553 | | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
529 | 558 | | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | 559 | | |
0 commit comments