Wraps a promise with a timeout. Rejects with OperationTimeoutError if the
promise does not resolve within the specified duration.
CAVEAT — this does NOT cancel the wrapped operation. It is a Promise.race, so on timeout the
underlying work keeps running to completion (or its own failure) with nobody awaiting it. A caller
that retries a timed-out operation therefore stacks a second copy on top of the first, still
in-flight — which is why IntegrationEngine's fetch path does not retry
OperationTimeoutError. Real cancellation needs an AbortSignal threaded into the
connector contract; until then, treat a timeout as terminal for that attempt.
Wraps a promise with a timeout. Rejects with OperationTimeoutError if the promise does not resolve within the specified duration.
CAVEAT — this does NOT cancel the wrapped operation. It is a
Promise.race, so on timeout the underlying work keeps running to completion (or its own failure) with nobody awaiting it. A caller that retries a timed-out operation therefore stacks a second copy on top of the first, still in-flight — which is whyIntegrationEngine's fetch path does not retry OperationTimeoutError. Real cancellation needs anAbortSignalthreaded into the connector contract; until then, treat a timeout as terminal for that attempt.