Skip to content

Add Graphile build readiness and awaited disposal - #1747

Draft
Zetazzz wants to merge 1 commit into
test/performance-harness-corefrom
agent/graphile-readiness-disposal
Draft

Add Graphile build readiness and awaited disposal#1747
Zetazzz wants to merge 1 commit into
test/performance-harness-corefrom
agent/graphile-readiness-disposal

Conversation

@Zetazzz

@Zetazzz Zetazzz commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements planning item F04 on top of the reusable performance harness in #1716.

  • waits for both PostGraphile schema gathering and Grafserv readiness before createGraphileInstance returns
  • releases a failed PostGraphile generation and its unique preset services before propagating the original build failure
  • replaces cache-key disposal tracking with exact-entry promise ownership
  • coalesces repeated disposal of one generation while still disposing distinct generations that reuse the same key
  • exposes awaited primitives for uncached candidates, exact-entry disposal, active-disposal draining, and full cache clearing
  • makes graceful cache clearing wait until all scheduled generation cleanup reaches a terminal result

Boundary

This PR is intentionally limited to F04 lifecycle foundations in graphile-cache.

It does not add resident-instance admission, heap budgeting, memory-pressure eviction, exact-key build coalescing, a global build coordinator, request draining, realtime-generation lifecycle, new configuration, or server admission behavior. Those remain separate functional units that may consume these primitives later.

No package metadata, lockfile, README, dependency patch, or unrelated package is changed.

Validation

Passed:

  • graphile-cache lifecycle tests: 3 suites, 13 tests
  • graphile-cache CJS and ESM builds
  • built-package failed-build smoke: original schema failure propagated after the fake preset service was released exactly once
  • full @constructive-io/graphql-server tests: 13 suites, 143 tests
  • performance harness tests: 5 suites, 7 tests
  • performance harness CJS and ESM build
  • pnpm install --frozen-lockfile
  • ESLint on all changed TypeScript files (the existing unused unregister warning in graphile-cache.ts remains unchanged)
  • git diff --check

Existing files were audited with zero-context and ignore-whitespace diffs. There is no repo-wide formatting or unrelated formatting hunk; the only indentation changes are inside the rewritten disposal control flow.

Refs constructive-io/constructive-planning#1693.

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