You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
downloadLogContent accepts the caller's context, but starts the HTTP download with http.Get. Canceling get_job_logs does not interrupt a pending download or an open streaming response. The function can continue consuming download resources after the tool call has been canceled.
Reproduction
Use a local HTTP server that either withholds response headers or flushes headers and one log line, then keeps the response open. Invoke downloadLogContent with a cancellable context and cancel after the server receives the request. On main at 99d6d65, the function remains blocked until the fixture is released. An already-cancelled call also reaches the server and succeeds instead of reporting context.Canceled.
Expected: the existing context governs the HTTP request, so cancellation stops waiting and is preserved in the wrapped error. Successful downloads should retain the same log tail and line count.
Environment and scope
Go 1.27.3, macOS arm64. Three cancellation cases reproduced using local httptest servers only; no live GitHub calls. A normal three-line response is also checked to preserve the last two lines and total count.
A focused local fix uses NewRequestWithContext and the same http.DefaultClient. No URL policy, credentials, content limit or schema change is proposed.
Activity