feat: add native set, frozenset, and bytes encoding - #11
Merged
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.
Intent
Release msgspec-toon 0.3.0b4 as a narrow 0.3.x beta bugfix. Add native encode support for set, frozenset, and exact bytes with msgspec-compatible projection and enc_hook ordering; document unordered set output and decode projection boundaries; preserve byte-exact TOON 4.1.1 conformance, canonical token output, payload-safe errors, and G2/G3/G5 invariants. Keep the public benchmark harness and GitHub Actions release path governed by the law 'Python collects raw timings; R owns inference', with familywise power planning and simultaneous Bonferroni intervals. Do not turn this into a 0.4.x release or rerun the old long local benchmark graph. Publish through the repository's verified wheel, revision-bound evidence, Trusted Publishing, and GitHub prerelease workflow.
What Changed
setandfrozensetas arrays in Python iteration order and exactbytesas padded base64 strings, beforeenc_hookdispatch.0.3.0b4.Risk Assessment
✅ Low: The native projections, hook ordering, documented boundaries, familywise benchmark planning, and release metadata are internally consistent and well covered by behavioral tests.
Testing
After replacing uv’s initial CPython 3.14t selection with the required CPython 3.13 ABI and correcting a probe-only version lookup, targeted tests, canonical byte/token locks, G2 instrumentation, R/release governance checks, revision-bound wheel verification, all 538 TOON 4.1.1 fixtures, and installed-wheel manual behavior passed; no long benchmark graph or full repository suite was run.
Evidence: Installed-wheel native-type transcript
Evidence: TOON 4.1.1 conformance transcript
Evidence: Revision-bound wheel verification
Evidence: Wheel manifest
/var/folders/pt/19wwr80d5bs38zmww5rm2vsc0000gn/T/no-mistakes-evidence/01KZZG3J8FT0QPR9MWRBWZB9SN/wheel/msgspec_toon-0.3.0b4-cp313-abi3-macosx_11_0_arm64.whl)Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
uv sync --python /opt/homebrew/opt/python@3.13/bin/python3.13 --lockedanduv run --no-sync maturin develop --releaseuv run --no-sync pytest -q tests/test_native_encode_types.py tests/test_support_matrix.py tests/test_efficiency_lock.py tests/test_errors.py tests/test_typed_allocations.pymake g2uv sync --python /opt/homebrew/opt/python@3.13/bin/python3.13 --group bench --lockedanduv run --no-sync pytest -q tests/test_efficiency_lock.pyFocused pytest selectors covering familywise R power planning, simultaneous Bonferroni intervals, immutable sampling design, missing-R fail-closed behavior, release workflow governance, revision identity, and compatibility reporting.Built, manifested, installed, and verifiedmsgspec_toon-0.3.0b4-cp313-abi3-macosx_11_0_arm64.whlagainst revision00c9d71003f628b77a17e4ea572f96608e86c51c..venv-e2e/bin/python -I conformance/run.pyagainst the installed wheel.Installed-wheel public API probe for set/frozenset iteration projection, exact bytes/base64,enc_hookordering, nested Structs, decode boundaries, and bytes-subclass failure/hook behavior.✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.