Skip to content

fix(registry): request identity encoding for tarballs#356

Merged
jdx merged 1 commit intomainfrom
codex/tarball-identity-encoding
Apr 28, 2026
Merged

fix(registry): request identity encoding for tarballs#356
jdx merged 1 commit intomainfrom
codex/tarball-identity-encoding

Conversation

@jdx
Copy link
Copy Markdown
Contributor

@jdx jdx commented Apr 28, 2026

Summary

  • Send Accept-Encoding: identity for tarball downloads.
  • Keep metadata requests unchanged, so packuments can still use normal HTTP compression.
  • Add a registry retry test that asserts tarball requests use identity encoding.

Why

A user reported intermittent GitHub Actions failures in aube ci where larger native tarballs stalled and eventually failed with HTTP error: error decoding response body. Tarballs are already .tgz archives, so asking CDNs or proxies for another HTTP content-encoding layer adds an avoidable decode failure mode without reducing useful payload size.

Current main already retries tarball body read/decode failures and surfaces retry warnings; this change reduces the chance of hitting HTTP content-encoding decode errors in the first place.

Validation

  • cargo fmt --check
  • cargo test -p aube-registry retry_tests
  • cargo test -p aube-registry

Note

Low Risk
Low risk: a narrow HTTP header change affecting only tarball GETs, plus a test asserting the new behavior; could only impact unusual registries that rely on content-encoding for tarballs.

Overview
Tarball downloads now send Accept-Encoding: identity in fetch_tarball_bytes to prevent proxies/CDNs from applying an additional HTTP content-encoding layer on already-.tgz payloads.

Adds a wiremock retry test that asserts tarball GETs include the identity encoding header, while keeping packument/metadata request behavior unchanged.

Reviewed by Cursor Bugbot for commit f527fa0. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 28, 2026

Greptile Summary

This PR adds a single Accept-Encoding: identity header to tarball GET requests so CDNs and proxies do not apply an additional HTTP content-encoding layer on top of what are already .tgz archives. Metadata/packument requests are left unchanged. A new wiremock test asserts the header is present and that the mock endpoint is hit exactly once.

Confidence Score: 5/5

Safe to merge — change is minimal, well-motivated, and covered by a targeted test.

Only one file changed; the fix is a single header addition on a narrow code path (tarball fetches only), consistent with how reqwest 0.12 handles explicit Accept-Encoding overrides. The new test uses .expect(1) to confirm the header is sent, and no existing behavior for packument/metadata requests is altered.

No files require special attention.

Important Files Changed

Filename Overview
crates/aube-registry/src/client.rs Adds Accept-Encoding: identity to tarball requests and a corresponding wiremock test; metadata paths are unchanged.

Reviews (1): Last reviewed commit: "fix(registry): request identity encoding..." | Re-trigger Greptile

@jdx jdx merged commit 7942bd1 into main Apr 28, 2026
19 checks passed
@jdx jdx deleted the codex/tarball-identity-encoding branch April 28, 2026 12:16
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