You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add dcd retry command and MCP tool to retry failed flows in an existing upload #366
Let users retry a failed flow from the CLI and over MCP, the way the console's "retry" button does. The retry should stay in the same upload.
Something like:
dcd retry --upload-id <id> --flow <name># retry one flow
dcd retry --upload-id <id># retry every failed flow in the upload
dcd retry --result-id <id># retry one result by id
What already exists
The API already does this: POST /uploads/retryTest (UploadsController_retryTest, already in src/types/generated/schema.types.ts).
{ resultId } retries one result and returns the new result id.
{ uploadId } retries every failed result in the upload and returns retriedCount.
Exactly one of the two must be given.
So this is CLI and MCP work only. No API change should be needed.
Work
dcd retry command (src/commands/retry.ts).
--result-id: call the endpoint directly.
--upload-id alone: retry all failed flows.
--upload-id + --flow <name>: look up the upload's results (as dcd status does), find the result whose flow name matches, and retry that one. Error clearly if no flow matches, or if more than one does (the same flow on several devices). In that case, list the matching result ids so the user can pass --result-id.
Print the new result id, or the retried count. Optionally --watch to follow the upload like dcd cloud does.
--json output, to match the other commands.
MCP tool (src/mcp/tools/retry-test.ts), with the same inputs. It is billable, so describe it that way, as dcd_run_cloud_test does.
Docs and README entry.
Tests for the flow-name lookup (no match, one match, several matches) and for the API error paths (for example, retrying a result that has not failed).
Done when
A user can retry one failed flow, or all failed flows, in an existing upload from the CLI and from MCP, without opening the console.
The retried result shows up in the same upload in the console.
Activity