Wire Graphile runtime pools with exact generation ownership - #1821
Draft
Zetazzz wants to merge 5 commits into
Draft
Wire Graphile runtime pools with exact generation ownership#1821Zetazzz wants to merge 5 commits into
Zetazzz wants to merge 5 commits into
Conversation
This was referenced Sep 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The production Graphile middleware previously rebuilt a pool from control-plane options, bypassing configured runtime credentials. It now consumes the exact request-context pool, retains a cache-owned lease before asynchronous discovery, and keys builds/cache entries by logical service plus opaque runtime identity. A credential rotation therefore creates a new Graphile generation; concurrent requests coalesce even while module discovery is pending.
Runtime configuration requires explicit database/user/password and the same effective physical database target as the control route. Resolver failures never fall back. The server forwards all runtime options, keeps routing/module loaders on control pools, and preserves canonical request settings and the configured introspection role. Unconfigured single-login deployments remain supported.
Retirement belongs to the exact entry. It waits for both the public async Grafserv handler and response termination before releasing PostGraphile services and the cache lease; abort alone does not imply a query has settled. Shutdown closes build admission, drains pending builds, and disposes results that finish during shutdown. Logical service flushes retire every credential generation. Existing public Express handlers and PgPoolLease shape are preserved.
Dependencies and review scope: stacked on notification broker #1820 (which depends on #1754 → #1752 → #1744). This branch additionally merges #1747's awaited service-release prerequisite. Its PR diff therefore includes #1747 until that prerequisite lands; rebase after prerequisite landing to leave only runtime wiring in the final diff. This task has not merged any PR. The original five #1754 commits were preserved across the three splits; range-diff confirms no original unit was dropped.
Validation:
--forceExit=false --detectOpenHandles, and the process exited naturally.Runtime role provisioning must permit the configured introspection/served roles and enabled module grants. This is credential separation, not the F18 runtime privilege audit. The broker remains an available capability; enabling the F24 generation subscription consumer is a separate change.
Refs constructive-io/constructive-planning#1693.
Full CI: https://github.com/constructive-io/constructive/actions/runs/34313334951 — all 17 jobs succeeded at
4c76a25c4531772f2f27f0c3bad9c692cc969990, including the enabled dedicated notification role/broker integration step.