Conversation
|
Review complete. No issues found — approved ✅. This PR introduces a new module that coalesces concurrent schema builds by exact key using fenced flight scopes, refactors the existing in-flight map, and threads the new lifecycle through the server/explorer middleware with new 503-refusal error codes. The refactor keeps scope-fencing, drain ordering, and invalidation semantics intact, and ships with focused tests.
Two candidate concerns (lifecycle refusals surfaced as internal failures; close leaving prep scopes that block reopen) were verified with sub-threshold confidence and are not reported as inline findings. Reviewed commit: f61aca9 |
|
Reviewed the approval summary; there are no inline findings to resolve. Updated this PR with the reviewed F17/F19 dependency commits in 4931d07. Missing service keys now return before either resident eviction or flight invalidation. The two lower-confidence observations remain outside this slice's behavior change: HTTP classification/admission of build-readiness refusals belongs to F23, and a closed flight registry must retain preparation scopes until their owners release them so reopen cannot abandon in-progress metadata work (broader server shutdown integration is F26). This PR keeps that ownership boundary. Validation: 20 focused admission/invalidation/flight tests at this layer; the complete stack passes 84 graphile-cache tests, 8 server flush tests and the graphile-cache build. |
Implements F20 from constructive-io/constructive-planning#1693. Its logical prerequisites are F04 (#1747) and F17 (#1852); it is stacked on F19 (#1853) so cached producers share one admitted publication owner.
Server and Explorer synchronously register an exact-key build flight and share its promise. Joined callers observe the same failure without a retry cascade. Readiness and capacity checks complete before publication.
Invalidation fences pending work before removing resident entries. Service/database/pool invalidation, direct deletion, and cache clear reject old callers and dispose late results without overwriting a replacement. A preparation scope covers asynchronous compute lookup before the exact key is known. The server reuses the context-owned pool and settings throughout this lifecycle; canonical errors preserve their HTTP status and internal cause.
Closing caches drains underlying work before pool teardown and reports resident cleanup failures. Reopening requires the prior flight registry to be drained. The existing LRU retains F19's dynamic configured capacity and TTL behavior.
Validation: all 83 graphile-cache tests passed, including flight invalidation, late publication, failed release and runtime configuration. Errors, graphile-cache, server and Explorer builds passed. Real HTTP coverage and final stack validation are recorded in #1855.
Next layer: #1855 (F21) bounds and serializes unique builds with watchdog and shutdown drain.