Subject

org.llm4s.agent.testkit.ReplayContract.Subject
trait Subject

An external target under test, in a state of its own: a fresh one per case. It performs effect slot (0 or 1) on a part of the target of its own - a file each, a store key each - through the target's own guarded code path, as a tool or hook of the harness would.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def initial(slot: Int): String

What observe shows before the effect.

What observe shows before the effect.

Attributes

def interfere(slot: Int): Unit

Changes slot slot's part of the target as another thread would.

Changes slot slot's part of the target as another thread would.

Attributes

def name: String

Names the target in the suite's output.

Names the target in the suite's output.

Attributes

def observe(slot: Int): Result[String]

The observable state of slot slot's part of the target.

The observable state of slot slot's part of the target.

Attributes

def once(slot: Int): String

What observe shows once the effect has been applied exactly once.

What observe shows once the effect has been applied exactly once.

Attributes

def perform(context: RunContext, slot: Int): Result[Value]

Performs effect slot under context through the target's guarded code path - building its key with context.effectKey - and returns its outcome as JSON, or the guard's Left.

Performs effect slot under context through the target's guarded code path - building its key with context.effectKey - and returns its outcome as JSON, or the guard's Left.

Attributes

The support class this subject exercises.

The support class this subject exercises.

Attributes

Concrete methods

def appliedKeys: Int

How many applied keys a Transactional target still holds; 0 for other targets.

How many applied keys a Transactional target still holds; 0 for other targets.

Attributes

def idempotent: Boolean

Whether the effect may run again (the tool's ToolHints.idempotent); only Unverifiable reads it.

Whether the effect may run again (the tool's ToolHints.idempotent); only Unverifiable reads it.

Attributes