testfixture

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Command sdk-fixture is a minimal SDK-based extension for integration testing. Unlike testdata/fixture-ext/ (raw protocol), this uses the Go SDK to verify the SDK→Host wire format round-trip end-to-end.

The wire format mismatch bug (schema vs parameters, []string vs []HandlerDecl) was only caught in production because no integration test exercised the real SDK path. This fixture exists to close that gap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extension

func Extension() *sdk.Extension

Extension returns the canonical Go SDK fixture shared by subprocess and fused conformance harnesses.

func ModelCall

func ModelCall() *sdk.Extension

ModelCall registers /model-call, which makes one model call through the host for the provider named in its arguments. Every SDK's model calls are host calls, so the request the provider receives is PiG's own.

func ProviderDiag

func ProviderDiag() *sdk.Extension

ProviderDiag registers, while it loads, one provider the model runtime accepts and one it rejects (a model with no "api"), and a tool that shows the extension loaded. Pi queues both registrations; the services that apply them report the rejected one as a diagnostic and the extension stays loaded (TestProviderRegistrationFailureIsADiagnosticAcrossSDKs).

func ProviderProducer

func ProviderProducer() *sdk.Extension

ProviderProducer is shared by isolated, packed and fused Go provider-stream tests.

func ReferenceToolSchemaRejected

func ReferenceToolSchemaRejected() bool

func RejectInvalidToolSchema

func RejectInvalidToolSchema(ext *sdk.Extension) (rejected bool)

Types

This section is empty.

Directories

Path Synopsis
Package childsession is the Go SDK extension of the child agent session conformance rows: it creates a session over the host's model runtime with a custom tool, subscribes, prompts, reads the transcript and state back and disposes.
Package childsession is the Go SDK extension of the child agent session conformance rows: it creates a session over the host's model runtime with a custom tool, subscribes, prompts, reads the transcript and state back and disposes.
Command sdk-fixture runs the canonical Go SDK conformance extension over a subprocess socket.
Command sdk-fixture runs the canonical Go SDK conformance extension over a subprocess socket.
Package earlydispatch is the Go SDK extension of the pre-ready dispatch row (early_dispatch_conformance_test.go): one listener that echoes the payload it was dispatched, so a host that scripts the wire can tell which request each handler served.
Package earlydispatch is the Go SDK extension of the pre-ready dispatch row (early_dispatch_conformance_test.go): one listener that echoes the payload it was dispatched, so a host that scripts the wire can tell which request each handler served.
cmd command
Command early-dispatch runs the pre-ready dispatch row's Go extension over a subprocess socket.
Command early-dispatch runs the pre-ready dispatch row's Go extension over a subprocess socket.
Package extensionapi is the Go SDK extension of the Pi 0.99.1 extension API conformance rows.
Package extensionapi is the Go SDK extension of the Pi 0.99.1 extension API conformance rows.
Package modeltypes is the Go SDK extension of the typed model operation conformance rows: ctx.modelRegistry's typed reads, getAvailableOfType, classify and registerVirtualModel, and the image and classifier implementations of a provider config and of a Provider object.
Package modeltypes is the Go SDK extension of the typed model operation conformance rows: ctx.modelRegistry's typed reads, getAvailableOfType, classify and registerVirtualModel, and the image and classifier implementations of a provider config and of a Provider object.
Package nestedevents is the Go SDK extension of the nested-event conformance row (TestRPCNestedEventsCompleteInEverySDK): one command sends a triggering message while a before_agent_start handler is subscribed, and one appends an entry and then names the session while a session_info_changed handler is subscribed.
Package nestedevents is the Go SDK extension of the nested-event conformance row (TestRPCNestedEventsCompleteInEverySDK): one command sends a triggering message while a before_agent_start handler is subscribed, and one appends an entry and then names the session while a session_info_changed handler is subscribed.
cmd command
Command nested-events runs the nested-event conformance row's Go extension as a standalone executable, so the host gives it its own isolated process.
Command nested-events runs the nested-event conformance row's Go extension as a standalone executable, so the host gives it its own isolated process.
pig command
Command nested-events-pig is pig with the nested-event conformance row's Go extension fused in, as a Piglet Binary fuses one (fusepack.Register): the host serves the extension named nested-go-fused in this process instead of building it.
Command nested-events-pig is pig with the nested-event conformance row's Go extension fused in, as a Piglet Binary fuses one (fusepack.Register): the host serves the extension named nested-go-fused in this process instead of building it.
Package sessiongraph is the Go SDK extension of the session graph conformance rows (session_graph_test.go): Pi's SessionManager constructors, listing and log methods as an extension builds them.
Package sessiongraph is the Go SDK extension of the session graph conformance rows (session_graph_test.go): Pi's SessionManager constructors, listing and log methods as an extension builds them.

Jump to

Keyboard shortcuts

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