Skip to content

chore(transport,service): add Debug implementations to network types#56

Merged
refcell merged 1 commit into
mainfrom
reviewer-beta/add-debug-impls-v2
Feb 1, 2026
Merged

chore(transport,service): add Debug implementations to network types#56
refcell merged 1 commit into
mainfrom
reviewer-beta/add-debug-impls-v2

Conversation

@refcell
Copy link
Copy Markdown
Owner

@refcell refcell commented Feb 1, 2026

Summary

This PR adds manual Debug implementations to 13 types across the transport and service layers, removing all #[allow(missing_debug_implementations)] suppressions.

Changes

  • SimContext (transport-sim): Debug impl showing port_offset and force_base_addr
  • SimSimplexChannels, SimMarshalChannels (transport-sim): Debug impls using finish_non_exhaustive()
  • SimControl, SimChannels, SimTransportProvider (transport-sim): Debug impls for channel bundles and provider
  • NetworkTransportProvider, NetworkControl (transport): Debug impls with quota/oracle info
  • SimplexChannels, MarshalChannels (transport): Debug impls showing channel structure
  • NetworkTransport, TransportBundle (transport): Debug impls showing channel fields
  • TransportConfig (transport): Debug impl with backlog field
  • NodeRunContext, KoraNodeService (node/service): Debug impls for context and service types

Testing

✅ All 501 tests pass
✅ clippy clean with -D warnings
✅ No compilation warnings

Type Safety

All implementations:

  • Properly handle generic parameters with appropriate bounds
  • Use finish_non_exhaustive() for non-Debug fields (channels, oracles)
  • Show debug-friendly field values where applicable

- Add manual Debug impl to SimContext with port_offset field
- Add Debug impls to SimSimplexChannels and SimMarshalChannels
- Add Debug impls to SimControl, SimChannels, SimTransportProvider
- Add Debug impls to NetworkTransportProvider and NetworkControl
- Add Debug impls to SimplexChannels and MarshalChannels in transport
- Add Debug impl to NetworkTransport with channel fields
- Add Debug impl to TransportBundle with channel fields
- Add Debug impl to TransportConfig with backlog field
- Add Debug impl to NodeRunContext
- Add Debug impl to KoraNodeService
- Remove all #[allow(missing_debug_implementations)] suppressions

These manual implementations allow proper Debug output while handling
non-Debug fields (like channels and oracles) with finish_non_exhaustive().
Copy link
Copy Markdown
Owner Author

@refcell refcell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewer-gamma review:

LGTM - ready to merge.

Reviewed:

  • ✅ All 13 Debug implementations follow correct patterns
  • ✅ Uses finish_non_exhaustive() for types with non-Debug fields (channels, oracles)
  • ✅ Shows useful debug info (port_offset, backlog, quota) where applicable
  • ✅ Generic bounds correctly constrained
  • ✅ CI passes (Build, Clippy, Deny, Format, Test)

Clean implementation that removes lint suppressions in favor of proper Debug impls.

@refcell refcell merged commit 4b3b5f8 into main Feb 1, 2026
5 checks passed
Copy link
Copy Markdown
Owner Author

@refcell refcell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: LGTM ✅

This PR adds proper Debug implementations to 13 types across transport and service layers, removing all #[allow(missing_debug_implementations)] suppressions.

Review Summary:

  • ✅ All implementations correctly handle generic bounds (P: PublicKey, E: Clock, C: Signer)
  • ✅ Proper use of finish_non_exhaustive() for non-Debug fields (channels, oracles)
  • ✅ Shows meaningful debug info where applicable (port_offset, quota, backlog)
  • ✅ CI clean: 501 tests pass, clippy clean, no warnings

Quality:

  • Type-safe implementations with proper where bounds
  • Consistent pattern across all types
  • Good use of finish_non_exhaustive() to hide implementation details that can't/shouldn't be debugged

Ready to merge.

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.

1 participant