Repository navigation
chore(trpc,mcp,cli,sdk,desktop): remove dead mcpScope plumbing - #6486
Conversation
`automations.mcp_scope` has been plumbed end to end since it was added: tRPC create/update schemas, the router, the MCP tools, a CLI flag, SDK types, and the desktop create dialog. Nothing reads it. `dispatch.ts` never passes it to `agents.run`, and every caller writes `[]` unconditionally — the desktop dialog hardcodes it, the CLI defaults it. MCP was hardcoded `disableMcp: true` when automations shipped, so the field never had a consumer. Removes the plumbing. The column stays for now and drops with the other dead automation columns once the trigger cutover completes; deployed code still selects it.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
💤 Files with no reviewable changes (8)
📝 WalkthroughWalkthroughThe automation API removes ChangesAutomation MCP scope removal
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This removes an unused automation field from public interfaces while preserving the existing database column, with no actionable merge-blocking risk remaining after normal checks and review. Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
What
Removes
mcpScopefrom every surface that carries it:createAutomationSchema/updateAutomationSchemaand the routerautomations.create/automations.updatetool inputsautomations createand the--mcp-scopeflag onautomations updateAutomation,AutomationCreateParams,AutomationUpdateParamsCreateAutomationDialogThe
automations.mcp_scopecolumn stays.Why
It has never had a consumer.
dispatch.tsbuilds theagents.runpayload fromagentandpromptand never passes it, and MCP was hardcodeddisableMcp: truewhen automations shipped.Every caller writes
[]unconditionally:CreateAutomationDialog.tsxhardcodesmcpScope: []cli/automations/createhardcodesmcpScope: [][]So it is a field users can set through three public surfaces that has no effect anywhere.
Why the column stays
Dropping it now would break currently deployed code, since Drizzle selects columns explicitly and running instances still name
mcp_scopein theirSELECT. It drops alongsiderrule,dtstart,timezone, andnext_run_atonce the automation trigger cutover is complete and nothing reads the legacy columns.Note on public surfaces
This removes a field from the CLI and SDK. It is technically a breaking change for anyone passing
mcpScope, but passing it has never done anything, so nothing can regress behaviourally.Testing
bun run typecheck— 37/37 packagesbun run lint— cleanbun test packages/trpc packages/cli apps/api— 131 passgrepconfirms the only remaining reference is the column definitionSummary by cubic
Removes the unused mcpScope field from automation create/update across tRPC, MCP tools, CLI, SDK types, and the desktop dialog. The field never affected execution; the database column remains to avoid breaking running instances.
--mcp-scopefrom anyautomations updateCLI usage.mcpScopein SDK payloads and tRPC/MCP inputs; delete references toAutomation.mcpScope,AutomationCreateParams.mcpScope, andAutomationUpdateParams.mcpScope.automations.mcp_scopecolumn stays for now and will be dropped with other legacy trigger columns after the cutover.Written for commit bab40b5. Summary will update on new commits.