chore(api): remove unused and superseded API routes - #7364
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR removes obsolete API endpoints and their now-unused contracts, helpers, error projections, and tests after the relevant behavior moved to newer resource and Mothership surfaces.
Confidence Score: 5/5The PR appears safe to merge; no changed-code-triggered blocking or independently actionable non-blocking issue was identified. The removed routes, contracts, helpers, and tests have no remaining repository references, the retained replacement surfaces cover the updated test path, and the lockfile change does not modify dependencies.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/api/contracts/copilot.ts | Removes contracts and schemas belonging exclusively to the deleted legacy Copilot endpoints without leaving head-tree references. |
| apps/sim/lib/api/contracts/tables.ts | Removes contracts for superseded asynchronous table-transfer endpoints alongside their route implementations. |
| apps/sim/lib/copilot/chat/messages-store.ts | Removes the full-snapshot replacement helper whose sole consumer was the deleted update-messages route. |
| apps/sim/lib/billing/credits/purchase.ts | Removes the unused direct credit-purchase implementation while retaining the live usage-limit reconciliation helper. |
| apps/sim/app/api/table/executor-capability-exemption.test.ts | Retargets executor-versus-session permission behavior coverage from the removed async import route to the live multipart CSV import route. |
| scripts/check-api-validation-contracts.ts | Cleans obsolete route entries from the raw-JSON audit baseline; no behavioral regression was identified. |
| bun.lock | Adds only Bun lockfile-format metadata and does not alter package versions or dependency resolution. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Legacy API routes] -->|removed| B[Superseding resource and Mothership surfaces]
C[Orphaned contracts and helpers] -->|removed| B
D[Executor capability test] -->|retargeted| E[Live import-csv route]
F[CloudWatch HTTP adapters] -->|removed; contracts retained| G[In-process tool execution]
Reviews (1): Last reviewed commit: "chore(api): remove unused and superseded..." | Re-trigger Greptile
There was a problem hiding this comment.
No issues found across 54 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
Summary
/api/emails/preview) and its schema/api/mothership/*surface:chat/rename,chat/update-messages,chat/steer,checkpoints,checkpoints/revert,credentials,models, andmothership/local-files/stageexport-async,export/download,import-async(both table-level and per-table),job/cancelbilling/credits,files/download,logs/triggers,workspaces/[id]/metrics/executions,status,organizations/[id]/invitations,workspaces/[id]/files/[fileId]/compiled-check(compiled checks now run in-process via the VFS)tools/cloudwatch/describe-log-*HTTP routes superseded by shared selectors and in-process tool execution (contracts kept for the in-process executor)import-csvrouteType of Change
Testing
Full test suite passes (2851 files / 39297 tests),
bun run type-check,bun run lint, and all 44check:auditspass. Verified no external callers for every removed route across sibling service repos; routes with external consumers were kept.Checklist