mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-25 10:37:11 -06:00
The pending counter was decremented when the job's guard dropped at the end of the loop iteration, after the reply was sent, so a waiting caller (CLI / MCP mask.add) could see the segmenter still busy right after its answer arrived. Under a loaded test run that made tests_segment::waiting_requests_with_a_damaged_model_are_errors fail on assert!(!busy()). The guard is now dropped just before each reply. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01912WaK6Rmew3wxZuPyX7E8