Skip to content

chore(cloudflare-webhook-agent-ingest): Use client instead of pool#47

Merged
pandemicsyn merged 1 commit intomainfrom
florian/chore/use-client-instead-of-pool
Feb 5, 2026
Merged

chore(cloudflare-webhook-agent-ingest): Use client instead of pool#47
pandemicsyn merged 1 commit intomainfrom
florian/chore/use-client-instead-of-pool

Conversation

@pandemicsyn
Copy link
Copy Markdown
Contributor

@pandemicsyn pandemicsyn commented Feb 5, 2026

Switch to pg client per use.

};

// Singleton instance for connection pooling
let singleton: ProfileResolutionService | null = null;
Copy link
Copy Markdown
Contributor Author

@pandemicsyn pandemicsyn Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this would really cause issues, but i definitely didn't have this singleton in my spec - i think the robot snuck this one past me at some point.

Comment thread cloudflare-webhook-agent-ingest/src/db/node-postgres.ts
Comment thread cloudflare-webhook-agent-ingest/src/db/node-postgres.ts
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Feb 5, 2026

Code Review Summary

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 1

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
cloudflare-webhook-agent-ingest/src/db/node-postgres.ts 19 Switching from Pool to per-call Client drops prior timeout/limit protections (max, connection timeout, statement timeout).
cloudflare-webhook-agent-ingest/src/db/node-postgres.ts 56 await client.end() in finally can override the original query/transaction error.

SUGGESTION

File Line Issue
cloudflare-webhook-agent-ingest/src/services/token-minting-service.ts 30 Removing the singleton may increase per-invocation DB/secret initialization if called multiple times.
Files Reviewed (3 files)
  • cloudflare-webhook-agent-ingest/src/db/node-postgres.ts - 2 issues
  • cloudflare-webhook-agent-ingest/src/services/profile-resolution-service.ts - 0 issues
  • cloudflare-webhook-agent-ingest/src/services/token-minting-service.ts - 1 issue

@pandemicsyn pandemicsyn merged commit cd0413a into main Feb 5, 2026
11 checks passed
@pandemicsyn pandemicsyn deleted the florian/chore/use-client-instead-of-pool branch February 5, 2026 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants