feat(workflow): add workflow DSL commands#91
Conversation
Signed-off-by: samzong <samzong.lu@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a27841bc7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case float64: | ||
| return tv, nil |
There was a problem hiding this comment.
Coerce JSON workflow numbers before query serialization
When a workflow maps a numeric field from a prior JSON step into an int64 operation parameter, encoding/json provides the value as float64; returning it unchanged here ignores p.GoType, and the later query builder only serializes int64, bool, []string, and string, so a required query value like params: {limit: ${steps.lookup.limit}} is silently omitted from the request URL.
Useful? React with 👍 / 👎.
| if s.RequestBody == nil { | ||
| return nil, nil |
There was a problem hiding this comment.
Reject body setters on bodyless workflow steps
If a workflow step includes set or set_str for an operation whose spec has no request body, input.BodySets/BodyStringSets is non-empty but this branch returns nil before checking it, so the generated workflow sends the API call without the configured body instead of failing fast; this is reachable because workflow codegen validates params keys but does not reject body setters for bodyless operations.
Useful? React with 👍 / 👎.
Summary
cli.yamlthat compile into normal Cobra root commands.Verification
rtk make checkpre-ship --committed: 0 MUST-FIX findings; sentinel/tmp/.preship-ok-bb7b2557681948c8writtenCompatibility
workflow.dslwhen workflows are configured.Checklist
internal/generated/,.cache/, and ad-hocskills/<cli-name>/directories is not committed.