fix(service): an automation with no plan is refused a change to a GitHub event, as it is when made

Merged
DA
4d ago
+49-1

What

The bug the code-review-bot spike (#2753) found: #2746 refuses a GitHub trigger on a workspace (planless) automation when it's made, but a PATCH still let one through. That automation then never fired, because a GitHub event is heard only on a plan's repository while GitHub triggers stay dormant.

changesOf now refuses a change to a GitHub trigger on an automation with no plan, with the same INVALID_REQUEST (400) create answers. The automation keeps its schedule. An automation on a plan may still take a GitHub event, as before.

This doesn't take the spike's broader change (letting workspace automations hear GitHub events), which is pending Dean's review-bot decision.

Compatibility

Additive refusal on the server. No build writes a GitHub trigger on a planless automation: the desktop's params (#2747) refuse any trigger but a schedule.

Tests

automations-app.test.ts: "an automation on a workspace is refused a change to a GitHub event, as it is refused one when made, and keeps its schedule, while one on a plan may take one". It was written first, and it failed with the PATCH answering 200 and the automation's trigger rewritten to GitHub.

pnpm check:affected passes.

Mac

No desktop change. CI could not verify the Mac UI, and ./scripts/verify.sh was not run (LUKE-159).

šŸ¤– Generated with Claude Code


Open workspace in Conductor


Devin Review


Summary by cubic

Fixes a PATCH gap where a workspace (planless) automation could be changed to a GitHub trigger, even though creating one was already refused. Such an automation never fired, since GitHub events are only heard on a plan's repository.

changesOf now refuses a GitHub trigger change on an automation with no plan, with the same INVALID_REQUEST (400) answer as creation. The automation keeps its schedule. An automation on a plan may still take a GitHub event, as before.

No desktop change; the broader change to let workspace automations hear GitHub events is intentionally out of scope.