Add local runtime effect draining

This commit is contained in:
Michael Mikovsky
2026-05-09 12:59:07 -06:00
parent 4e3f975b54
commit fcde5d66d2
3 changed files with 173 additions and 0 deletions
+3
View File
@@ -144,6 +144,8 @@ Primary operations:
impl<T: Transport> NodeRuntime<T> {
pub fn tick(&mut self, budget: TickBudget) -> Result<TickOutcome, NodeRuntimeError<T::Error>>;
pub fn drain_local_effects(&mut self) -> impl Iterator<Item = RuntimeEffect>;
pub fn receive_frame(
&mut self,
connection: ConnectionId,
@@ -168,6 +170,7 @@ Rules:
- Callers never pass `Ingress` into `NodeRuntime`.
- Runtime counts per-tick progress, not retained backlog.
- Local events should be dispatched to leaves, not retained forever.
- Until leaf dispatch exists, callers may drain local/dropped effects; outbound sends remain runtime-owned.
- Send failures must not drop unrelated queued effects.
## Leaf API