fix(cas): handle disconnected HTTP and gRPC downloads
Merged
MI
15h ago+154+154+012345678901234567890123456789-3-3-0123456789
Interrupted HTTP/2 downloads can reach Sentry as client disconnected, and interrupted gRPC downloads can report Unavailable: transport is closing during connection shutdown.
Check the HTTP request context for cancellation and classify unavailable outgoing gRPC streams as client disconnects. Handle the gRPC failure at the send boundary because the transport can close before it cancels the request context. Storage-backend Unavailable errors remain reportable.
Regression tests verify that disconnected downloads do not reach Sentry, HTTP cancellation does not attempt an error response, and active-request and backend failures remain reportable. Both regression cases failed before their fixes.
Validation:
go test ./app/artifact-cas/...passed.- Service lint reported no new issues against the base commit. Full service lint has five pre-existing findings.
- A local HTTP/2 connection-close reproducer returned the exact
client disconnectederror in five consecutive runs.
Fixes ARTIFACT-CAS-4X
Fixes ARTIFACT-CAS-4W