WarpNode
Parameters
This peer's identifier on the seam.
The multi-peer session. WarpNode takes sole ownership of Seam.incoming by collecting it once and fanning every frame to rawIncoming.
A Flow of the current live peer set, used to rebuild the hash ring on membership change. Use Seam.rosterSnapshot for eventual consistency or RaftNode.rosterSnapshot for strong consistency backed by Raft membership.
Coroutine scope for background collection jobs. Required — no default.
QuilterConfig for both internal Quilters. Defaults to the QuilterConfig production defaults. Pass a short-cadence config in tests that need fast anti-entropy.
Provides the current Instant for per-peer HeartbeatPartitionDetectors. Required — never kotlin.time.Clock.System by default. Production callers use { Clock.System.now() }; tests inject a fixed or virtual clock so liveness timeouts are deterministic.
Timing for per-peer heartbeat ping/pong. A tuning parameter — defaults to HeartbeatConfig production defaults (5 s interval, 15 s timeout, 60 s reconnect window). Tests typically inject a short-cadence config.
How owned tasks are claimed. ClaimStrategy.Ring is pure consistent-hash assignment; ClaimStrategy.RingWithIntent adds the intent-register safety net. Defaults to ClaimStrategy.RingWithIntent.
The local op registry that maps symbolic OpIds to their Op implementations. A claiming peer resolves the TaskDescriptor.op here and runs its own registered copy — the function never travels; only the name does. An op absent from the registry leaves the task unclaimed and pending (the "bobbin not loaded yet" state — warp slices C4/C5 will service it via lazy-fetch; see TaskDescriptor).
Suspending function for CoordinationKind.Coordinated tasks. Invoked from the committed-log listener (onCoordinatedCommit) on the current Raft leader, not inline after propose() — and only after the leader passes the RaftNode.readIndex quorum fence, so a deposed-but-unaware leader never fires it. coordinatedApplied plus the replicated queue/results gates prevent re-invocation when two entries for the same task both committed (churn double-propose or a re-drive racing the original entry). The one residual window is a leader deposed while this function is mid-flight — the next leader's re-drive may then run the task again; see the class-level guarantee note. Defaults to an explicit error so a caller who provides a raftNode but forgets to supply an executor surfaces the omission immediately rather than silently doing nothing.
RaftNode backing the CoordinationKind.Coordinated execution path. When supplied, the ring owner proposes the task to this Raft cluster for total-order delivery. Execution then fires from raftNode.committed on the Raft leader's WarpNode, fenced by RaftNode.readIndex and backstopped by leadership-acquisition re-drive of stranded queue entries — exactly-once under leadership failover and warp-roster churn (see the class-level guarantee note for the one mid-execution-deposition residual).
Required for coordinated tasks. If null, calling enqueue with CoordinationKind.Coordinated throws IllegalStateException immediately — fail-loud, never a silent downgrade to the ring path. Pass a us.tractat.kuilt.raft.test.FakeRaftNode from :kuilt-raft-test configured as us.tractat.kuilt.raft.RaftRole.Leader for unit tests, or use us.tractat.kuilt.raft.test.MultiNodeRaftSim with real nodes for consensus-correct cluster tests.
The all-or-nothing lazy-code-mobility bundle (Creel + WasmRuntime + opToBobbin). When null (a symbolic-only node), an op missing from registry leaves the task pending ("bobbin not loaded yet") and anti-entropy re-evaluates — today's behavior. When non-null, an unresolved op is fetched via a node-owned BobbinExchange over a reserved mux channel, loaded via WasmRuntime, registered for reuse, and run. A verified-but-broken kernel (load or run failure) records a terminal-error OpResult rather than retrying forever.
This peer's compilation Target. When non-null and a lazyFetch is present, a bobbin-backed op resolves the best compiled variant for this target per execution and tiers up when one gossips in (counted in executionsCompiled). When null, resolution is exactly the C5b lazy-fetch behaviour (no tiering). Required to be explicit — a platform's target is never guessed.
Opaque gate consulted on the free (CoordinationKind.Free) path immediately before a resolved op runs (see executeViaRegistry). AdmissionControl.admit returning null defers the task — it is unclaimed and retried on a later cycle, never dropped; a returned AdmissionTicket admits it and its AdmissionTicket.settle fires once the task completes. Defaults to AdmissionControl.OPEN, which admits everything with a no-op ticket, so an un-gated node behaves bit-for-bit as before. The :kuilt-warp-heddle satellite supplies a weighted fair-share implementation keyed on TaskDescriptor.lane; warp core references no such type.
How long a peer's advertised CapSet stays live on this node after it was last received, aged out by local receive time (never cross-peer wall-clock). A slot that stops refreshing expires after this window so a crashed peer's stale capability stops steering placement (H8, design §14.6). Re-advertise via advertiseCapabilities periodically to keep a slot live. A pure TTL tuning knob; the empty default view leaves placement over the whole roster (today's behaviour) until the first advertisement.