Skip to main content

Crate jesterky_actor

Crate jesterky_actor 

Source
Expand description

jesterky-actor — the host-side SDK: reference implementations of the seam traits plus test doubles. Real hosts (Stack, Cloud) implement Actor / Resource with actual model/env backends; this crate gives you in-memory and replay implementations for tests, the CLI, and M1’s fake-actor demo.

The centerpiece is ReplayActor: it implements the SAME Actor trait as a live model host, but answers from a recorded RunManifest. That one type is the proof that the seam (ADR #6) supports both live execution and replay (ADR #7) with zero change to the core.

Modules§

viz
Terminal rendering for jesterky runs.

Structs§

FakeActor
A trivial actor for tests / the M1 fake-actor demo: echoes inputs as outputs. Swap this for a real model host to go from “runs the topology” to “runs the real workload” (M1 → M2).
MemArtifactStore
In-memory artifact store for tests.
MemCheckpointStore
In-memory checkpoint store for tests.
MemEventSink
In-memory event sink for tests and the CLI. A real host forwards to file/redis and buffers.
NdjsonEventSink
Host-side NDJSON event sink. It writes events as they arrive and also keeps a memory snapshot so a manifest can compare against the emitted line set.
ReplayActor
Replays recorded actor outputs by Addr (ADR #7). Live orchestration + this actor ⇒ a byte-identical event stream, which is the core acceptance invariant (“replay fidelity”).
ReplayClock
Deterministic replay clock: a monotonic counter (timestamps are metadata only — ADR #5 — so replay need not reproduce wall times).
ReplayResource
Replays recorded env observe/step results by Addr — the resource counterpart to ReplayActor, so a whole stateful workload (DungeonGrid) replays without a live env. observe and step share the recorded stream; the Addr disambiguates which call this is.
SharedEventSink
Cloneable event sink for live terminal follow: the runner emits into it while a side thread snapshots events for in-place redraw.
SystemClock
System wall-clock (host-side — the core never calls this directly). A ReplayClock returning recorded timestamps is the replay counterpart.
TeeEventSink
Fan events out to several sinks while keeping a stable manifest snapshot from the first sink. Hosts use this to combine a durable collector with live follow / file streaming sinks without making the runner dual-write.