fabro/docs/internal
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
..
assets/brand docs: move published docs under docs/public 2026-04-26 21:19:46 -04:00
demo Shared-checkout parallel execution (recovered from run 01KY7YH7RYCJ1BDVTTP96ZA4HV) 2026-07-24 06:19:11 -04:00
licenses docs: move published docs under docs/public 2026-04-26 21:19:46 -04:00
product docs(secrets): document settings-declared credentials, fix stale local-run guidance 2026-07-25 09:04:59 -04:00
cargo-target-apfs-churn-plan.md docs: commit plan 2026-04-28 09:46:52 -07:00
cli-workflow-coupling-audit.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
error-handling-strategy.md docs: clarify chain-rendering boundary in error strategy 2026-05-04 11:28:28 -04:00
event-schema-competitive-analysis.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
events-strategy.md feat(web): add server-managed Environments CRUD settings UI (#462) 2026-06-13 08:44:38 -04:00
events.md fix(workflow): make publish failures terminal 2026-07-27 11:25:18 -04:00
fabro-event-schema-v2-concrete-shape.md docs(events): remove events that are never serialized 2026-07-24 21:56:54 -04:00
fabro-event-schema-v2-proposal.md feat(events): make inference in-flight state observable 2026-07-24 21:47:51 -04:00
llm-client-resolution.md docs(llm): finish configurable provider cleanup (#260) 2026-05-13 17:17:54 -04:00
logging-strategy.md feat(web): add server-managed Environments CRUD settings UI (#462) 2026-06-13 08:44:38 -04:00
mcp-server-qa-test-plan.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
migrations-strategy.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
panic-policy.md chore: add panic policy 2026-05-26 22:04:04 -04:00
parallel-strategy.md Bound for_each fan-out memory 2026-07-28 20:16:20 -04:00
plan-events-as-source-of-truth-follow-ups.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
plan-events-as-source-of-truth.md Make git metadata sandbox-native 2026-04-27 21:43:15 -07:00
react-effects-policy.md docs: add React effects policy (#419) 2026-05-26 19:30:02 -04:00
run-directory-keys.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
server-secrets-strategy.md docs(secrets): document settings-declared credentials, fix stale local-run guidance 2026-07-25 09:04:59 -04:00
slow-test-opportunities-2026-04-07.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
testing-strategy.md refactor: organize crates into three layers 2026-07-23 17:59:34 -04:00
updating-web-screenshots.md refactor(workflow): remove retro stage (#230) 2026-05-09 10:18:20 -04:00