Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a7857c271
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fn decode_chunk_payload(encoded: &[u8]) -> GibbloxResult<Vec<u8>> { | ||
| validate_chunk_bounds(encoded.len())?; | ||
|
|
||
| match detect_compression(encoded) { |
There was a problem hiding this comment.
Bypass compression sniffing for raw chunk fallback
This decoder path is used even after fetch_chunk_payload falls back from .cacnk to the raw chunk object, but decode_chunk_payload still guesses compression from magic bytes. Raw casync chunks are arbitrary bytes, so any raw chunk beginning with gzip/zstd/xz signatures will be misclassified as compressed and then fail decode (or decode to different bytes and fail digest verification), making valid chunks unreadable. This can break reconstruction on legitimate stores that include raw chunks for incompressible content.
Useful? React with 👍 / 👎.
Here's a whole bunch of machinery to handle fetching and parsing casync indexes and chunks. casync kinda breaks the nice compositional layers we were going for with gibblox, but it's salvageable, maybe. so first we land all this mess and see if we can actually get it to work. if so, we'll see if anything needs to be rejiggered to enable better sharing of the http read path and caching that gibblox-casync is duplicating from gibblox-http + gibblox-cache Signed-off-by: Sam Day <me@samcday.com> Assisted-by: opencode:gpt-5.3-codex
Signed-off-by: Sam Day <me@samcday.com> Assisted-by: opencode:gpt-5.3-codex
4a7857c to
17e1fb9
Compare
No description provided.