fix: isolate buffer normalization from native layout - #15
Merged
Conversation
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.
What changed
bytearrayand C-contiguousmemoryviewvalues through the existing Python default-hook membrane.BufferErrorfor non-contiguous views, and refusal/hook behavior for binary subclasses.src/encode.rsidentical tov0.3.0b4apart from the required non-string mapping-key guidance.Why
The first publication-disabled
0.3.0b5rehearsal established a regression in the unrelatedcontrol-nested-tag-decode@512endpoint: +8.6%, simultaneous Bonferroni interval [+7.7%, +9.5%]. The Issue 13 behavior is cold-path normalization and does not require changing native decode code layout, so this follow-up isolates it at the existing Python membrane.User impact
Exact
bytearrayand contiguousmemoryviewinputs encode as padded base64 before a userenc_hook. Invalid mapping keys still refuse conversion, but the root and nested errors now explicitly namemsgspec.to_builtins(..., str_keys=True).Validation
make qualify: 488 Python tests passed, 11 skipped; 43 Rust tests passed; official TOON corpus 538/538; G2 zero-intermediate-container checks passed.0.3.0b4wheel: 36 randomized pairs, 22 endpoints, R 4.4.2 paired-log model, simultaneous Bonferroni intervals.non_inferior.INCONCLUSIVE, zero regression endpoints. Three unrelated endpoints were inconclusive because only their upper simultaneous bounds crossed 3%; no data-dependent rerun was performed.