Add realtime generation lifecycle core - #1750
Draft
Zetazzz wants to merge 1 commit into
Draft
Conversation
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.
Summary
Implements planning item F05 on top of the reusable performance harness in #1716.
CursorTrackerstartup, polling, heartbeat, stop, and cleanup concurrency explicit and idempotentRealtimePublishercapability, with batch topic/schema preflight and fatal shutdownpgSubscriberadapter for existing callers while requiring an exact schema allowlist for new explicit publishersBoundary
This PR is intentionally limited to the F05 lifecycle core in
graphile-realtime-subscriptions.It does not wire generation activation or publication into
graphile-cacheor the GraphQL server, install a shared PostgreSQL notification broker, change request admission, replace the existing subscription event gate, add pre-delivery RLS authorization, or implement server-side failed-generation retirement. Those remain F12, F24, and F44.The existing realtime plugin behavior is unchanged unless a caller opts into the new
onTopicsDiscoveredbuild-time callback. No package metadata, lockfile, dependency patch, default preset, or unrelated package is changed.F05 is a lifecycle foundation rather than a standalone enabled optimization, so this PR makes no isolated performance claim and does not add an F05 benchmark arm before the F12/F24 integration exists.
Validation
Passed:
graphile-realtime-subscriptions: 6 suites, 130 testsgraphile-realtime-subscriptionsCJS and ESM buildsgraphile-cacheCJS and ESM consumer buildgraphile-realtime-testCJS and ESM buildpnpm install --frozen-lockfilegit diff --checkThe diff was audited with zero-context, word, and ignore-whitespace views. It contains no repo-wide or unrelated formatting changes.
Refs constructive-io/constructive-planning#1693.