chore(automation): remove automation commands - #89
Conversation
The automations feature is retired. Drop the `polylane automation` command group (list, find, show, trigger, executions, execution, rerun, catalog, create, from-template), its resource-group registration, the automations:* OAuth scopes, and every onboarding/skill/README mention. Codegen now skips `/automations` paths and `*Automation*` schemas when parsing the OpenAPI spec, so the generated client, types and `polylane api` operation metadata stop emitting automation endpoints even while the API still serves them. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mdq3bKUHfNq5LiuYfLExgb
There was a problem hiding this comment.
LGTM: Clean, complete removal of the automation feature; codegen-time exclusion is the right mechanism since src/generated is gitignored, and no stray references remain.
- [nit] F1 codegen/parse-spec.ts:16 — EXCLUDED_SCHEMA /Automation/ is an unanchored substring match — could silently drop a future unrelated schema
Verdict: approve — a clean, complete removal of the automation feature at head 020578a (22 files, +18/−570, fully covered).
What I verified:
- Complete removal, no dangling references. All ten
src/commands/automation/*files, thesrc/commands/index.ts/src/registry.tsregistrations, the three OAuth scopes, and the README/SKILL.md/signup mentions are gone. A repo-wide grep finds only the two intentional survivors: the codegen exclusion and theExclude<Category, 'automation'>infeed/list.ts. - Codegen exclusion is the right layer.
src/generated/*is gitignored, so the generated client can't be pruned by editing checked-in files — filtering atparse-spec.ts(/\/automations(\/|$)/for paths, schema-name filter) is the correct mechanism, and the path regex is anchored well enough not to catch unrelated routes. - Forward/backward compatibility of
feed list.Record<Exclude<Category, 'automation'>, true>compiles both while the live API still serves the enum value and after it drops it (Excludeof a non-member is a no-op), andVALID_CATEGORIESis derived from the map, so--category automationis now correctly rejected with the updated help text. Nicely done. - Test updated (
resolve.test.tsresource-group list) to match; scope removal only affects newly minted tokens, which is fine for a retired feature.
One nit:
- F1 (nit)
codegen/parse-spec.ts:16—EXCLUDED_SCHEMA = /Automation/is an unanchored substring match against every component schema name. It's fine today, but a future unrelated schema whose name happens to contain "Automation" would be silently dropped from the generated types with no error. Consider anchoring (e.g./^(Create)?Automation/or an explicit name list) so an accidental match fails loudly rather than vanishing. Author's call.
No docs/reference/specs/ in this repo, so no spec-contradiction check applies.
Replace the unanchored /Automation/ substring match with an explicit set of the six automation component schemas so an unrelated future schema whose name happens to contain "Automation" is not silently dropped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mdq3bKUHfNq5LiuYfLExgb
|
Addressed F1 from the switchboard review in Generated by Claude Code |
There was a problem hiding this comment.
LGTM: F1 addressed as suggested — the schema exclusion is now an explicit six-name Set instead of an unanchored regex; the delta is confined to codegen/parse-spec.ts and the rest of the removal is unchanged from the previously approved round.
Verdict: approve — re-review at be7b183; the single fix commit resolves F1 exactly as suggested, and the rest of the PR is unchanged from the approved round.
Disposition of prior findings:
- F1 (nit, fixed — verified)
codegen/parse-spec.ts:16-23: the unanchored/Automation/regex is replaced by an explicitSetof the six retired schema names (Automation,AutomationExecution,AutomationNotification,AutomationActionExecution,TriggerAutomationBody,CreateAutomationFromTemplateBody) with an exacthas(name)check. A future unrelated schema containing "Automation" can no longer be silently dropped — the failure mode now inverts to the safe direction (an unlisted automation schema would merely reappear as dead types insrc/generated/, harmless and visible, until the API-side removal lands). This is the right trade.
Delta check: git diff 020578a..be7b183 touches only codegen/parse-spec.ts (+9/−2); the full diff against origin/main still matches GitHub's reported 22 files, +25/−570. The path exclusion (/\/automations(\/|$)/), command/registry/scope removals, Exclude<Category, 'automation'> in feed list, and the resolve.test.ts update are all as reviewed and approved last round. No new issues.
Requested by boris · Slack thread
Before: The CLI shipped a
polylane automationresource group with ten verbs (list, find, show, trigger, executions, execution, rerun, catalog, create, from-template), requestedautomations:read/write/deleteOAuth scopes, listedautomationas a thread type, feed category and autofix origin, walked users through "add an automation from the catalog" inauth signup, and devoted a whole section ofskill/SKILL.mdto the automation schema. The generated client also exposed every/automationsendpoint throughpolylane api call.After: The automation command group, its registration in
src/commands/index.ts/src/registry.ts, the three OAuth scopes, and every onboarding, README and SKILL.md mention are gone;thread list --typeandautofix list --originno longer advertiseautomation, andfeed list --categorydrops it viaExclude<Category, 'automation'>so the exhaustiveness map keeps compiling both before and after the API stops serving the enum value. Theresolve.test.tsresource-group assertion is updated to match.Codegen now excludes automation endpoints at parse time:
codegen/parse-spec.tsskips any spec path matching/automations(/|$)and any component schema whose name containsAutomation, sosrc/generated/{client,types,commands}.tsstop emitting them even while the live API still serves them (the API-side removal lands separately).npm run codegen && npm run typecheck,npm run lint,npm run test(448 pass) andnpm run buildall pass against the live spec.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mdq3bKUHfNq5LiuYfLExgb
Generated by Claude Code