feat(slice): subsystem exclusion with cascade safety + contract extraction - #1529
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
Downstream half of subsystem substitution (planning issue constructive-io/constructive-planning#1318, upstream primitive in constructive-io/pgsql-parser#322 →
@pgsql/transform@18.7.0): a pure decision/verification engine inpgpm/slicethat lets a consumer exclude a subsystem from imported SQL and prove the exclusion is safe before any rewrite happens.Key behaviors:
requiredis derived purely from the reference graph (references/bodyReferences/fkTargetsper statement), so the replacement surface is exactly what the surviving SQL uses — e.g. one uuid-PK table (FK target) + one accessor function — while dozens of internal columns/tables/functions land ininternal.resolveObject, trying each object namespace since classifier refs are untagged; whole-schema routes count) or it lands inunsatisfiedwith the offending statement index.18.7.0's name-rebind targets ({ schema, name },schema: null= de-qualify) are what make "pointidentity.current_actor()atcurrent_user_id()" expressible.COMMENT ON, bareDROP) and keptEXECUTEbodies produce warnings instead of being classified.transpileBundle.transformScripton the same router); this module only decides and checks.Also bumps
@pgpmjs/transform's upstream dep to@pgsql/transform@^18.7.0.Tests: 8 new vendor-neutral cases in
pgpm/slice/__tests__/exclude.test.ts; slice 4 suites / 48 tests and transform 31 tests green,tsc --noEmitclean.Link to Devin session: https://app.devin.ai/sessions/025fb88043964fdbb335ac5e39df2478
Requested by: @pyramation