Commit fa1c909
fix: track add-to-list expression vars in error-handler statement refs
errorHandlerStatementVarRefs in cmd_microflows_builder_flows.go was
still mirroring the old (s.Item, s.List) pattern. For
`add head($SourceItems) to $Items` the expression-valued case, s.Item
is empty and s.Value carries the expression — so $SourceItems was
silently dropped from the reference set used by error-handler flow
analysis (same class of bug ako flagged in validate_microflow.go and
builder_graph.go, which were already fixed).
Walk s.Value when present; fall back to s.Item for the simple-variable
legacy path. New regression test
TestErrorHandlerStatementVarRefsSeesAddExpressionValue guards both the
expression ref and the list ref.
Addresses review feedback on #362.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent a0c3ef4 commit fa1c909
2 files changed
Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
61 | 92 | | |
62 | 93 | | |
63 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
509 | 514 | | |
510 | 515 | | |
511 | 516 | | |
| |||
0 commit comments