Repository navigation
feat: sync function-resolution from constructive-db — routing_planes() returns resolver_schema_name #141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pyramation
merged 2 commits into
main
from
devin/1792815215-sync-routing-planes-resolver-schema
Oct 24, 2026
Merged
feat: sync function-resolution from constructive-db — routing_planes() returns resolver_schema_name #141
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Binary file modified
BIN
+138 Bytes
(100%)
packages/function-resolution/sql/pgpm-function-resolution--0.47.6.bundle.tar.gz
Binary file not shown.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 bug · medium
resolver_schema_nameduplicatesschema_nameverbatimThe new
resolver_schema_namecolumn is populated with the same expression asschema_name(s.schema_name::text, packages/function-resolution/deploy/schemas/function_resolution/procedures/routing_planes.sql:30), making it an exact alias of the existing column.The new header comment says it is "the schema its resolver is generated into, so callers qualify the resolver from it rather than assuming", but
metaschema_modules_public.route_modulestores no resolver-schema field, so the value can never differ fromschema_nameand the documented contract is not implemented by any data path.If resolver generation ever targets a schema other than the plane's public schema, callers that qualify the resolver from this column will silently get the wrong schema. The updated test asserts
resolver_schema_name === schema_namefor every fixture, so it cannot detect the divergence.📋 Prompt for AI Agents
In packages/function-resolution/deploy/schemas/function_resolution/procedures/routing_planes.sql line 30, replace the duplicate
s.schema_name::textwith an expression that yields the schema the resolver is actually generated into — e.g. add a resolver-schema source column to metaschema_modules_public.route_module (packages/metaschema-modules/deploy/schemas/metaschema_modules_public/tables/route_module/table.sql) and join on it. If a separate field is out of scope, amend the function's header comment (lines 15-19) to state thatresolver_schema_namecurrently equalsschema_nameso callers do not rely on divergent semantics. Extend packages/function-resolution/tests/request-lane-reads.test.ts (around lines 218-224) with a fixture whose resolver schema differs from the plane's public schema. Mirror any SQL change into packages/function-resolution/sql/pgpm-function-resolution--0.47.6.sql and regenerate the bundle.