fix(export): hoist partman registry fixtures into service package; graphile-llm collision; X-Api-Name lookup - #1476
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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
Three upstream fixes found while testing the export path against diligence-app-demo and agentic-db:
1.
@pgpmjs/export— partman FK whack-a-mole, fixed at the root. Generatedpartman.sqlfixtures (category = 'meta_registration') insert intometaschema_public.partition, FK-referencing thedatabase/table/fieldidentity rows that only exist in the meta/service package — so the app package could never deploy standalone.exportMigrationsnow hoists these registry fixtures out of the app package into the service package:isRegistryFixture(row):category === 'meta_registration' && content matches /\bmetaschema_public\./migrate/*metaschema identity fixtures, with their original DDL deps rewritten as cross-package requires (<app-name>:<change>)Packages now deploy cleanly in the natural app → service order; no more deploy-order workarounds in consumers. Regression test added in
export-flow.test.ts(hoists meta_registration registry fixtures into the service package).2.
graphile-llm—embeddingTextcollision.LlmTextMutationPluginsynthesized a<field>Textcompanion input for every vector column, colliding with tables that have a physicalembedding_textsibling (inflects to the same GraphQL name), which killed schema build. Synthesis is now skipped when a physical attribute already owns the companion name (checked both at mapping construction and in the input-field hook). Vector-only tables are unchanged; tests cover both shapes (notestable with physicalembedding_textadded to setup.sql).3.
graphql/server— X-Api-Name lookup no longer filtersis_published. The private-header lookup didAND a.is_published = $3with$3 = opts.api.isPublic— on the private server this meant only unpublished APIs were addressable, a carryover from the legacyis_publiccolumn. Per the routing-plane definition,is_publishedgoverns cross-scope route visibility, not internal addressability;X-Api-Nameis a trusted internal selector (only honored whenisPublic === false). The filter is dropped.Tests:
pgpm/export163 passing (incl. new regression test),graphile-llmcollision tests passing,graphql/servermiddleware tests passing, tsc clean.Related: found via export testing in https://github.com/constructive-io/diligence-app-demo/pull/40 and constructive-io/agentic-db#38.
Link to Devin session: https://app.devin.ai/sessions/497b48aa78b845d39127371f6bf9d6de
Requested by: @pyramation