Skip to content

fix(downloader): preserve object sizes across replica failures - #155

Merged
shikhar merged 1 commit into
mainfrom
codex/preserve-replica-range-size
Sep 29, 2026
Merged

shikhar merged 1 commit into
mainfrom
codex/preserve-replica-range-size

Conversation

@shikhar

@shikhar shikhar commented Sep 29, 2026

Copy link
Copy Markdown
Member

Replica fallback can return HTTP 416 with a smaller or missing object size after an earlier replica reported a larger one. Keep the largest known size independently of error selection, so sequences such as 416(size=17) → 503 → 416(size=0 or unknown) retain 17 when the final error is a 416. Preserve existing error precedence and fallback behavior.

Document that this reports the largest observed size without establishing replica agreement. Regression tests cover size orderings, empty and unknown sizes, intervening backend errors, and error precedence. A scripted SDK connector also exercises the full downloader path with 416 response headers.

Closes #153

Validation:

  • Confirmed all three new size-preservation regression tests fail before the fix.
  • cargo nextest run --locked --all-features: 113 passed, 1 intentionally skipped; includes Docker integration tests.
  • cargo +nightly fmt --check
  • cargo clippy --locked --all-features --all-targets -- -D warnings --allow deprecated
  • cargo deny check: passed with existing duplicate-dependency and unused-license-allowance warnings.

@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Changes how object download failures track size information.

The PR appears safe to merge; no actionable issue was identified.

Summary

The PR preserves the largest size reported by observed unsatisfied-range responses across replica fallback, documents that the size does not imply replica agreement, and adds unit and downloader-path regression tests.

Reviews (1) · Last reviewed commit: "fix(downloader): preserve object sizes a..."

@shikhar
shikhar merged commit e21b6b0 into main Sep 29, 2026
8 checks passed
@shikhar
shikhar deleted the codex/preserve-replica-range-size branch September 29, 2026 06:09
@github-actions github-actions Bot mentioned this pull request Sep 29, 2026
shikhar pushed a commit that referenced this pull request Sep 30, 2026
## 🤖 New release

* `cachey`: 0.11.2 -> 0.11.3

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.11.3](0.11.2...0.11.3)
- 2026-09-29

### Fixed

- *(downloader)* preserve object sizes across replica failures
([#155](#155))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

[Detail Bug] HTTP 416 responses can report the wrong object size when replica fallback occurs

1 participant