fabro/lib
Bryan Helmkamp f6932529fa
Let a node execute max_visits times before the cycle guard fires
The executor incremented a node's visit count on entry and refused the
visit once the count reached the limit, so a node with max_visits=N
executed at most N-1 times. The documented contract in
stages-and-nodes.mdx is "Max times this node can execute in a run",
and both published examples describe bounded retry loops under that
reading. A graph with max_visits=2 on a designed
one-correction loop therefore failed as "stuck in a cycle" before the
correction could run.

Check the completed-visit count before entry instead: a node with
max_visits=N now executes exactly N times, and the refused entry is
not reported as a visit, so the error's count names the executions
that actually happened. Also correct the nlspec example prose, which
claimed the workflow "moves on with the best result" at the limit;
exceeding max_visits fails the run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 21:01:53 -04:00
..
apps Merge remote-tracking branch 'origin/main' into feat/async-pr-create 2026-08-04 15:04:24 -04:00
components Merge remote-tracking branch 'origin/main' into feat/async-pr-create 2026-08-04 15:04:24 -04:00
foundation Let a node execute max_visits times before the cycle guard fires 2026-08-05 21:01:53 -04:00
packages/fabro-api-client Merge remote-tracking branch 'origin/main' into feat/async-pr-create 2026-08-04 15:04:24 -04:00