feat(upload): bound upload attempts with a size-scaled deadline#178
Open
ben-miru wants to merge 8 commits into
Open
feat(upload): bound upload attempts with a size-scaled deadline#178ben-miru wants to merge 8 commits into
ben-miru wants to merge 8 commits into
Conversation
ben-miru
marked this pull request as ready for review
July 18, 2026 00:31
Backlog ExecPlan for bounding each upload attempt with tokio::time::timeout at the actor seam: floor (120s) plus a per-byte allowance (64 KiB/s minimum throughput), surfaced as a retryable AttemptTimeoutErr so the existing backoff/requeue machinery applies. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ben-miru
force-pushed
the
feat/upload-attempt-deadline
branch
from
July 20, 2026 21:09
197f902 to
136ef3a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tokio::time::timeoutat the Uploader actor seam (Worker::attempt_upload), with a size-scaled deadline: a 120 s floor plus 1 s per 64 KiB of job size (UploaderOptions::attempt_deadline, saturating arithmetic withdiv_ceiland a zero-divisor guard).gcs::Store::putcarries no timeout by design and documents that callers must enforce a size-scaled deadline — but no caller did, so a silently dead connection during a GCS transfer stalled the uploader round indefinitely and backed up the queue. S3 already had implicit stall protection via AWS SDK defaults; this bounds the whole attempt uniformly for both stores.UploadErr::AttemptTimeoutErrand rides the existing backoff/requeue/attempt-cap machinery unchanged.UploadExecutorcancel-safety now covers deadline expiry; thegcs::Store::putdeadline paragraph points at the actor's bound) and tests added (attempt_deadline_formulaunit tests plus the paused-clockhung_attempt_times_out_and_is_retriedacceptance test).plans/completed/20260717-upload-attempt-deadline.md.Validation
uploadat 96.81% against its 96.00 gate.🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.