Skip to content

[$50 BOUNTY] [Rust] Add protocol frame codec recovery tests #2

Description

@Peter7896

Bounty: $50 (LT)

Area: backend/src/protocol/, backend/src/protocol/frame*, backend/src/protocol/validate*

Current state: Protocol validation has focused coverage, but the frame codec and decoder recovery boundaries need deterministic regression tests for malformed input and recovery after failed frames.

What's needed: Add Rust tests or helpers that validate protocol frame decode errors, state preservation, and recovery without requiring live services.

Acceptance criteria:

  • Reject truncated headers, truncated payloads, and invalid frame lengths without panicking.
  • Reject invalid reserved bytes or checksum-style integrity mismatches with clear errors.
  • Assert a failed decode does not corrupt decoder state or accepted frame counters.
  • Confirm a valid frame after invalid input can still be decoded successfully.
  • Keep the tests deterministic and runnable on Windows and Unix-like hosts.

Required validation:

  • Run cargo test --lib where the Rust toolchain is available
  • Run python3 build.py
  • Include the generated diagnostic .logd artifact from diagnostic/build-XXX.logd; also include diagnostic/build-XXX.json if present
  • Use .github/pull_request_template.md for your submission

Tracker note: This issue is opened for the upstream LT bounty tracker; bounty eligibility and payout are determined by upstream review, merge, and tracker rules.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions