Context
validateHealthyPlatformConnection (the gate run by WithConnectionValidation) calls checkPlatformHealth(context.Background(), …) with no deadline. If a custom http.Client has no timeout configured, sdk.New() can block indefinitely on a network stall.
Surfaced in #3412 (CodeRabbit major-priority review).
Proposal
Wrap the call in a bounded context. Open question: hard-coded 5s, configurable via a new WithConnectionValidationTimeout(d) option, or derive from an existing config?
Acceptance
Context
validateHealthyPlatformConnection(the gate run byWithConnectionValidation) callscheckPlatformHealth(context.Background(), …)with no deadline. If a customhttp.Clienthas no timeout configured,sdk.New()can block indefinitely on a network stall.Surfaced in #3412 (CodeRabbit major-priority review).
Proposal
Wrap the call in a bounded context. Open question: hard-coded 5s, configurable via a new
WithConnectionValidationTimeout(d)option, or derive from an existing config?Acceptance
sdk.New()cannot block longer than the configured timeout when validation is enabledhttptest.Serverwith a slow handler)WithConnectionValidationdoc comment