Skip to content

Add unit tests for transport layer #16

@jserv

Description

@jserv

Summary

transport.rs (~320 LOC) and types.rs (~350 LOC) have zero unit tests.

Coverage needed

  • read_bounded_line(): UTF-8 boundary at MAX_LINE_BYTES, EOF, empty lines, >4 MiB line drain behavior.
  • send(): writer failure propagation, partial write recovery.
  • types.rs serde round-trips: RequestId (Int/String), JsonRpcError, ClientCapabilities with missing/extra fields.
  • Gate: ≥8 read_bounded_line tests + ≥4 serde round-trips.

Notes

Prerequisite for the invalid UTF-8 rejection fix. Extend later for buffer-reuse changes in the transport decode optimization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions