imbajin commented on PR #409: URL: https://github.com/apache/hugegraph-ai/pull/409#issuecomment-6718181803
### Review finding: async cancellation does not interrupt an in-flight judge `aevaluate` and `aevaluate_many` use `asyncio.to_thread`: cancelling the asyncio task sets a cooperative cancellation token, but `JudgeSession` checks that token before a judge call and does not interrupt one already in progress. An in-flight Claude subprocess (or another synchronous provider call) can therefore continue until it completes or its timeout expires, potentially continuing provider usage after the caller receives `CancelledError`. The current `aevaluate` docstring says cancellation cancels the underlying run without describing this limitation. This is distinct from `KeyboardInterrupt` in `subprocess.run`: Python kills and waits for its direct child on that exception. A robust in-flight cancellation mechanism would require passing cancellation into the judge/provider lifecycle; until then the API documentation should make the cooperative boundary explicit. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
