conformance

package
v0.1.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package conformance defines advertised-capability-only checks for backend plugins. Cases exercise public SDK contracts only and never require provider network access.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EconomicV2Fixture

type EconomicV2Fixture struct {
	Name     string
	Evidence backendplugin.AccountingEvidenceV2
}

EconomicV2Fixture is an intentionally small connector-family fixture. The public accessor lets connector modules reuse the same evidence cases while keeping provider-shaped decoding outside the shared TCK.

func EconomicV2Fixtures

func EconomicV2Fixtures() []EconomicV2Fixture

EconomicV2Fixtures returns deep-copied synthetic image/audio/video and account-window evidence for connector-level conformance tests.

func (EconomicV2Fixture) Validate

func (f EconomicV2Fixture) Validate() error

Validate checks the fixture label and its bounded canonical payload.

type Options

type Options struct {
	ConfigYAML []byte
	// FactoryKind selects which advertised factory to configure when a plugin
	// exports more than one kind. Empty uses Factories[0].
	FactoryKind string
	// SampleModel overrides the model id used in execute sample invocations.
	SampleModel string
	// DisableUsageRequirement skips the EventUsageDelta execute proof.
	DisableUsageRequirement bool
	// VisionInputOnly treats Vision as input capability: profile honesty still
	// applies, but execute need not emit assistant_image_ref.
	VisionInputOnly bool
	// SkipExecute skips execute.one_terminal_ordering (use only with a separate
	// stream proof suite in the connector module).
	SkipExecute bool
}

Options customizes Run for connectors that need non-default configure YAML or protocol-honest execute proofs (for example ACP adapters without usage events, or vision advertised as input-only).

type Report

type Report struct {
	Results []Result
}

Report aggregates conformance results.

func Run

Run executes the advertised-capability conformance suite against svc with default fake-plugin configure YAML and strict execute proofs.

func RunWith

func RunWith(ctx context.Context, svc backendplugin.Service, opts Options) Report

RunWith executes the suite with connector-specific options.

func (Report) Failures

func (r Report) Failures() []string

Failures returns failed case names.

func (Report) Ok

func (r Report) Ok() bool

Ok reports whether every case passed.

type Result

type Result struct {
	Name   string
	Passed bool
	Detail string
	Stable string
}

Result is one case outcome.

func RunBrokenMode

func RunBrokenMode(ctx context.Context, svc backendplugin.Service, wantCode string) Result

RunBrokenMode checks that a broken fake mode fails with an exact ModeError.Code.

func RunSlowModeDeadline

func RunSlowModeDeadline(ctx context.Context, svc backendplugin.Service, wantCode string, deadline time.Duration) Result

RunSlowModeDeadline verifies ModeSlowOutput fails with DiagSlowOutput under a short deadline.

Jump to

Keyboard shortcuts

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