Skip to content

switchyard_route: raise unit-test coverage to CI floor #21

Description

@yehuditkerido

Context

Parent: #2 · POC: #16

make coverage-check requires 90% lines / 80% regions workspace-wide. After #16, most of switchyard_route.rs is untested; config parse tests alone are not enough for the floor.

Goal

Bring praxis-experimental-filters (especially switchyard_route) up so make coverage-check passes without weakening the floor.

Proposed work

  • Unit-test pure helpers first: judge URL parse, model rewrite, tier mapping, config edge cases, failure-mode handling.
  • Add focused tests around route error paths (bad JSON, unsupported path, judge non-2xx) with mocks where needed.
  • Prefer small testable extractions over a large HTTP integration harness if that gets coverage faster.

Notes

  • Tests inside src/ count toward the PR size gate; consider a dedicated follow-up PR and/or skip/pr-conventions if needed.
  • Demo scripts do not count for llvm-cov.

Acceptance criteria

  • make coverage-check green on the branch.
  • Meaningful assertions on success and failure paths (not only “code ran”).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions