RUDPClient/openspec/changes/archive/2026-03-27-add-transport-me.../tasks.md

830 B

1. Metrics module

  • 1.1 Add transport metrics contracts, snapshot models, and default JSON-plus-console reporting implementation in shared networking code.
  • 1.2 Ensure the metrics module aggregates one run of global and per-peer counters and finalizes idempotently.

2. KCP transport integration

  • 2.1 Extend KcpTransport with optional metrics-module injection and current-snapshot access without changing ITransport.
  • 2.2 Publish start, shutdown, session, payload, datagram, and error events from KcpTransport into the metrics module and finalize reports on Stop().

3. Verification

  • 3.1 Add edit-mode tests for metrics aggregation, peer isolation, and single-report shutdown behavior.
  • 3.2 Run the relevant network edit-mode test suite and confirm the new metrics behavior passes.