Skip to content

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

Merged
vernonstinebaker merged 1 commit into
nullclaw:mainfrom
addadi:fix/strategy-reduce-step-type
Sep 28, 2026
Merged

vernonstinebaker merged 1 commit into
nullclaw:mainfrom
addadi:fix/strategy-reduce-step-type

Conversation

@addadi

@addadi addadi commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

@vernonstinebaker vernonstinebaker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean fix for #33: a reduce block is a synthesis task with implicit depends_on (already built by the expander), so type: "task" is correct and avoids polluting StepType with a strategy-only concept. Best part is the regression test — the expanded steps now round-trip through validateStepsForCreateRun, which is exactly where the old type: "reduce" died with StepTypeUnknown. CI green, scope confined to strategy.zig. Merging.

@vernonstinebaker
vernonstinebaker merged commit 8e6b75e into nullclaw:main Sep 28, 2026
4 checks passed
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'

2 participants