Skip to content

Conversation

@michaelsproul
Copy link
Member

Rollup of:

With other changes added as I hack the EF tests to get them passing.

macladson and others added 10 commits November 25, 2025 04:09
- Added CompatibleUnion to EnumBehaviour enum
- Updated Procedure::read() to recognize "compatible_union" syntax
- Implemented ssz_encode_derive_enum_compatible_union() for encoding
- Implemented ssz_decode_derive_enum_compatible_union() for decoding
- Added compute_compatible_union_selectors() helper (selectors 128-255)
- Updated documentation with compatible_union examples
- Added comprehensive tests for compatible unions
- All tests passing

Co-authored-by: michaelsproul <[email protected]>
- Changed u8::max_value to u8::MAX to match Rust conventions
- Improved assertion message clarity

Co-authored-by: michaelsproul <[email protected]>
- Changed selector range from 128-255 to 1-127
- Updated compute_compatible_union_selectors to start at 1
- Fixed debug assertions to validate selector > 0 and <= 127
- Updated all tests to use selectors 1 and 2 instead of 128 and 129
- Updated documentation to reflect correct selector range

Co-authored-by: michaelsproul <[email protected]>
- Simplified decode error handling to directly check for empty bytes
- Fixed error message to reference MAX_UNION_SELECTOR (127) instead of u8::MAX
- Clarified that compatible unions are limited to 127 variants (1-127)

Co-authored-by: michaelsproul <[email protected]>
@michaelsproul michaelsproul changed the title Progressive ProgressiveBitList and compatible union support Dec 10, 2025
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 75.80645% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.47%. Comparing base (5f7d97d) to head (952eb17).

Files with missing lines Patch % Lines
ssz/src/bitfield/progressive.rs 78.33% 13 Missing ⚠️
ssz/src/context_deserialize.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
- Coverage   76.52%   76.47%   -0.06%     
==========================================
  Files          14       15       +1     
  Lines         805      867      +62     
==========================================
+ Hits          616      663      +47     
- Misses        189      204      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants