WarpLazyFetch

constructor(creel: Creel, runtime: WasmRuntime, opToBobbin: (OpId) -> BobbinHash?, fetchTimeout: Duration = 30.seconds)

Parameters

creel

The local content-addressed byte cache.

runtime

The caller-owned sandbox that compiles WASM bytes into a runnable Op; the caller retains ownership and must close() it (see above).

opToBobbin

Maps a missing OpId to the BobbinHash that holds its WASM bytes, or null if the op is not backed by a fetchable bobbin.

fetchTimeout

Upper bound on a single lazy fetch. A fetch suspends until some peer serves the bytes; if none does within this window the us.tractat.kuilt.warp.WarpNode treats it as transient — it stands the task by (unclaims it, records no result) so anti-entropy re-evaluates on a later cycle, rather than hanging forever holding the claim. A timeout is never terminal: an absent bobbin may simply be in flight from a peer that has not finished joining. The default (30 s) sits well above the per-op execution timeout (1 s) and the claim settle window (500 ms) so a transiently-slow holder is not abandoned prematurely, yet well below any horizon at which a permanently-missing bobbin should keep a task claimed. Drives kotlinx.coroutines.withTimeoutOrNull, so it honours virtual time.