Test layering policy Unit tests Purpose: verify individual functions and invariants in isolation. - Data-driven : parameterized tables covering happy path, boundary, error, and edge cases. - Property-based : fuzz invariants that must hold across all inputs (e.g., idempotency, sort stability, roundtrip serialization). - Derive cases from the module's public API surface: input types/constraints, output shape, error modes, invariants. Integration / contract tests Purpose: verify interactions between components and external services. - API envelope : request/response shape, status codes, content…