EditSubject

org.llm4s.agent.testkit.FileBackendContract.EditSubject
final class EditSubject(val name: String, backend: FileBackend, val support: ReplaySupport, seed: (VPath, String) => Unit, read: VPath => Result[String], applied: () => Int) extends Subject

A ReplayContract.Subject over a file backend: slot n is the file /replay-<n>.txt, seeded x, and the effect is edit("x", "xy"), which shows a second application (xyy). seed writes a slot's file straight to the target, as setup and as another writer; observe reads it from the target; applied counts a transactional target's applied keys.

Attributes

Source
FileBackendContract.scala
Graph
Supertypes
trait Subject
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override 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

Definition Classes
Source
FileBackendContract.scala
def initial(slot: Int): String

What observe shows before the effect.

What observe shows before the effect.

Attributes

Source
FileBackendContract.scala
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

Source
FileBackendContract.scala
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

Source
FileBackendContract.scala
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

Source
FileBackendContract.scala
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

Source
FileBackendContract.scala

Inherited methods

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

Inherited from:
Subject
Source
ReplayContract.scala

Concrete fields

val name: String

Names the target in the suite's output.

Names the target in the suite's output.

Attributes

Source
FileBackendContract.scala

The support class this subject exercises.

The support class this subject exercises.

Attributes

Source
FileBackendContract.scala