The loop guard
A flush may run at most MAX_FLUSH_PASSES = 1000 passes.
A flush may run at most MAX_FLUSH_PASSES = 1000 passes. An effect that rewrites its own source on every run is stopped at the 1000th pass: the queues are cleared and a ShadowError with code INFINITE_LOOP is raised once the flush ends. The graph stays usable.
ShadowError is exported by @shadow-js/core/extend. The full text of the diagnostic is in the diagnostics reference.