Add CNC-owned Graphile build-state retirement - #1722
Closed
Zetazzz wants to merge 1 commit into
Closed
Conversation
Zetazzz
force-pushed
the
feat/cnc-scoped-introspection
branch
from
August 14, 2026 13:09
d42cd85 to
8a83d70
Compare
Zetazzz
force-pushed
the
feat/cnc-build-state-retirement
branch
from
August 15, 2026 01:02
4584455 to
f6fcbbe
Compare
This was referenced Aug 16, 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.
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;This PR is rebased onto #1719's independent
graphile-scoped-introspectionpackage. It does not modify that package or reintroduce the removed@dataplan/pgandpg-introspectionpatches. The performance worker continues to importScopedIntrospectionPresetdirectly from its owning package.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 released29571,29573,29585,295873b9dab5243611a57da1c0721ea3bc1aba455051124e43549e3c326178b3e97c1Patch 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.