Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request enables passing custom headers to sequential and concurrent file operations in gcsfs. Specifically, _cat_file_sequential now correctly merges and overrides range headers when start/end limits are provided, and _get_file no longer bypasses the concurrent download path when custom headers are present. Corresponding unit tests have been added to verify these behaviors. I have no additional feedback to provide as the changes are well-implemented and covered by tests.
fallenmi
force-pushed
the
agent/preserve-cat-file-headers
branch
from
August 25, 2026 12:44
3dc40dd to
9222b47
Compare
fallenmi
marked this pull request as ready for review
August 25, 2026 12:44
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1013 +/- ##
==========================================
+ Coverage 90.04% 90.07% +0.03%
==========================================
Files 16 16
Lines 3638 3639 +1
==========================================
+ Hits 3276 3278 +2
+ Misses 362 361 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Fixes #889.
Summary
_cat_filerequests.start/endbounds replace any case-insensitive callerRangewithout mutating the caller's mapping.get_filedownloads retain conditional headers too.Testing
_cat_fileheader cases droppedIf-Match, and headers forcedget_fileonto the sequential path.main(ab6bc825), six focused header, routing, and adjacent generation tests passed withSTORAGE_EMULATOR_HOST=http://localhost:4443.If-Match, generated the correct range per chunk, and left the caller mapping unchanged.flake8,isort --check-only, Black, andgit diff --checkpassed.The full emulator-backed suite was not run locally because the Docker daemon is unavailable; upstream CI remains the integration gate.
AI assistance disclosure
OpenAI Codex prepared the issue reproduction, implementation, tests, rebase, and validation. The GitHub account owner explicitly authorized publication and transition to ready for maintainer review.