4.X: fix bitfield off-by-one encoding - #108
Conversation
PR 108 — Fixed Bitfield
Main point: PR 108 is spec-correct on bit indexing; the remaining issue is an off-by-one storage bug that prevents the highest valid ID from being set. Specification for reference |
|
@Tejasshack i believe i have applied the desired fixes in my most recent commits. i actually dropped support for IntegerSet with adjustment of 0 (it is now always 1) and the GppModelTest.consistencyTest does the range 1...24 in one of its cases successfully. |
|
@yuzawa-san I’ve reviewed the changes. Thanks for adding the fixes. This looks good to me. |
chuff
left a comment
There was a problem hiding this comment.
Verified locally: pulled the branch, ran mvn test (344 tests, 0 failures). The off-by-one fix removes the adjustment abstraction and bakes in 1-based indexing directly in IntegerSet, consistent with every remaining call site (vendor ranges, purpose bitfields, custom-purpose flexible bitfields) which are all 1-indexed per the TCF spec. Boundary case (purpose/vendor 24) round-trips correctly. LGTM.
Co-authored-by: Cursor <cursoragent@cursor.com>
this addresses the feedback done in #83 (comment)
from one of the tcf specs: