chore: remove Vercel fork relics and AI Gateway managed-keys flow#1049
chore: remove Vercel fork relics and AI Gateway managed-keys flow#1049
Conversation
Removes leftover artifacts from the upstream vercel-labs/workflow-builder-template
that no longer apply now that we don't sync from upstream.
Deleted:
- .github/workflows/keeperhub-daily-main-sync-with-upstream.yml: daily cron that
hard-reset main to upstream and force-pushed; actively dangerous.
- scripts/migrate-prod.ts: gated on VERCEL_ENV which is never set in K8s, so it
always logged "Skipping migrations". Migrations are run by the K8s init
container (deploy/keeperhub/{staging,prod}/values.yaml) via pnpm db:migrate
directly. Build script no longer prefixes tsx scripts/migrate-prod.ts.
- specs/KEEPERHUB_PARALLEL_REFACTOR_PLAN.md: premised on syncing from upstream.
- components/github-stars-{button,loader,provider}.tsx: unused upstream UI that
loaded vercel-labs/workflow-builder-template's star count.
- app/api/ai-gateway/{consent,status,teams}, lib/ai-gateway,
components/overlays/ai-gateway-consent-overlay.tsx: AI Gateway managed-keys
consent flow that minted Vercel API keys via Vercel OAuth. Gated on
AI_GATEWAY_MANAGED_KEYS_ENABLED, never enabled in any deploy config.
Cleaned:
- lib/auth.ts: dropped Vercel genericOAuth provider (gated on VERCEL_CLIENT_ID,
never set) and the VERCEL_URL baseURL fallback.
- lib/auth-providers.ts, components/auth/dialog.tsx,
components/ui/integration-icon.tsx: dropped "vercel" from Provider unions,
Continue with Vercel button, VercelIcon SVGs.
- app/api/user/{route,password,forgot-password}.ts: dropped "vercel" from
OAUTH_PROVIDERS arrays.
- lib/api-client.ts: dropped VercelTeam type, isVercelUser status field, and
aiGatewayApi client.
- lib/workflow/executor/execution-fallback.ts and its test: dropped VERCEL_URL
base-URL fallback (only NEXT_PUBLIC_APP_URL is used in K8s).
- next.config.ts: dropped Sentry automaticVercelMonitors (Vercel-cron-only,
no-op for our deployment).
- app/layout.tsx: dropped GitHubStarsLoader/Provider Suspense wrapper.
- package.json: dropped @vercel/sdk dependency (no consumers after deleting
lib/integrations/vercel.ts upstream).
Plugin and minor fixes:
- plugins/ai-gateway/index.ts and test.ts: stripped Vercel branding from the
AI Gateway plugin (kept the plugin itself - it provides Generate Text/Image
workflow actions and uses a generic AI_GATEWAY_API_KEY, not OAuth).
- components/overlays/{add-connection,edit-connection,workflow-issues}-overlay,
components/ui/integration-selector, components/workflow/config/action-config,
components/settings/integrations-manager: removed managed-keys consent
branches, isManaged-routing for AI Gateway, vercel icon mapping.
- components/overlays/configuration-overlay.tsx and node-config-panel.tsx:
schedule-trigger filename hint vercel.json -> schedule.json.
- Comment cleanups in app/api/agentic-wallet/provision/route.ts,
app/api/workflow/[workflowId]/execute/route.ts, lib/mcp/logging.ts,
lib/utils/id.ts, lib/metrics/instrumentation/saturation.ts,
lib/workflow/executor/executor.workflow.ts, sentry.edge.config.ts,
tests/integration/agentic-wallet-sweeper.test.ts.
- Doc/spec updates: AGENTS.md, README.md, docs/users-teams-orgs/users.md,
deploy/local/values-keeperhub.template.yaml,
specs/logging-and-metrics/logging-metrics-system.md,
specs/organization-implementation-strategy.md.
Verification: type-check passes, all 3322 unit tests pass.
PR Environment DeployedYour PR environment has been deployed! Environment Details:
Components:
The environment will be automatically cleaned up when this PR is closed or merged. |
joelorzet
left a comment
There was a problem hiding this comment.
Hi @suisuss,
Verified the surviving Vercel deps (@vercel/og, @vercel/queue, @vercel/oidc) are still load-bearing, and there are no dangling references to AI_GATEWAY_MANAGED_KEYS_ENABLED, VERCEL_CLIENT_ID, isVercelUser, or VERCEL_ENV on the branch.
Nit: dead code in components/auth/dialog.tsx
const getProviderIcon = (provider: Provider, compact = false) => {
const _iconClass = compact ? "size-3.5" : undefined;
switch (provider) {
case "github":
return <GitHubIcon />; // doesn't accept className
case "google":
return <GoogleIcon />; // doesn't accept className_iconClass is the only consumer of compact. With the Vercel branch gone, neither remaining icon takes a className, so both the local and the compact parameter are dead. The underscore prefix looks like the lint rule was silenced rather than the code removed. Drop the parameter from the signature too if no callers pass it.
…l-fork-relics # Conflicts: # app/layout.tsx # lib/workflow/executor/executor.workflow.ts
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
Summary
Removes leftover artifacts from the upstream
vercel-labs/workflow-builder-templatethat no longer apply since we don't sync from upstream, and the dormant Vercel-OAuth + AI Gateway managed-keys consent flow that was never enabled in any deploy config.50 files changed, +225 / -2302 net.
Deleted
.github/workflows/keeperhub-daily-main-sync-with-upstream.yml— daily cron that hard-reset main to upstream and force-pushed origin/main. Actively dangerous since we no longer sync.scripts/migrate-prod.tsand itspnpm buildprefix — gated onVERCEL_ENVwhich is never set in K8s, so it always logged "Skipping migrations". Migrations are run by the K8s init container (deploy/keeperhub/{staging,prod}/values.yaml) viapnpm db:migratedirectly.app/api/ai-gateway/{consent,status,teams}/route.ts,lib/ai-gateway/,components/overlays/ai-gateway-consent-overlay.tsx— AI Gateway managed-keys consent flow that minted Vercel API keys via Vercel OAuth. Gated onAI_GATEWAY_MANAGED_KEYS_ENABLED, never enabled.genericOAuthprovider inlib/auth.ts(gated on unusedVERCEL_CLIENT_ID) and theVERCEL_URLbaseURL fallback.components/github-stars-{button,loader,provider}.tsx— unused upstream UI loading vercel-labs star count.specs/KEEPERHUB_PARALLEL_REFACTOR_PLAN.md— premised on syncing from upstream.automaticVercelMonitors: trueinnext.config.ts— Vercel-cron-only feature, no-op for our K8s deployment.@vercel/sdkfrompackage.json(no consumers afterlib/integrations/vercel.tswas already deleted upstream).AI Gateway plugin kept
plugins/ai-gateway/(workflow plugin providing Generate Text / Generate Image actions, used via plainAI_GATEWAY_API_KEY) is kept. Only stripped Vercel-specific branding fromindex.ts(helpLink) andtest.ts(managed-keys comments).Cleaned
app/api/user/{route,password,forgot-password}.ts— dropped\"vercel\"fromOAUTH_PROVIDERSarrays.lib/auth-providers.ts,components/auth/dialog.tsx,components/ui/integration-icon.tsx— dropped\"vercel\"provider type,Continue with Vercelbutton,VercelIcon.lib/api-client.ts— droppedVercelTeamtype,isVercelUserfield,aiGatewayApiclient.lib/workflow/executor/execution-fallback.tsand its test — droppedVERCEL_URLfallback.app/layout.tsx— droppedGitHubStarsLoader/ProviderSuspense wrapper.isManaged-routing for AI Gateway, vercel icon mapping.configuration-overlay.tsx,node-config-panel.tsx— schedule trigger filename hintvercel.json->schedule.json.lib/mcp/logging.ts,lib/utils/id.ts,lib/metrics/instrumentation/saturation.ts,lib/workflow/executor/executor.workflow.ts,app/api/agentic-wallet/provision/route.ts,app/api/workflow/[workflowId]/execute/route.ts,sentry.edge.config.ts,tests/integration/agentic-wallet-sweeper.test.ts.AGENTS.md,README.md,docs/users-teams-orgs/users.md,deploy/local/values-keeperhub.template.yaml,specs/logging-and-metrics/logging-metrics-system.md,specs/organization-implementation-strategy.md.Not touched (intentional)
@vercel/og(load-bearing for OG image generation, runs on Node) and itsnext.config.tsexternal.@vercel/queueand@vercel/oidcexternals innext.config.ts— both are transitive deps from Workflow DevKit and WalletConnect/unstorage; externalization is needed for the Next build.lib/monaco-theme.tsvercelDarkThemeand thevercel-darkMonaco theme name — purely cosmetic.integrations.is_managedDB column — left in schema andIntegrationtype. Old rows withisManaged=truefrom the deleted consent flow may still exist. Follow-up needed: drop the column with a migration, clean upIntegration.isManaged,lib/db/integrations.ts, and the metric inlib/metrics/db-metrics.ts:638.Verification
pnpm type-check: cleanpnpm test:unit: 3322 / 3322 tests pass across 174 filesTest plan
schedule.jsoninstead ofvercel.json