Skip to content

chore(automation): remove automation commands - #89

Merged
boristane merged 2 commits into
mainfrom
chore/remove-automations
Sep 11, 2026
Merged

chore(automation): remove automation commands#89
boristane merged 2 commits into
mainfrom
chore/remove-automations

Conversation

@claude

@claude claude Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Requested by boris · Slack thread

Before: The CLI shipped a polylane automation resource group with ten verbs (list, find, show, trigger, executions, execution, rerun, catalog, create, from-template), requested automations:read/write/delete OAuth scopes, listed automation as a thread type, feed category and autofix origin, walked users through "add an automation from the catalog" in auth signup, and devoted a whole section of skill/SKILL.md to the automation schema. The generated client also exposed every /automations endpoint through polylane 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 --type and autofix list --origin no longer advertise automation, and feed list --category drops it via Exclude<Category, 'automation'> so the exhaustiveness map keeps compiling both before and after the API stops serving the enum value. The resolve.test.ts resource-group assertion is updated to match.

Codegen now excludes automation endpoints at parse time: codegen/parse-spec.ts skips any spec path matching /automations(/|$) and any component schema whose name contains Automation, so src/generated/{client,types,commands}.ts stop 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) and npm run build all pass against the live spec.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mdq3bKUHfNq5LiuYfLExgb


Generated by Claude Code

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

@coreplane-switchboard coreplane-switchboard Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, the src/commands/index.ts / src/registry.ts registrations, 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 the Exclude<Category, 'automation'> in feed/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 at parse-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 (Exclude of a non-member is a no-op), and VALID_CATEGORIES is derived from the map, so --category automation is now correctly rejected with the updated help text. Nicely done.
  • Test updated (resolve.test.ts resource-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:16EXCLUDED_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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: coreplane-switchboard[bot] reviewed this PR and posted an LGTM verdict (see its review). A repo admin enabled this via the auto-approve workflow.

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
@claude

claude Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Addressed F1 from the switchboard review in be7b183: codegen/parse-spec.ts now uses an explicit EXCLUDED_SCHEMAS set naming the six automation component schemas (Automation, AutomationExecution, AutomationNotification, AutomationActionExecution, TriggerAutomationBody, CreateAutomationFromTemplateBody) instead of the unanchored /Automation/ regex, so an unrelated future schema can't be dropped silently. Re-ran codegen, typecheck, lint and tests against the live spec: still 345 operations, no automations.* methods, 448 tests pass.


Generated by Claude Code

@coreplane-switchboard coreplane-switchboard Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 explicit Set of the six retired schema names (Automation, AutomationExecution, AutomationNotification, AutomationActionExecution, TriggerAutomationBody, CreateAutomationFromTemplateBody) with an exact has(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 in src/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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: coreplane-switchboard[bot] reviewed this PR and posted an LGTM verdict (see its review). A repo admin enabled this via the auto-approve workflow.

@boristane
boristane merged commit 141c04d into main Sep 11, 2026
4 checks passed
@boristane
boristane deleted the chore/remove-automations branch September 11, 2026 04:54
@claude claude Bot mentioned this pull request Sep 12, 2026
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.

2 participants