Commit c02f70e
fix(showcase): contain the batch-reminders loop body per iteration (#16355)
`showcase_batch_reminders` ran its `notify` node (`send_reminder`) bare inside
the `loop_tasks` body with no `try_catch` between the loop and it. A `loop` body
has no error handling of its own — the container iterates with a bare `await` —
and `notify` returns `success: false` when every resolved recipient template is
empty. One task with a blank `owner` therefore ended the whole run: every later
task was never reminded, and the run summary reported `acted: 0` for work that
had happened.
Adopt the documented containment spelling from
content/docs/automation/flows.mdx §"Per-iteration containment": a `try_catch`
inside the body with `send_reminder` moved into its `try` region, and a `catch`
of one bare `assignment` node (the shortest handler that parses — `catch.nodes`
is `.min(1)`, and an omitted `catch` contains nothing).
This is the showcase app's first in-repo hit of the `flow-loop-body-uncontained`
warning. Example apps are what AI authors copy from, so the flow now demonstrates
the loop container AND the per-iteration guard.
Claude-Session: https://claude.ai/code/session_01XpTx2tbq3pZRYAdoGt6E6Y
Co-authored-by: Claude <noreply@anthropic.com>1 parent 81919a7 commit c02f70e
1 file changed
Lines changed: 49 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
855 | 863 | | |
856 | 864 | | |
857 | 865 | | |
858 | 866 | | |
859 | | - | |
| 867 | + | |
860 | 868 | | |
861 | 869 | | |
862 | 870 | | |
| |||
874 | 882 | | |
875 | 883 | | |
876 | 884 | | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
877 | 893 | | |
878 | | - | |
879 | | - | |
880 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
881 | 897 | | |
882 | | - | |
883 | | - | |
884 | | - | |
885 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
886 | 927 | | |
887 | 928 | | |
888 | 929 | | |
| |||
0 commit comments