Skip to content

fix(strategy): emit task type for reduce step - #47

Open
addadi wants to merge 1 commit into
nullclaw:mainfrom
addadi:fix/strategy-reduce-step-type
Open

fix(strategy): emit task type for reduce step#47
addadi wants to merge 1 commit into
nullclaw:mainfrom
addadi:fix/strategy-reduce-step-type

Conversation

@addadi

@addadi addadi commented Aug 22, 2026

Copy link
Copy Markdown

Fixes #33

buildReduceStep wrapped the user reduce block as type:"reduce", but StepType has no reduce variant, so validateStepsForCreateRun rejected the expanded steps with StepTypeUnknown → HTTP 400 "unknown step type" for any parallel+reduce workflow.

A reduce block is conceptually a synthesis task with implicit depends_on (already built by the expander). Emit type:"task"; no engine changes needed. Avoids bloating StepType with a strategy-specific concept.

Regression test: expandStrategy(parallel+reduce) output now passes validateStepsForCreateRun cleanly. Full suite green (zig build test, 356/356).

buildReduceStep wrapped the user reduce block as type:"reduce", but
StepType has no reduce variant, so validateStepsForCreateRun rejected
the expanded steps with StepTypeUnknown -> HTTP 400 "unknown step type"
for any parallel+reduce workflow.

A reduce block is conceptually a synthesis task with implicit
depends_on (already built by the expander). Emit type:"task"; no engine
changes needed. Avoids bloating StepType with a strategy-specific
concept.

Regression test: expandStrategy(parallel+reduce) output now passes
validateStepsForCreateRun cleanly.

Fixes nullclaw#33
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.

BUG: parallel strategy reduce block fails with 'unknown step type'

1 participant