Skip to content

app-showcase: showcase_batch_reminders loops a notify with no per-iteration containment (first in-repo hit of flow-loop-body-uncontained) #14622

Description

@claude

examples/app-showcase/src/automation/flows/index.tsshowcase_batch_reminders (BatchRemindersFlow) runs a notify node inside its loop body with no try_catch between the loop and it:

loop 'loop_tasks' (collection '{tasks}', maxIterations 500)
  body.nodes = [ notify 'send_reminder' (recipients '{task.owner}') ]

notify fails when every recipient template resolves to nothing (notify-node.ts:300), and a loop body has no error handling of its own, so one task with an empty owner ends the whole run: every later task is never reminded, and the run summary reports acted: 0 for work that did happen. That is the exact shape measured on #13681 (a 5-item sweep failing at item 3 processed 3 items).

Found while implementing the containment lint rules for #14394 (PR #14617): this is the first in-repo hit of the new flow-loop-body-uncontained warning. The rule is a warning, so nothing breaks — the bundled showcase app simply demonstrates the shape the platform now warns about, and the example apps are what AI authors copy from.

Two defensible fixes, an authoring decision rather than a mechanical one:

  1. Adopt the documented containment spelling — wrap send_reminder in a try_catch whose catch is one bare assignment node (content/docs/automation/flows.mdx, "Per-iteration containment"). The example then demonstrates both the loop container AND the per-iteration guard.
  2. Keep fail-fast deliberately and say so in the flow's description, so a reader knows the shape is chosen rather than overlooked.

Out of scope for #14394, which is lint + docs only and must not widen into the example apps. Filed unassigned for triage.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions