Skip to content

Commit 19ec1c5

Browse files
committed
feat(connections)!: delete duplicate-grant reconcile custom flow (CL-7593)
1 parent 53cc66c commit 19ec1c5

4 files changed

Lines changed: 4 additions & 208 deletions

File tree

‎packages/connections/package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"./mcp-presets": "./src/mcp-presets.ts",
1515
"./connect-github-routes": "./src/connect-github-routes.ts",
1616
"./connect-github-setup": "./src/connect-github-setup.ts",
17-
"./reconcile-duplicate-repo-grants": "./src/reconcile-duplicate-repo-grants.ts",
1817
"./credential-test": "./src/credential-test.ts",
1918
"./token-session": "./src/token-session.ts",
2019
"./model-capability": "./src/model-capability.ts",

‎packages/connections/src/reconcile-duplicate-repo-grants.test.ts‎

Lines changed: 0 additions & 136 deletions
This file was deleted.

‎packages/connections/src/reconcile-duplicate-repo-grants.ts‎

Lines changed: 0 additions & 55 deletions
This file was deleted.

‎scripts/db-setup.ts‎

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { readdir } from "node:fs/promises";
3030

3131
import { applyChatMigrations } from "../packages/chat/src/migrations";
3232
import { applyWebhookTriggersMigrations } from "../packages/webhook-triggers/src/migrations";
33-
import { reconcileDuplicateRepoGrants } from "../packages/connections/src/reconcile-duplicate-repo-grants";
3433
import { applyNotifyMigrations } from "../packages/notify/src/migrations";
3534
import {
3635
applyInboxMigrations,
@@ -107,21 +106,10 @@ async function applyInstalledPackageMigrations(
107106
}
108107
}
109108

110-
// CL-7242: not a package migration (no schema, no ledger, no DDL at
111-
// all) -- a plain, always-safe-to-re-run DELETE against the
112-
// platform's own `grant` table through @intx/db's published export,
113-
// cleaning up any repo grants CL-7242's race duplicated before this
114-
// fix's lease started preventing new ones. See
115-
// reconcile-duplicate-repo-grants.ts for why this is DML, not DDL,
116-
// and why that distinction is what keeps it off the vendored-delta
117-
// ledger.
118-
const { removedIds } = await reconcileDuplicateRepoGrants(databaseUrl);
119-
if (removedIds.length > 0) {
120-
console.log(
121-
`db-setup: removed ${removedIds.length} duplicate repo grant(s): ` +
122-
removedIds.join(", "),
123-
);
124-
}
109+
// CL-7593: the one-time CL-7242 duplicate-grant cleanup ran its era
110+
// (the repo_review_lease now prevents new duplicates at write time),
111+
// so db-setup no longer performs it: setup applies migrations only,
112+
// and grant state stays on the native grant routes.
125113

126114
await dropRoutinesSchemaAfterDigestHandoff(databaseUrl);
127115
}

0 commit comments

Comments
 (0)