Skip to content

fix: bound resource downloads - #231

Open
victor0602 wants to merge 1 commit into
mainfrom
codex/download-reliability
Open

fix: bound resource downloads#231
victor0602 wants to merge 1 commit into
mainfrom
codex/download-reliability

Conversation

@victor0602

@victor0602 victor0602 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • enforce overall and idle timeouts across response headers, body reads, and disk writes
  • retry transient network, 408, 429, and 5xx failures with exponential backoff and Retry-After support
  • cap download size using Content-Length and streamed byte counts
  • write to a temporary file and atomically replace the destination only after a complete download
  • propagate caller cancellation and clean up readers, writers, and temporary files on every failure path

Validation

  • bun test test/files/download.test.ts
  • bun run typecheck
  • bun run lint
  • bun test (459 passed)

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant