beads/internal/formula
Steve Yegge d2f71773cb fix: Chain iterations after nested loop expansion (gt-zn35j)
Fixes a bug where outer iteration chaining was lost when nested loops
were expanded. The problem was:

1. chainLoopIterations set: outer.iter2.inner depends on outer.iter1.inner
2. ApplyLoops recursively expanded nested loops
3. outer.iter2.inner became outer.iter2.inner.iter1.work, etc.
4. The dependency was lost (referenced non-existent ID)

The fix:
- Move recursive ApplyLoops BEFORE chaining
- Add chainExpandedIterations that finds iteration boundaries by ID prefix
- Works with variable step counts per iteration (nested loops expand differently)

Now outer.iter2's first step correctly depends on outer.iter1's LAST step,
ensuring sequential execution of outer iterations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 16:35:28 -08:00
..
advice.go feat: Add source tracing metadata to cooked steps (gt-8tmz.18) 2025-12-25 16:27:48 -08:00
advice_test.go fix: Prevent aspect self-matching infinite recursion (gt-8tmz.16) 2025-12-25 12:21:23 -08:00
condition.go fix: Address code review issues in condition evaluator 2025-12-25 14:00:56 -08:00
condition_test.go fix: Address code review issues in condition evaluator 2025-12-25 14:00:56 -08:00
controlflow.go fix: Chain iterations after nested loop expansion (gt-zn35j) 2025-12-25 16:35:28 -08:00
controlflow_test.go fix: Chain iterations after nested loop expansion (gt-zn35j) 2025-12-25 16:35:28 -08:00
expand.go feat: Add source tracing metadata to cooked steps (gt-8tmz.18) 2025-12-25 16:27:48 -08:00
expand_test.go fix: Map expansion now matches nested child steps (gt-8tmz.33) 2025-12-25 12:08:05 -08:00
parser.go feat: Add source tracing metadata to cooked steps (gt-8tmz.18) 2025-12-25 16:27:48 -08:00
parser_test.go feat: Add on_complete/for-each runtime expansion types (gt-8tmz.8) 2025-12-25 16:07:57 -08:00
types.go feat: Add source tracing metadata to cooked steps (gt-8tmz.18) 2025-12-25 16:27:48 -08:00