Skip to content

Rework stakwork_run_step: target run_step_from_template with ancestor-keyed params - #1478

Merged
Evanfeenstra merged 1 commit into
mainfrom
run-step-from-template-tool
Jul 23, 2026
Merged

Rework stakwork_run_step: target run_step_from_template with ancestor-keyed params#1478
Evanfeenstra merged 1 commit into
mainfrom
run-step-from-template-tool

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Collaborator

What

#1477 shipped stakwork_run_step against a POST /workflow_steps/run endpoint that never landed — the senza-lnd implementation merged instead as POST /workflows/:id/run_step_from_template (stakwork/senza-lnd#7949–#7955), with a different input model. This reworks the tool to match what's actually deployed.

Changes

  • Launch call: POST /workflows/:workflow_id/run_step_from_template with {step_id, params, mock_mode?}. The source workflow must have a published version.
  • Input model: params are ancestor-keyed — { "<ancestor_step_id>": { "<output.path>": value } } (flat "ancestor_id.output.path" keys also accepted server-side). Stakwork seeds them as literals into a synthesized set_var step and rewrites the target's [$(ancestor).output.path] refs to read from it. The old attributes override input is gone.
  • Discovery affordance: calling with workflow_id + step_id and no params sends a structurally-empty probe; the endpoint rejects it with Missing required ancestor keys: a.b, c.d — enumerating the step's exact input shape — before persisting anything or enqueuing a run. The tool surfaces this as {launched: false, discovery: true, errors, hint}.
  • mock_mode passthrough for cheap dry tests against stored mock step outputs.
  • Error bodies from the endpoint (HTTP 200 + success: false) are now handled explicitly instead of falling into the "no project_id" fallback.
  • Poll/resume behavior, the read via GET /projects/:id/steps/:step_id/io, and the double-gating (API key + truthy toolsConfig.stakwork_run_step, prompt guidance behind the same flag) are unchanged.

🤖 Generated with Claude Code

…or-keyed params

The senza-lnd side landed as POST /workflows/:id/run_step_from_template
(stakwork/senza-lnd#7949-#7955), which synthesizes a set_var seed step from
ancestor-keyed inputs and rewrites the target step's output refs to read
from it. Update the tool accordingly: params are now
{ ancestor_step_id: { "output.path": value } }, attributes overrides are
gone, and mock_mode is passed through. Calling with no params sends a
structurally-empty probe whose rejection enumerates every required
ancestor key — a free input-shape discovery call that launches nothing.
Gating (API key + truthy toolsConfig.stakwork_run_step) is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Evanfeenstra
Evanfeenstra merged commit d5383b9 into main Jul 23, 2026
6 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.

1 participant