Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.09 KB

File metadata and controls

53 lines (39 loc) · 2.09 KB

TypeFerence conformance suite

Language-neutral fixtures that every conforming implementation must compile to byte-identical artifacts. This suite is what makes the specification real: the C# reference implementation and the Go implementation both run it in CI, and a digest mismatch on any fixture is a broken build.

Layout

conformance/fixtures/<NNN-name>/
  manifest.json      what to build and what to expect
  source/            the TypeFerence source tree for the fixture
  signatures.json    (only for signing fixtures; deliberately outside source/)

manifest.json fields:

Field Meaning
description What the fixture exercises.
expect success or error. Error fixtures must fail compilation in every implementation; the diagnostic text is not part of the contract (see ADR-0005).
emitArd Optional ARD publisher domain; presence enables --emit-ard.
trustSignatures Optional signature map path relative to the fixture directory.
allowUnsignedTrust Optional; enables the unsigned-staging escape hatch.
digests For success fixtures: the expected typeference-directory-v1 digest of each emitted top-level target directory (neutral, codex, copilot, cursor, ard).

All fixtures build with --target all.

Running

  • Go implementation: cd go && go test ./conformance
  • Reference implementation: dotnet test --filter FullyQualifiedName~ConformanceSuiteTests
  • Both: make conformance

Updating expectations

Digests are generated by the Go runner and independently verified by the C# runner — a manifest can only be green when both implementations agree:

cd go && go test ./conformance -run TestConformance -update
dotnet test TypeFerence.slnx --filter FullyQualifiedName~ConformanceSuiteTests

Never hand-edit a digest. If a digest changes, either the spec changed (requires an ADR) or an implementation broke.

Byte fidelity

conformance/.gitattributes disables git newline conversion beneath fixtures/: several fixtures pin CRLF, missing-trailing-newline, and BOM handling, and would be destroyed by autocrlf.