Skip to content

fix(automations): refuse steps the server no longer accepts - #292

Merged
leet-c1 merged 2 commits into
mainfrom
fix/automations-deprecated-steps
Nov 19, 2026
Merged

leet-c1 merged 2 commits into
mainfrom
fix/automations-deprecated-steps

Conversation

@cvkramer

@cvkramer cvkramer commented Nov 19, 2026 •

Copy link
Copy Markdown

What

automations create and automations update refuse, with exit 2 and before any request (--dry-run included), a step using an arm the server no longer accepts. This applies in automationSteps and draftAutomationSteps, in either key spelling, via --steps-file or --body-file.

Arm Server response (captured live)
evaluateExpressions 400 the evaluate expressions step is no longer supported
createRevokeTasks 400 CreateRevokeTasks step is deprecated and no longer allowed. It is replaced by CreateRevokeTasksV2

Why

The public OpenAPI spec still advertises evaluateExpressions, so agents build automations on it, and only find out at create time. With this check, a --dry-run preview refuses what a real send would.

Verified

Unit tests for both spellings and both arrays. --debug shows no request is sent. The two 400s above were re-captured live, and the client's refusal matches them word for word. golangci-lint is clean.

Follow-ups in this branch

  • A JSON null arm is not a use of that arm: the server's JSON parser treats null as unset, so {"evaluateExpressions": null} is now sent instead of being refused with a message the server never produced. Verified live: a step with a valid waitForDuration plus "evaluateExpressions": null is accepted and stores only waitForDuration, while the arms themselves still 400 exactly as quoted above.
  • The help text and both docs say a JSON null value is unset, not a use, and a test pins that the null arm reaches the server verbatim.

c1-charleskramer and others added 2 commits November 18, 2026 17:33
- `automations create|update` refuse a step naming `evaluateExpressions`
  or `createRevokeTasks` in `automationSteps`/`draftAutomationSteps`
  (either body spelling, `--steps-file` or `--body-file`), exit 2 before
  any request is sent (`--dry-run` included), naming the step index and,
  for `createRevokeTasks`, its replacement `createRevokeTasksV2`.
- Live-confirmed server text: "the evaluate expressions step is no
  longer supported"; "CreateRevokeTasks step is deprecated and no
  longer allowed. It is replaced by CreateRevokeTasksV2".
A JSON null is the API's "unset", not a use of the arm (protojson skips a
null oneof member), so `{"evaluateExpressions":null}` was refused with a
message claiming the server rejects it. Skip nil values, keep refusing a
present arm, and pin that the null arm reaches the server verbatim. The help
text and both docs now say a null value is not a use.

Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
@leet-c1
leet-c1 marked this pull request as ready for review November 19, 2026 21:16
@leet-c1
leet-c1 merged commit 4ef8b3f into main Nov 19, 2026
2 checks passed
@leet-c1
leet-c1 deleted the fix/automations-deprecated-steps branch November 19, 2026 21:38
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.

3 participants