You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[fix] preserve raw bytes and bound hexadecimal grouping (LET-46) - #201
bytes_hex decoded its byte input as UTF-8, so binary data such as b"\xff\xc3\xa9" produced the wrong hexadecimal string. It also negated the minimum signed 64-bit grouping count, causing a negative-index panic; narrowing large grouping counts could change their meaning on 32-bit hosts.
Walk the input byte by byte and check grouping bounds before converting to int. Existing grouping direction, argument errors and ordinary ASCII results are preserved. Add binary-data and integer-boundary regressions, a reusable public-API benchmark, and concise parameter documentation. Fixes LET-46.
Validation:
Full build, race tests (count 2), vet and coverage comparison pass on Go 1.27.3 and Go 1.19.13. The modified function has 20/20 covered statements; other functions retain coverage. All 28 direct boundary cases also pass on Linux/386.
Sixteen paired framework checks pass across Starbox, StarCLI main/examples and Base, with eight identical consumer coverage profiles. Four fresh CLI binaries pass eight public examples and the expected old-error/new-success boundary checks. CLI module preparation symmetrically selects the existing Starlet requirement of Starlight v0.2.2.
One fixed ASCII benchmark comparison covers 14 cases on both compilers: no consistent slowdown was observed, allocation counts match, and reported bytes vary by at most one byte for 4 KiB inputs. This small sample does not establish equivalence or a general speedup. No dependency or interpreter changes.
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer TIP This summary will be updated as you push new changes.
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
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.
bytes_hexdecoded its byte input as UTF-8, so binary data such asb"\xff\xc3\xa9"produced the wrong hexadecimal string. It also negated the minimum signed 64-bit grouping count, causing a negative-index panic; narrowing large grouping counts could change their meaning on 32-bit hosts.Walk the input byte by byte and check grouping bounds before converting to
int. Existing grouping direction, argument errors and ordinary ASCII results are preserved. Add binary-data and integer-boundary regressions, a reusable public-API benchmark, and concise parameter documentation. Fixes LET-46.Validation: