fabro/lib/foundation
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
..
build-support refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-api Merge remote-tracking branch 'origin/main' into feat/async-pr-create 2026-08-04 15:04:24 -04:00
fabro-auth fix(model): prefer MOONSHOT_API_KEY 2026-07-31 09:14:58 -04:00
fabro-client Merge remote-tracking branch 'origin/main' into feat/async-pr-create 2026-08-04 15:04:24 -04:00
fabro-config Merge pull request #676 from fabro-sh/remove-run-agent-permissions 2026-08-01 10:18:45 -04:00
fabro-core Let a node execute max_visits times before the cycle guard fires 2026-08-05 21:01:53 -04:00
fabro-db refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-dev Merge pull request #676 from fabro-sh/remove-run-agent-permissions 2026-08-01 10:18:45 -04:00
fabro-http refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-macros refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-model Merge pull request #725 from fabro-sh/codex/fireworks-kimi-k3-fast 2026-08-04 14:03:23 -04:00
fabro-oauth refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-options-metadata refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-proc refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-redact refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-static Merge remote-tracking branch 'origin/main' into fix/modal-provider-catalog 2026-08-01 09:32:19 -04:00
fabro-telemetry refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-template fix(workflow): harden script value interpolation 2026-07-28 17:21:35 -04:00
fabro-test refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
fabro-types Merge remote-tracking branch 'origin/main' into feat/async-pr-create 2026-08-04 15:04:24 -04:00
fabro-util Neutralize runtime for_each labels before display 2026-07-28 19:52:59 -04:00
fabro-vault refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00