fabro/docs/public/reference
Bryan Helmkamp 8d14b54994
Bound for_each fan-out memory
Addresses a Copilot review comment on #653.

The source array is runtime data, usually produced by a model, so its
length is not something a workflow author reviewed. Two changes, so an
over-long array degrades into a clear error rather than memory pressure.

Cap the item count at 1000. Above that the stage fails deterministically
before `parallel.started`, alongside the other for_each contract
violations, and the message says how to reduce the array.

Fork the parent context inside the branch task, after it acquires a
`max_parallel` slot, instead of at dispatch time. Live context copies now
track `max_parallel` rather than item count. Only the branch's own
preamble entry is moved into the task, so the shared stash is not cloned
per branch either.

The reviewer also suggested replacing spawn-all with `max_parallel`
workers pulling from a queue. Not done here: with the fork deferred, a
pending task holds little beyond its item, and reshaping the dispatch
loop would change cancellation and scope-reservation ordering, which
deserves its own review.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 20:16:20 -04:00
..
acknowledgements.mdx refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
architecture.mdx docs: add child runs guide 2026-05-25 15:43:53 -04:00
cli.mdx Add fabro variable CLI namespace for server-managed variables (#434) 2026-05-27 13:57:25 -04:00
dot-language.mdx Bound for_each fan-out memory 2026-07-28 20:16:20 -04:00
run-directory.mdx refactor(workflow): remove retro stage (#230) 2026-05-09 10:18:20 -04:00
sdk.mdx Merge origin/main into refactor/remove-env-interpolation 2026-07-28 18:31:16 -04:00
server-operations.mdx refactor: rationalize server secret scopes (vault-only for optional int… (#401) 2026-05-25 17:26:01 -04:00
shell-completions.mdx refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
user-configuration.mdx Merge origin/main into refactor/remove-env-interpolation 2026-07-28 18:31:16 -04:00
verifying-releases.mdx refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00