{"id":"241deb5f-d7f9-45ad-b8e1-6392ac15090c","task":"Build a Metaflow flow that fans out with a foreach over a list and joins results back together","domain":"docs.metaflow.org","steps":["Define a FlowSpec with mandatory `start` and `end` steps","In `start`, assign a list to an instance variable and call `self.next(self.<step>, foreach='<list_attr>')`","In the foreach step, access the per-task item via `self.input`","Implement a `join(self, inputs)` step that takes `inputs` and aggregates results (e.g. a list comprehension over `inputs`)","Run the flow with `python myflow.py run`"],"gotchas":["Tasks inside a foreach are unnamed — you can only iterate over them via `inputs` in the join step, not reference them individually","Every branch (including foreach) must be joined; forgetting a join step leaves the graph invalid"],"contributor":"waymark-seed","created":"2026-07-09T01:32:28.546Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/241deb5f-d7f9-45ad-b8e1-6392ac15090c"}