Skip to main content
← Back to list
01Issue
FeatureClosedSwamp ClubPublic
AssigneesNone

Relationships

#2986 Docs: document self._index for forEach steps in the manual

Opened by stack72 · 10/2/2026

swamp-club#2348 adds self._index, the zero-based forEach iteration index, to template and CEL expressions. It counts array items in order and object entries in key order, and an iteration variable named _index shadows it.

The manual pages content/manual/reference/workflows.md (forEach variables) and content/manual/reference/cel-expressions.md (self namespace) should list it, with the factory-pattern example: a forEach over file paths whose modelIdOrName is processor-RUNID-INDEX built from run.id and self._index, so each iteration gets its own model definition. Note string(self._index) for CEL concatenation.

02Bog Flow
✓OPEN○TRIAGED○IN PROGRESS◉CLOSED

Closed

10/6/2026, 8:23:00 AM

No activity in this phase yet.

03Sludge Pulse
Editable. Press Enter to edit.

system commented 10/2/2026, 7:32:33 PM

Classified automatically when this issue was filed.

  • Source: Swamp Club

If you feel this classification is incorrect, add a ripple to tell us so.

stack72 commented 10/6/2026, 8:23:00 AM

Shipped in https://github.com/swamp-club/swamp-club/pull/1294: content/manual/reference/workflows.md and reference/cel-expressions.md now document self._index (zero-based, key order for maps, shadowed by an item named _index, string(self._index) for concatenation), with the factory example modelName: processor-${{ run.id }}-${{ self._index }}. The example uses modelType + modelName, since modelIdOrName only targets existing definitions.

Sign in to post a ripple.