ReactiveDag.Node.Feedback (reactive_dag v0.17.0-rc.65)

Copy Markdown View Source

A by-name FEEDBACK input edge (feedback :scheduled_meetings): a declared back-edge, closing a loop that is real in the graph but never real in TIME.

The motivating shape: a board's minutes contain the calendar for the year ahead, so future meetings are DERIVED from past meetings — and a scheduled meeting IS a meeting, same table, same identity. The graph flattens time away, which is the only reason that looks circular; a resolution passed at meeting M can only ever schedule meetings strictly after M.

A feedback edge is a real input in every way but one: it is validated, it is read at recompute, and a change on it PROPAGATES (contrast context, which never propagates). The one thing it does not do is order this node — ReactiveDag.Graph excludes it from depth, because the target is derived from this node and counting the edge would make the node's depth depend on itself. An undeclared back-edge still fails assembly with "cycle at cell".

Termination around the loop rests on honest change reporting — a recompute reporting no change propagates nothing — plus two bounds the cascade enforces for cells reached through a feedback edge: a per-(edge, key) crossing budget within one cascade, and a durable lap count on suspensions so a loop through a suspends cell cannot oscillate across resumption jobs unobserved. See ReactiveDag.Cascade.