Add CNC-owned Graphile build-state retirement - #1722
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
This is the third PR in the replacement performance stack:
It adds an opt-in
BuildStateRetirementPluginin normal CNC source.ConstructivePresetinstalls that plugin explicitly; Graphile'sdefaultPresetremains unchanged.Architecture boundary
Crystal #1 remains an independent upstream proposal for only the neutral
build.registerAfterSchemaValidation(callback)lifecycle API. Thegraphile-builddist patch here mirrors that API because the current installed release does not contain it.All concrete retirement behavior stays in CNC:
graphile-buildpnpm patch owns the private retirement state machine, core/Behavior cleanup, disposer registration, fail-closed guards, aggregate-error handling, andGRAPHILE_BUILD_STATE_RELEASED;graphile-build-pgpnpm patch adds owner cleanup only for PgBasics, PgCodecs, and PgPolymorphism;No
ReleaseBuildStatePluginis imported or exported. No retirement behavior is added to Graphile's default preset. No pg-many-to-many change is included, and the graphile-build-pg patch contains no scoped-introspection hunks.Performance harness integration
The generic harness from #1716 is extended with four attribution cases without loading
ConstructivePreset:stockscopedretirescoped-retireEach arm installs only its requested scoped-introspection and/or retirement plugin.
Validation
pnpm install --frozen-lockfile --offlinepassesConstructivePresetintegration: runtime query succeeds and captured build state is releasedPatch lifecycle
The neutral lifecycle portion can be removed when an equivalent API is available in the installed Graphile release. The concrete retirement implementation remains CNC-owned until suitable upstream ownership APIs exist.