Skip to content

feat: implement legacy goodbye handshake for protocol 28/29 - #2593

Merged
oferchen merged 1 commit into
masterfrom
feature/legacy-goodbye-handshake
Mar 9, 2026
Merged

oferchen merged 1 commit into
masterfrom
feature/legacy-goodbye-handshake

Conversation

@oferchen

@oferchen oferchen commented Mar 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add write_goodbye()/read_goodbye() protocol-version-aware helpers to codec::ndx
  • Protocol < 30: 4-byte LE wire format ([0xFF, 0xFF, 0xFF, 0xFF]) matching upstream write_int(-1)
  • Protocol >= 30: single varint byte (0x00) matching modern NDX encoding
  • Add NDX_DONE_LEGACY_BYTES and NDX_DONE_MODERN_BYTE constants
  • 30 tests: unit tests in ndx.rs + integration tests in goodbye_handshake.rs

Test plan

  • cargo fmt --all -- --check passes
  • cargo clippy -p protocol passes with no warnings
  • 30 goodbye-related tests pass via nextest
  • CI: fmt+clippy, nextest, Windows, macOS, Linux musl

@github-actions github-actions Bot added the enhancement New feature or request label Mar 9, 2026
@oferchen
oferchen force-pushed the feature/legacy-goodbye-handshake branch from 3340743 to 18e1507 Compare March 9, 2026 11:49
Add protocol-version-aware goodbye helpers (write_goodbye/read_goodbye)
that emit the correct wire format: 4-byte LE for proto < 30, single
varint byte for proto >= 30. Includes 30 tests covering all versions.
@oferchen
oferchen force-pushed the feature/legacy-goodbye-handshake branch from 18e1507 to 6e3ff17 Compare March 9, 2026 11:55
@oferchen
oferchen merged commit a235075 into master Mar 9, 2026
30 of 31 checks passed
@oferchen
oferchen deleted the feature/legacy-goodbye-handshake branch March 9, 2026 12:30
oferchen added a commit that referenced this pull request May 1, 2026
Add protocol-version-aware goodbye helpers (write_goodbye/read_goodbye)
that emit the correct wire format: 4-byte LE for proto < 30, single
varint byte for proto >= 30. Includes 30 tests covering all versions.
oferchen added a commit that referenced this pull request May 5, 2026
Add protocol-version-aware goodbye helpers (write_goodbye/read_goodbye)
that emit the correct wire format: 4-byte LE for proto < 30, single
varint byte for proto >= 30. Includes 30 tests covering all versions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant