fix(targethasher): frame rule hashes for BUG-006 - #295
Conversation
|
|
74ef0bc to
da6e74c
Compare
sbalabanov
left a comment
There was a problem hiding this comment.
Shorten diff description and list edge cases in serialization it addresses
da6e74c to
ba296a4
Compare
|
Shortened the PR description and listed the BUG-006 serialization edge cases in ba296a4. The concise body now covers boundary, type/presence, ordering, nested-message, and nil-message cases. [addressed by agent] |
3f6e092 to
d5efe0c
Compare
sbalabanov
left a comment
There was a problem hiding this comment.
Update PR description with the example of the use case of the bug the PR is fixing
Summary: Intent: - Fix BUG-006 by eliminating structural collisions in rule hashing. - Preserve deterministic, order-independent hashing for unordered rule data. Changes: - Add canonical encoding with field, type, presence, and length framing without an encoding version marker. - Frame collection element types, counts, values, and nested messages before hashing. - Add regression coverage for prior collision shapes and collection-order determinism. --- <sub>Generated by the pr-create skill in devexp-agent-marketplace</sub>
d5efe0c to
baaabf9
Compare
|
Updated and simplified the PR description with a concrete BUG-006 failure example in baaabf9. It now shows how ["a", "bc"] and ["ab", "c"] previously serialized to the same bytes and could cause changed-target detection to miss a real update. [addressed by agent] |
Summary
Fix BUG-006 by type- and length-framing rule data before hashing.
Example: changing a string-list attribute from
["a", "bc"]to["ab", "c"]previously contributed the same raw bytes (abc) to the hash, so Tango could miss a changed target. Canonical serialization makes these values distinct while retaining deterministic Bazel attribute and collection ordering.