Skip to content

docs(intent): the assistant guide documents the notify fan-out (forEach) - #6445

Merged
delchev merged 1 commit into
masterfrom
docs/intent-notify-foreach-guide
Jul 29, 2026
Merged

docs(intent): the assistant guide documents the notify fan-out (forEach)#6445
delchev merged 1 commit into
masterfrom
docs/intent-notify-foreach-guide

Conversation

@delchev

@delchev delchev commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

The notify fan-out shipped with #6435NotificationIntent.forEach, NotifySupport.fanOut, the forEach* glue keys, Send.java.template's per-row loop and thirteen GlueSendDocumentTest cases are all on master — but the authoring guide never got its section.

On master, intent-assistant-guide.md has no mention of it: no "fan-out", no "one message per related row", and the keyword table lists notify attach while omitting notify forEach. The only forEach the guide describes is the unrelated generates/children collection (forEach: { entity: … } / forEach: { days: … }).

That matters more than a normal doc gap: this guide is the resource fed to the Intent Editor's AI assistant, so the assistant cannot author a keyword the engine already accepts — and would plausibly reach for the generates-style map shape, which a notify block does not take.

The text was written when the feature was built and never left a working tree.

What it documents

  • the shape — forEach: <Entity>, after which every path resolves against the row: the recipient, the {placeholders}, and attach: print (the row's own document);
  • the exactly-one-to-one-back-relation rule, and that zero and ambiguous are both validation errors;
  • why a fan-out is fail-soft per row rather than failing the step: a retry would re-mail everyone already served, so a partial send cannot be made idempotent;
  • one keyword-table row.

Verified against master, not trusted

Every claim was checked before writing it down:

Claim Where it holds
forEach: <Entity> is a plain string NotificationIntent.forEach
zero / ambiguous back-reference are validation errors IntentParser.validateNotifyBlock — unknown entity, and backReferencesTo(...) != 1
skip no-recipient, log a failure, complete with a summary Send.java.templatesent / skipped / failed counters + summary log
attach: print renders the row's document validateNotifyBlock re-points aboutEntity at the row entity

Docs only — no code, no behaviour change.

🤖 Generated with Claude Code

The notify fan-out shipped with #6435 - NotificationIntent.forEach, NotifySupport
.fanOut, the glue keys, Send.java.template's per-row loop and thirteen unit cases are
all on master - but the authoring guide never got its section: no "fan-out", no
forEach row in the keyword table. The only forEach the guide describes is the
unrelated generates/children collection (`forEach: { entity: … }`), so an assistant
reading the guide cannot author the keyword the engine accepts, and would plausibly
try the map shape, which a notify block does not take.

The text was written when the feature was built and never left a working tree. It
documents the shape (`forEach: <Entity>`, every path then resolving against the ROW -
recipient, {placeholders} and the row's own attach: print), the exactly-one-back-
relation rule, and why a fan-out is fail-soft per row rather than failing the step: a
retry would re-mail everyone already served, so a partial send cannot be idempotent.

Each claim was checked against master rather than trusted: the plain-string forEach in
NotificationIntent, the exactly-ONE rule in IntentParser.validateNotifyBlock (unknown
entity and zero-or-ambiguous back-reference both reported), the sent / no-recipient /
failed counters and the summary log in Send.java.template, and attach: print
re-pointing at the row entity.

Docs only - no code, no behaviour change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@delchev
delchev merged commit 9a3e8b9 into master Jul 29, 2026
9 of 10 checks passed
@delchev
delchev deleted the docs/intent-notify-foreach-guide branch July 29, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant