Pin Go offset and consumer-group wire formats
Added table-driven exact-byte serialization tests for every command in the Go SDK's offset, partition, and consumer-group command modules.
apache/iggy · #4370
Protocol-contract coverage
Apache Iggy's Go SDK now detects byte-level changes across offset, partition, and consumer-group commands before they can diverge from the server's binary decoders.
Problem
Twelve Go SDK command encoders had no direct assertions for their complete binary request layouts. Changes to command codes, identifier variants, optional fields, offsets, names, or field ordering could therefore break protocol compatibility without a focused test failure.
Approach
Adds 20 literal payload vectors covering numeric and named identifiers, optional partition IDs, stored offsets, and consumer-group names, with each command code and complete request body checked against the protocol contract.
Impact and scope
- Makes the Go-to-server binary contract explicit for all commands in three previously uncovered command modules.
- Covers identifier variants and optional fields whose discriminators and ordering are easy to change accidentally.
- Uses complete expected byte sequences rather than implementation-derived expectations, so incompatible wire changes fail directly.
- Changes tests only; no production encoder, public API, storage behavior, or runtime command path was modified.
- The broader Go SDK coverage issue remains open, so this record claims these three command families rather than completion of GH-2883.
Validation
- The complete Go suite, race-enabled Go suite, go vet, applicable pre-commit hooks, and the Go pre-push lint hook passed locally.
- The final hosted run passed Go build, lint, tests, E2E, race-enabled BDD, examples, common checks, finalization, and Codecov checks; cancelled jobs belonged to an earlier superseded workflow run.
- Two upstream contributors approved the final head, and the functional test commits are authored by Goutam Adwant.