fabro/docs/public
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
..
administration Merge origin/main into refactor/remove-env-interpolation 2026-07-28 18:31:16 -04:00
agents docs: clarify hook variable sensitivity 2026-07-28 18:04:54 -04:00
api-reference Merge remote-tracking branch 'origin/main' into feat/for-each-item-injection 2026-07-28 20:03:25 -04:00
changelog fix(glob): harden artifact traversal 2026-07-25 11:56:57 -04:00
core-concepts Merge origin/main into refactor/remove-env-interpolation 2026-07-28 18:31:16 -04:00
examples Merge branch 'main' into feat/shared-checkout-parallel 2026-07-24 06:29:57 -04:00
execution Merge remote-tracking branch 'origin/main' into feat/for-each-item-injection 2026-07-28 20:03:25 -04:00
getting-started refactor: rationalize server secret scopes (vault-only for optional int… (#401) 2026-05-25 17:26:01 -04:00
human-tools fix(config): disable Slack unless configured 2026-06-02 18:41:36 -04:00
images Add system resources settings page (#328) 2026-05-20 17:22:53 -04:00
integrations Merge origin/main into refactor/remove-env-interpolation 2026-07-28 18:31:16 -04:00
languages refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
logo refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
reference Bound for_each fan-out memory 2026-07-28 20:16:20 -04:00
tutorials Use untrusted item fence format 2026-07-27 12:13:29 -04:00
workflows Bound for_each fan-out memory 2026-07-28 20:16:20 -04:00
.mintignore refactor(docs): move .mintignore into docs/public and update skill paths 2026-04-27 07:29:59 -07:00
docs.json Add Modal LLM provider 2026-07-28 16:02:57 -04:00
dot-highlight.js refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00
favicon.svg refactor(docs): split docs/ into public/ and internal/ 2026-04-27 07:21:13 -07:00