fix(server): remove unimplemented autoLoadPools calls

server.ts had two calls to MultiPoolService.autoLoadPools() but the method
does not exist in multiPoolService.ts — it was scaffolded for Phase 3
(multi-project SSO) but never implemented. The orphaned calls caused 2
TypeScript compilation errors, blocking `pnpm tsc --noEmit` and preventing
the project from reaching a clean state.

Both call sites are replaced with a // TODO(phase3) comment pointing back
to line ~447 so Phase 3 implementers know where to re-add the logic.

Impact: none for the current SSO flows (Phase 1 OIDC, Phase 2 email
verification). projectIntegrationService.findUserByEmail(appCode, email)
still needs a pool to exist — Phase 3 will wire createPool() here so that
ProjectUserReaderService can resolve cross-project user lookups.

admin/health.ts / adminService.ts / projectIntegrationService.ts are not
touched because they only use the existing public API
(createPool/getPool/listPools/healthCheck).
Co-authored-by: 's avatarCursor <cursoragent@cursor.com>
parent 97b46ba2
......@@ -444,14 +444,10 @@ const // Server functions
log('WARN', `OIDC provider failed: ${oidcErr}`);
}
// Auto-load project DB connections from project_db_connections table.
// Must happen after OIDC init so any /admin/db-connections activity in
// tests can be exercised, but before the server starts listening.
try {
await MultiPoolService.autoLoadPools();
} catch (poolErr) {
log('WARN', `autoLoadPools failed: ${poolErr}`);
}
// TODO(phase3): auto-load project DB connections from project_db_connections table.
// MultiPoolService.createPool(appCode, config) must be called here so that
// ProjectUserReaderService.findUserByEmail(appCode, email) can resolve
// cross-project users. Currently unimplemented — Phase 3 (PLANS.md) will wire it.
await generateSwagger();
serveSwagger(app, storagePath);
......@@ -621,12 +617,8 @@ const // Server functions
log('ERR', `OIDC provider failed: ${oidcErr}`);
}
// Auto-load project DB connections from project_db_connections table.
try {
await MultiPoolService.autoLoadPools();
} catch (poolErr) {
log('WARN', `autoLoadPools failed: ${poolErr}`);
}
// TODO(phase3): auto-load project DB connections from project_db_connections table.
// See comment at line ~447.
// TEMP: Disabled swagger generation to debug startup hang
if (env === 'staging') await generateSwagger();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment