Skip to content

[13] feat(contracts): match TypeScript and CSharp HTTP contracts #20

Description

@fernandofielmann

Goal

Relate named request and response types across already-matched TypeScript HTTP callers and C# endpoints.

Scope

  • Run after HTTP route matching; analyze only routes shared by HTTP_CALLS and HANDLES/DATA_FLOWS.
  • Extract named request-body and response types from TypeScript callers/wrappers and ASP.NET actions.
  • Emit MATCHES_CONTRACT with direction: request|response and supporting route/type evidence.
  • Resolve types through imports, aliases, generics, and project references only when unambiguous.
  • Do not use global name similarity as a matching strategy.
  • Omit any, unknown, anonymous object types, dynamic payloads, and ambiguous endpoints.

Dependencies

Acceptance criteria

  • Named request and response contracts match only through an already-linked HTTP route.
  • Direction and evidence are queryable on every MATCHES_CONTRACT edge.
  • Generic collections/wrappers preserve their named element/result type where resolvable.
  • Same-name unrelated types do not match without shared route evidence.
  • Ambiguous overloads/endpoints do not create guessed contract links.
  • Sequential and parallel pipelines produce equivalent results.
  • MCP schema, graph contracts, and README document contract matching.

Validation

  • Add request/response, generic wrapper, alias, ambiguity, anonymous/any, false-name-match, and parity fixtures.
  • Run extraction, route, convergence, and edge suites, lint-ci, and scripts/test.sh.
  • Preserve the existing Angular-to-ASP.NET route baseline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions