You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Result double-wrapping bug in CustomNode.Exec
When using NewNode with WithExecFunc and WithPostFunc, Result.Bind() was
failing silently because execResult was being double-wrapped. The user's
execFunc returns a Result, but CustomNode.Exec was returning that Result
directly (as any), then CustomNode.Post was wrapping it again with
NewResult(), causing Result{value: Result{value: actualData}}.
This fix unwraps the Result in CustomNode.Exec before returning (similar
to how Prep already unwraps). Error Results are preserved to maintain
batch processing behavior.
- Modified CustomNode.Exec to unwrap Result.Value() before returning
- Special handling for error Results to preserve batch error tracking
- Added tests to verify Result.Bind() works in ExecFunc and PostFunc
- Updated builder tests to reflect new behavior