Merged
Conversation
Fix several correctness bugs in encoding/decoding and tighten validations; add tests and CI workflows. Key fixes: - Compact field headers: long-form field IDs are now zigzag-encoded when written and decoded with zigzag on read (field.gleam). - Message sequence IDs: encode as uint32 (mask) and sign-extend on decode to preserve negative seqids (message.gleam). - Varint: encode_varint now panics on negative inputs; decoder/encoder helpers clarified (varint.gleam). - Integer read/write fixes: read_i8 now decodes signed bytes; write_i8 and write_i16 validate ranges and panic on overflow (reader.gleam, writer.gleam). - Boolean policy: AcceptBoth now accepts legacy 0 => False in addition to canonical encoding; added tests for permissive behavior (reader.gleam, types.gleam, tests). - Misc: remove unused Writer type, add/clean up helper functions, move/clarify doc comments, and provide clearer error formatting for zigzag range errors. Tests added/updated to cover negative i8/i16 roundtrips, long-form/negative field IDs, negative sequence IDs, and boolean behavior. CI: new workflows for goldens, long fuzz harness, and tag-based publish with improved Hex diagnostics and non-interactive auth; CHANGELOG.md added documenting the fixes.
Delete two GitHub Actions workflows used to publish packages to Hex: .github/workflows/publish-gleam.yml and .github/workflows/publish-on-ci-main.yml. Both workflows (tag-triggered publish pipelines for Gleam and rebar3/CI-based publishing) have been removed, consolidating or replacing the repository's publish automation elsewhere.
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.
This pull request introduces several important bug fixes and improvements to the Thrift Compact Protocol implementation, focusing on wire-format correctness and API reliability. The main changes address encoding/decoding issues for field headers and sequence IDs, update documentation, and remove unused code. These updates ensure compatibility with other Thrift implementations and improve the robustness of the library.
Wire-format correctness and protocol compliance:
src/thrifty/field.gleam). [1] [2] [3]src/thrifty/message.gleam). [1] [2]API correctness and safety:
Documentation improvements:
src/thrifty/field.gleam,src/thrifty/message.gleam). [1] Fb154735L160R170, [2] [3] [4] [5]Dead code removal:
types.Writertype from the codebase.Changelog and test coverage:
CHANGELOG.mddocumenting all notable fixes, API changes, and test additions for this release.These changes collectively improve correctness, interoperability, and maintainability of the project.