conformance

package
v0.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package conformance is the contract suite for people WRITING an elelem.Driver. Run checks an implementation against the behaviour the engine relies on: cancellation, local transcript validation, delta order, usage invariants, normalized finish reasons, and that every advertised capability is actually enforced rather than merely claimed.

It is a subpackage rather than part of elelemtest because it imports `testing` and testify. elelemtest itself is reachable from production code (the app resolves every upstream to the scripted driver under `go test`), and a package that imports elelemtest must not drag the test framework into the shipped binary.

For the doubles rather than the contract — a scripted Driver, or a generated mock — see elelemtest and elelemtest/mocks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(
	t *testing.T,
	newDriver func() elelem.Driver,
	options Options,
)

Run checks the provider-neutral behavior required by elelem's engine. The supplied endpoint must return a valid stream for repeated calls.

Types

type Options

type Options struct {
	Request        elelem.DriverRequest
	SkipListModels bool
	NetworkCalls   func() int64

	// Models re-runs the capability contract against each of these in place of
	// Request.Model. Capabilities is a PER-MODEL function, so a suite pinned to
	// one model cannot see a driver that gates correctly for the model it was
	// handed and wrongly for its siblings — which is exactly where the real
	// bugs live. Leave empty to check Request.Model alone.
	Models []elelem.Model
}

Options configures Run for a driver's fake provider endpoint.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL