fix: fused pipeline falls back for partial-mixin codecs without sync partial methods - #4201
Merged
d-v-b merged 1 commit intoJul 29, 2026
Conversation
d-v-b
commented
Jul 29, 2026
| # without `_decode_partial_sync` — such codecs take the full-chunk | ||
| # path below instead. | ||
| codec = self.array_bytes_codec | ||
| if self.supports_partial_decode and hasattr(codec, "_decode_partial_sync"): |
Contributor
Author
There was a problem hiding this comment.
a very cursed blend of two separate ways to advertise similar capabilities. this will need a deep rethink of our codec API to fix
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4201 +/- ##
==========================================
- Coverage 93.90% 93.90% -0.01%
==========================================
Files 91 91
Lines 12672 12670 -2
==========================================
- Hits 11900 11898 -2
Misses 772 772
🚀 New features to boost your workflow:
|
…partial methods The partial dispatch in FusedCodecPipeline.read_sync/write_sync asserted the private _decode_partial_sync/_encode_partial_sync methods, which only ShardingCodec implements. A codec advertising the public partial mixins (ArrayBytesCodecPartialDecodeMixin/-EncodeMixin) with only the documented async partial methods died with a bare AssertionError — or, under python -O, an AttributeError mid-IO. The asserts are now capability gates: codecs without the sync partial methods take the full-chunk sync path instead. The related crash for sharded arrays with async-only inner codecs is fixed separately in zarr-developers#4179. Assisted-by: ClaudeCode:claude-fable-5
d-v-b
force-pushed
the
fix/fused-sync-fallback-robustness
branch
from
July 29, 2026 14:31
0b0bb08 to
ac4e863
Compare
d-v-b
marked this pull request as ready for review
July 29, 2026 14:37
Contributor
Author
|
I'm self-merging this! |
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.
This PR avoids a crash mid-decode in the fused codec pipeline when a codec advertises public partial encode / decode mixin without supporting the sync methods. This PR ensures that we catch this case early and fall back to full chunk decoding / encoding explicitly.
Assisted-by: ClaudeCode:claude-fable-5
based on this PR: d-v-b#254
Summary
[Describe what this PR changes and why, in your own words.]
For reviewers
[What would you most value a second look at? What are you already confident in? For a refactor, say whether behavior is meant to be unchanged.]
Author attestation
TODO
docs/user-guide/*.mdchanges/