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, 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.