Part of #332. Staged in draft PR #346.
Summary
Custom error handlers can route through nested branch tails incorrectly during microflow rebuild. This can attach handler paths to the wrong continuation, skip output-dependent tails, or produce invalid terminal handling for void and non-void microflows.
Expected behavior
The builder should preserve custom error-handler behavior for:
- nested handlers that skip output-dependent tails;
- handler-local fallback returns;
- void handlers that must terminate before output-dependent continuation;
- empty handlers that rejoin the immediate next statement;
- handler anchor threading in error-handler bodies.
Current staging status
Draft PR #346 contains a pending-handler state model and dependent fixes, but they are not yet split into focused PRs. The extraction should keep the state refactor with the smallest dependent behavior change that makes it reviewable.
Validation target
Focused PRs should include root-cause unit tests for each handler routing shape and pass make build, make lint-go, and make test.
Part of #332. Staged in draft PR #346.
Summary
Custom error handlers can route through nested branch tails incorrectly during microflow rebuild. This can attach handler paths to the wrong continuation, skip output-dependent tails, or produce invalid terminal handling for void and non-void microflows.
Expected behavior
The builder should preserve custom error-handler behavior for:
Current staging status
Draft PR #346 contains a pending-handler state model and dependent fixes, but they are not yet split into focused PRs. The extraction should keep the state refactor with the smallest dependent behavior change that makes it reviewable.
Validation target
Focused PRs should include root-cause unit tests for each handler routing shape and pass
make build,make lint-go, andmake test.