2 Commits

Author SHA1 Message Date
LingYi
fb2830537a
fix(agents): avoid executor starvation in file-gate waits (#6511)
* fix(agents): avoid executor starvation in file-gate waits

Keep async file-gate waiters out of the executor needed by the holder.
Preserve sync and cross-loop exclusion, and drain started file work on cancellation.

* test(agents): cover mixed file-gate callers

Document why release wakes every async waiter.
Cover a synchronous tool holder and asynchronous waiter through the middleware entry points.

* test(agents): cover sync waiters released by async file tools

Signed-off-by: LingYi <lingyi01525@gmail.com>

---------

Signed-off-by: LingYi <lingyi01525@gmail.com>
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-09 17:46:35 +08:00
Jun
dfc8e72428
fix(agents): make read-before-write cancellation lock-safe (#5395)
* test(agents): expose read-before-write cancellation races

* fix(agents): make read-before-write cancellation lock-safe

* test(agents): fix cancellation test import order

* test(agents): apply cancellation test formatting

* fix(agents): preserve first cancellation when worker task cancels

* test(agents): cover cancelled worker preservation

* fix(agents): preserve cancellation over worker errors

* test(agents): cover worker error after cancellation
2026-09-13 19:55:58 +08:00