Skip to content

Conversation

@sanity
Copy link
Collaborator

@sanity sanity commented Oct 28, 2025

Summary

Splits the 2231-line handshake.rs into a cleaner, more maintainable structure:

  • handshake.rs (1568 lines) - implementation only
  • handshake/tests.rs (663 lines) - test module with 5 tests

Why

Continuing the file organization improvements started in #2012. Large files become difficult to navigate and maintain. This refactoring:

  • Improves navigation: Separate test file makes it easier to find production code
  • Modern Rust style: Uses module_name.rs + module_name/ pattern instead of mod.rs
  • Zero risk: Pure refactoring with no logic changes - all 5 tests pass
  • Consistent approach: Same pattern as priority_select split

What Changed

  • Split handshake.rshandshake.rs + handshake/tests.rs
  • Preserved all functionality and test coverage
  • Maintained existing module visibility (pub(super), etc.)

Test Plan

  • Build succeeds: cargo build --lib
  • All 5 tests pass: cargo test --lib handshake
  • Formatting passes: cargo fmt --check
  • Clippy passes: cargo clippy --all-targets --all-features
  • Pre-commit hooks pass

🤖 Generated with Claude Code

Splits the 2231-line handshake.rs into a cleaner structure:
- handshake.rs (1568 lines) - implementation
- handshake/tests.rs (663 lines) - test module

Uses modern Rust module style (named file + directory) rather than
mod.rs pattern. This improves code organization and makes large files
easier to navigate without affecting functionality.

All 5 tests pass. No logic changes - pure refactoring.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sanity sanity enabled auto-merge October 28, 2025 02:40
@sanity
Copy link
Collaborator Author

sanity commented Oct 28, 2025

Part of systematic file bloat reduction tracked in #2016

@sanity sanity added this pull request to the merge queue Oct 28, 2025
Merged via the queue into main with commit 608e719 Oct 28, 2025
10 checks passed
@sanity sanity deleted the refactor/split-handshake branch October 28, 2025 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants