Skip to content

docs(refactor): Phase 1 - Prepare for internal header migration#611

Merged
kcenon merged 1 commit into
mainfrom
refactor/issue-610-phase1-prepare-internal-migration
Feb 2, 2026
Merged

docs(refactor): Phase 1 - Prepare for internal header migration#611
kcenon merged 1 commit into
mainfrom
refactor/issue-610-phase1-prepare-internal-migration

Conversation

@kcenon

@kcenon kcenon commented Feb 2, 2026

Copy link
Copy Markdown
Owner

Closes #610

Summary

This PR implements Phase 1 of the internal header migration plan (Epic #577), preparing the foundation for moving 118 implementation headers to src/internal/ to reduce the public API surface from 153 to < 40 headers.

Key Changes

  1. Comprehensive Header Audit (docs/refactoring/HEADER_AUDIT_PHASE1.md)

    • Categorizes all 153 public headers
    • Identifies 35 headers to keep public (facades, interfaces, integration, utilities)
    • Identifies 118 headers to move to internal (implementations, protocol details, utilities)
  2. Migration Guide (docs/refactoring/MIGRATION_GUIDE_V2.md)

    • Step-by-step examples for migrating from v1.x to v2.0 facade API
    • Covers TCP, UDP, HTTP, and WebSocket migration
    • Documents three migration strategies (immediate, gradual, advanced)
    • Includes troubleshooting and compatibility information
  3. Deprecation Warnings

    • Added compile-time warnings to core headers:
      • messaging_client.h
      • messaging_server.h
      • messaging_udp_client.h
      • messaging_udp_server.h
    • Warnings direct users to facade API and migration guide
    • Can be suppressed with NETWORK_SYSTEM_SUPPRESS_DEPRECATION_WARNINGS

Goals Achieved

  • ✅ Complete audit of all public headers
  • ✅ Clear categorization: public vs. internal
  • ✅ Comprehensive migration guide with examples
  • ✅ Deprecation warnings for smooth transition
  • ✅ Documentation for 4-phase refactoring plan

No Breaking Changes

This PR does not break any existing code. It only:

  • Adds documentation
  • Adds deprecation warnings (suppressible)
  • Prepares the groundwork for subsequent phases

Migration Path

For Users

  1. Read the migration guide: docs/refactoring/MIGRATION_GUIDE_V2.md
  2. Update to facade API: Follow examples in the guide
  3. Test your changes: Ensure functionality is preserved
  4. Suppress warnings (optional): Define NETWORK_SYSTEM_SUPPRESS_DEPRECATION_WARNINGS during transition

For Maintainers

This sets up the foundation for Phases 2-4:

  • Phase 2: Move protocol implementations (4 PRs: TCP, UDP, HTTP/WS, QUIC)
  • Phase 3: Move protocol details (3 PRs: HTTP2, gRPC, utilities)
  • Phase 4: Cleanup and finalization

Test Plan

  • All existing tests pass (no code changes)
  • Deprecation warnings appear when compiling with deprecated headers
  • Warnings can be suppressed with NETWORK_SYSTEM_SUPPRESS_DEPRECATION_WARNINGS
  • Documentation is clear and comprehensive

Related Issues

Timeline

Version Status Migration Action
v1.x (current) Stable No action needed
v2.0-beta (Q1 2026) Testing Opt-in migration with compatibility mode
v2.0 (Q2 2026) Stable Migrate to facade API (recommended)
v3.0 (2027) Future Facade-only API, internal headers not accessible

Next Steps

After this PR is merged:

  1. Begin Phase 2: Move TCP implementation headers
  2. Continue with UDP, HTTP/WS, and QUIC in separate PRs
  3. Each PR will be incremental and tested thoroughly

Prepare for moving 118 implementation headers to src/internal/ as part
of Epic #577 to reduce public API surface from 153 to < 40 headers.

Changes:
- Add comprehensive header audit document categorizing all 153 headers
- Create migration guide with facade API usage examples
- Add deprecation warnings to core headers (TCP/UDP client/server)
- Document 4-phase refactoring plan

The deprecation warnings inform users about upcoming v2.0 changes and
direct them to use facade API instead of direct implementation headers.
Users can suppress warnings with NETWORK_SYSTEM_SUPPRESS_DEPRECATION_WARNINGS.

Files added:
- docs/refactoring/HEADER_AUDIT_PHASE1.md
- docs/refactoring/MIGRATION_GUIDE_V2.md
- docs/refactoring/README.md

Files modified:
- include/kcenon/network/core/messaging_client.h
- include/kcenon/network/core/messaging_server.h
- include/kcenon/network/core/messaging_udp_client.h
- include/kcenon/network/core/messaging_udp_server.h

Related: #610, #577
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Performance Comparison

Base Branch Results

No base results

PR Branch Results

No PR results

@kcenon kcenon merged commit 1329330 into main Feb 2, 2026
44 checks passed
@kcenon kcenon deleted the refactor/issue-610-phase1-prepare-internal-migration branch February 2, 2026 05:27
kcenon added a commit that referenced this pull request Apr 13, 2026
…#611)

Prepare for moving 118 implementation headers to src/internal/ as part
of Epic #577 to reduce public API surface from 153 to < 40 headers.

Changes:
- Add comprehensive header audit document categorizing all 153 headers
- Create migration guide with facade API usage examples
- Add deprecation warnings to core headers (TCP/UDP client/server)
- Document 4-phase refactoring plan

The deprecation warnings inform users about upcoming v2.0 changes and
direct them to use facade API instead of direct implementation headers.
Users can suppress warnings with NETWORK_SYSTEM_SUPPRESS_DEPRECATION_WARNINGS.

Files added:
- docs/refactoring/HEADER_AUDIT_PHASE1.md
- docs/refactoring/MIGRATION_GUIDE_V2.md
- docs/refactoring/README.md

Files modified:
- include/kcenon/network/core/messaging_client.h
- include/kcenon/network/core/messaging_server.h
- include/kcenon/network/core/messaging_udp_client.h
- include/kcenon/network/core/messaging_udp_server.h

Related: #610, #577
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.

refactor: Move protocol implementation headers to internal

1 participant