contracttest

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package contracttest provides shared assertions for Harness adapter tests. Fixtures may use controlled native transports or real providers; the caller must state which. A controlled transport is not live native qualification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TextLifecycle

func TextLifecycle(t *testing.T, fixture TextFixture)

TextLifecycle verifies ordinary reuse, exact Turn ownership, durable active input, confirmed cancellation and continuation of a healthy Executor. It asks for no optional tools, images, interactions, workspace or detailed Usage. Native fault injection and history recovery have separate adapter tests.

Types

type TextFixture

type TextFixture struct {
	Executor                                  agent.Executor
	CompleteInput, ActiveInput, SteeringInput proto.MessageInput
	Ready                                     func(proto.Envelope) bool
	NativeOwner                               func() string
}

TextFixture supplies a prepared Executor and deterministic native inputs. CompleteInput finishes normally; ActiveInput emits a Ready observation and stays active for steering and cancellation. NativeOwner observes the adapter's retained native owner: a native Session, reusable SDK Query or owned process, as appropriate for that adapter. It must not report just the Go wrapper. This does not require every Harness to retain one process or one transport; native per-Turn transports may change while their Session owner remains the same. Neither callback may start, finish or replace a Turn on behalf of the adapter.

Jump to

Keyboard shortcuts

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