Auto reconcile all magic mcp resources#613
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3d1a60e. Configure here.
| magicMcpServer: true | ||
| } | ||
| } | ||
| } satisfies Prisma.MagicMcpEndpointInclude; |
There was a problem hiding this comment.
Duplicated magicMcpEndpointBackingInclude risks divergence from source
Low Severity
magicMcpEndpointBackingInclude is defined identically in both reconcileMagicMcpBacking.ts and backing.ts. The copy in backing.ts is the authoritative one (it drives the MagicMcpEndpointWithBackingRelations type used by ensureMagicMcpEndpointBacking). If the include structure changes in backing.ts, this duplicate could silently drift. Exporting the constant from backing.ts and reusing it here would eliminate the maintenance risk.
Reviewed by Cursor Bugbot for commit 3d1a60e. Configure here.


Note
Medium Risk
Adds a new every-minute cron plus batch/single reconciliation queues that can trigger frequent DB scans and backing upserts, increasing load and potential rate-limit/consistency issues if misconfigured.
Overview
Introduces automatic reconciliation for Magic MCP servers and endpoints that are
activebut missing Subspace backing/session IDs, driven by a new* * * * *cron that enqueues batched work and fans out into rate-limited per-resource jobs callingensureMagicMcpServerBacking/ensureMagicMcpEndpointBacking.Wires the new reconciliation processors into
magicQueuesand exports them, and updates provider-template reconciliation fan-out to useaddManyWithOpswith deterministic job IDs to avoid duplicate enqueues.Reviewed by Cursor Bugbot for commit 3d1a60e. Bugbot is set up for automated code reviews on this repo. Configure here.