Skip to content

fix(op): Variadic reflection, choose executor branch isolation (Phase 6a) - #219

Merged
David-Noble-at-work merged 1 commit into
developfrom
feature/shared-provider-receivers
Mar 14, 2026
Merged

David-Noble-at-work merged 1 commit into
developfrom
feature/shared-provider-receivers

Conversation

@David-Noble-at-work

Copy link
Copy Markdown
Contributor

Summary

  • Variadic parameter support: action_reflect.go strips * prefix from param names and uses
    CallSlice for variadic methods; planned_reflect.go strips * prefix so starlark.UnpackArgs
    matches keyword arguments
  • Choose executor branch isolation: branch phases marked with Branch=true are skipped by the
    top-level executor; choose action seeds branch results from ctx.Results for cross-phase promise
    resolution; testrunner wraps unphased nodes into a main phase
  • 3 tests fixed (t.Skip removed): TestFileJoin, TestChooseNotExists, TestIsFile

Test plan

  • make build — all 3 binaries compile
  • make test — all tests pass
  • TestFileJoin passes with variadic parts=["a","b","c.txt"]
  • TestChooseNotExists passes — false predicate correctly skips then-branch
  • TestIsFile passes — Output from main phase resolves in choose branch

… 6a)

Variadic parameter support for planned and action execution paths:
- action_reflect.go: strip '*' prefix from param names, add callMethod()
  that uses CallSlice for variadic methods instead of Call
- planned_reflect.go: strip '*' prefix in buildPlannedBridge so
  starlark.UnpackArgs matches keyword arguments correctly

Choose executor branch phase isolation:
- phase.go: add Branch flag to Phase struct
- plan_root.go: mark choose-branch phases with Branch=true
- executor.go: skip Branch phases in forward phase list; populate
  ctx.Results so flow actions can access parent execution results
- choose.go: seed branch results from ctx.Results for cross-phase
  promise resolution (fixes Output captured in lambda closures)
- runner.go: wrap unphased nodes into main phase even when branch
  phases exist

Tests fixed (t.Skip removed):
- TestFileJoin — variadic []string now works through planned receiver
- TestChooseNotExists — branch no longer executes unconditionally
- TestIsFile — cross-phase Output references resolve correctly
@David-Noble-at-work
David-Noble-at-work merged commit 330ef15 into develop Mar 14, 2026
2 checks passed
@David-Noble-at-work
David-Noble-at-work deleted the feature/shared-provider-receivers branch March 14, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant