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
Addresses nattb8's review comment asking for nullability clarity:
- Adopt Passport's per-file `#nullable enable` pattern. BuildPayload's
null return and optional ctor dependencies (onError, handler,
getUtcNow) are now expressed in the type system, not only in
docstrings.
- Rewrite the file's comments as direct, plain-English facts. Class
summary trimmed to a one-line role description; per-outcome
behaviour stays inline at each branch where it can't drift from
the code. Ctor docs describe each parameter's purpose rather than
one caller's use of it.
- Fix the cancellation catch comment that incorrectly attributed token
tripping to HttpTransport.Dispose (it's the caller's responsibility).
- Handle non-IOException storage failures in SendBatchAsync. BuildPayload
narrows its catch to IOException (transient disk races); everything
else (e.g. UnauthorizedAccessException from stripped permissions) was
escaping SendBatchAsync entirely and would silently kill the flush
loop once a scheduler is wired up. Wrap the BuildPayload call: on
any non-IOException failure, delete the batch, report via onError
with FlushFailed, return true.
Package-wide <Nullable>enable</Nullable> flip deferred.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
/// <param name="getUtcNow">Optional UTC clock for deterministic testing of backoff timing.</param>
30
+
/// <param name="store">Source of event batches.</param>
31
+
/// <param name="publishableKey">Studio API key. Sent as <c>x-immutable-publishable-key</c> on every request.</param>
32
+
/// <param name="onError">Optional failure callback. Exceptions thrown inside it are caught and ignored.</param>
33
+
/// <param name="handler">Optional <see cref="HttpMessageHandler"/>. Callers can supply a custom pipeline (e.g. specific for test purposes). Defaults to the standard handler when null.</param>
34
+
/// <param name="getUtcNow">Optional UTC clock source used for backoff timing (e.g. swappable for deterministic time). Defaults to <c>DateTime.UtcNow</c> when null.</param>
0 commit comments