Skip to content

Establish exact PostgreSQL connection identities and leases - #1754

Draft
Zetazzz wants to merge 1 commit into
agent/pg-checkout-sanitationfrom
feat/exact-pg-identity-notification-broker
Draft

Establish exact PostgreSQL connection identities and leases#1754
Zetazzz wants to merge 1 commit into
agent/pg-checkout-sanitationfrom
feat/exact-pg-identity-notification-broker

Conversation

@Zetazzz

@Zetazzz Zetazzz commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Pool reuse now uses an opaque process-local HMAC of the complete connection contract: driver generation, target, credentials, TLS, pool policy, purpose, and checkout behavior. acquirePgPool adds an idempotent lease; leased pools survive LRU/TTL eviction, capacity admission fails when no pool can be safely reclaimed, and teardown awaits detached disposals. The compatibility getPgPool API and database cleanup aliases remain available.

This PR now contains only connection identity and lease ownership. The original notification role/broker commits and runtime credential commits are split into separate stacked PRs. It stays on #1752 and preserves the default checkout sanitation contract.

Validation: pg-cache 43 tests, pg-env 5 tests, and 13 real PostgreSQL sanitation/request-context tests passed. Both affected packages build as CJS/ESM; the frozen install passed. Full CI passed all 17 jobs on f2bcd121cd566bd5c53d9c12571d69cb62ee14e2.

Landing order: #1744#1752 → this PR → notification broker #1820 → runtime wiring. Runtime wiring additionally depends on #1747's awaited service release. No PR in this stack is merged by this task.

Refs constructive-io/constructive-planning#1693 (F01).

Runtime wiring is now split into #1821, stacked on #1820, with an explicit #1747 release prerequisite.

@Zetazzz
Zetazzz force-pushed the feat/exact-pg-identity-notification-broker branch from b1e5666 to f2bcd12 Compare September 9, 2026 04:30
@Zetazzz Zetazzz changed the title Establish exact PostgreSQL identities and notification lifecycle Establish exact PostgreSQL connection identities and leases Sep 9, 2026
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.

1 participant