testprovider

package
v0.149.5 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package testprovider contains fake provider protocols for isolated acceptance tests.

Index

Constants

This section is empty.

Variables

View Source
var Codex string
View Source
var ScopedClaude string

Functions

func LogEggTails

func LogEggTails(t *testing.T, dirs ...string)

LogEggTails captures fixture evidence before cleanup can stop or reap eggs.

func ScopedHomeDirs added in v0.149.4

func ScopedHomeDirs(t *testing.T, scratch string) (home, localState, remoteState string)

ScopedHomeDirs keeps both wings' protected state under the provider's HOME write-deny root, alongside (not inside) its writable workspaces and TMPDIR. Reserve a one-byte state component before choosing the physical HOME name.

func ScopedHomePolicy added in v0.149.4

func ScopedHomePolicy(home string) *egg.EggConfig

ScopedHomePolicy retains the default sandbox and pins the clone-local HOME and its ancestors so a provider cannot rename the protected fixture tree.

func ShortStateDir added in v0.149.4

func ShortStateDir(t *testing.T, scratch string) string

ShortStateDir creates disposable clone-local state that fits Darwin's Unix socket limit with a full runtime ID. MkdirTemp's decimal suffix is too long in some checkout paths. A physical directory also keeps the control socket's canonical address local instead of relocating it to the host's /tmp.

func WaitParentMailboxExit

func WaitParentMailboxExit(ctx context.Context, mailbox, session string) error

WaitParentMailboxExit waits for the broker to observe the parent's egg exit, so survival assertions run after its mailbox cancellation, not just detach.

Types

type CompletionGate

type CompletionGate struct {
	// contains filtered or unexported fields
}

CompletionGate holds exactly one fake Codex turn in its granted workspace.

func NewCompletionGate

func NewCompletionGate(t *testing.T, workspace string) *CompletionGate

func (*CompletionGate) Release

func (g *CompletionGate) Release() error

func (*CompletionGate) WaitReady

func (g *CompletionGate) WaitReady(ctx context.Context) error

WaitReady waits for the fake's marker, published after UserPromptSubmit and opening its own FIFO. Unlike a shared writer open, this accounts for each fake.

Jump to

Keyboard shortcuts

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