Rework stakwork_run_step: target run_step_from_template with ancestor-keyed params - #1478
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
#1477 shipped
stakwork_run_stepagainst aPOST /workflow_steps/runendpoint that never landed — the senza-lnd implementation merged instead asPOST /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
POST /workflows/:workflow_id/run_step_from_templatewith{step_id, params, mock_mode?}. The source workflow must have a published version.paramsare 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 synthesizedset_varstep and rewrites the target's[$(ancestor).output.path]refs to read from it. The oldattributesoverride input is gone.workflow_id + step_idand noparamssends a structurally-empty probe; the endpoint rejects it withMissing 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_modepassthrough for cheap dry tests against stored mock step outputs.success: false) are now handled explicitly instead of falling into the "no project_id" fallback.GET /projects/:id/steps/:step_id/io, and the double-gating (API key + truthytoolsConfig.stakwork_run_step, prompt guidance behind the same flag) are unchanged.🤖 Generated with Claude Code