atharvalade opened a new pull request, #3036:
URL: https://github.com/apache/iggy/pull/3036

   ## Which issue does this PR close?
   
   Closes #2979
   
   ## Rationale
   
   Stats wire encoding could omit `iggy_server_semver` when `None`, while 
multiple deserializers assume a fixed 4-byte semver slot (`0` sentinel), 
risking downstream field misalignment.
   
   ## What changed?
   
   When semver was `None`, the binary stats encoder could skip semver bytes 
(and in protocol encoder also skip tail fields), which could shift subsequent 
fields for decoders expecting fixed layout.  
   Now semver is always encoded as 4 bytes using `0` as the sentinel for 
`None`, and tail fields (`threads_count`, `free_disk_space`, 
`total_disk_space`) are always encoded.  
   The stats decoder now normalizes semver `0` back to `None`, and tests were 
updated/added to lock this layout and sentinel behavior.
   
   ## Local Execution
   
   - Passed
   - Pre-commit hooks not ran
   
   ## AI Usage
   
   - Opus 4.6
   - exploration and identification
   - ran `cargo fmt --check`, `cargo clippy`, targeted `cargo test -p 
iggy_binary_protocol responses::system::get_stats`, and repository CI scripts 
for trailing whitespace/newline and license headers
   - yes all code can be explained


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to