Skip to content

M2: contract-test infrastructure consolidation — shared scaffold, single Support classes (R2-15) #34

Closed

Description

@Blind-Striker

From the second verified review of PR #26 (finding R2-15, CONFIRMED). Pure test-infrastructure hygiene; testing-style.md is the spec.

Finding. The M2 contract tests violate the repo's own testing-style rules: the Endpoint/CreateClient/JsonResponse scaffold is copy-pasted verbatim across three contract-test classes; identical wire literals repeat across test methods and files (the {"_tag":"UnknownError",...} and {"_tag":"SessionNotFoundError",...} bodies, the {"data":...} envelope wrapper 6+ times); FixtureLoader exists in Extensions.Tests as a namespace-only byte-copy of the Sdk.Tests one; RecordingHttpHandler exists there as a divergent same-named twin — drift already visible between the copies.

Shape of the fix: one shared contract-test scenario/support home per testing-style.md §1 (central scaffold, domain-aware helpers, wire bodies in fixtures or centralized constants); a single FixtureLoader/RecordingHttpHandler pair reachable from both test projects (shared source or a test-support project — pick whichever the csproj topology makes cleanest without weakening the IVT posture). Also add the missing object-envelope {"data":null} contract test the review verified as working-but-unobserved.

Trigger: the next breadth batch multiplies contract tests; consolidate before the third copy of the scaffold appears.

Milestone: M2 (lands as its own small PR right after PR #26 merges, before the next breadth batch opens).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentSpecified enough that the work is mechanical

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions