Skip to content

feat(transform)!: drop transformVerifyCalls - #344

Open
pyramation wants to merge 1 commit into
mainfrom
feat/drop-transform-verify-calls
Open

feat(transform)!: drop transformVerifyCalls#344
pyramation wants to merge 1 commit into
mainfrom
feat/drop-transform-verify-calls

Conversation

@pyramation

Copy link
Copy Markdown
Collaborator

Summary

Removes the transformVerifyCalls pre-pass (and its export) from @pgsql/transform, 18.17.0. It renamed schema names inside verify helper literals by matching a hand-maintained list of helper names:

verify_(?:function|table|trigger|type|domain|view|index|constraint|schema|policy|table_grant|...)\s*\(\s*'<schema>(\.|'\s*\))

That list is the failure mode it caused: it omits verify_security, so that call site silently never got renamed, and every new helper had to be added here and in pgpm's parallel SCHEMA_NAME_LITERAL_FUNCS.

Nothing needs it any more. Qualified literals ('sch.tbl') were already reached by the generic A_Const pass, and the one case that genuinely required the name list — verify_schema('sch'), a bare name with no dot — is now assert_schema('sch'::regnamespace), routed by cast type as of #343. constructive-db regenerates with zero drift without the pre-pass.

Breaking: transformVerifyCalls is no longer exported. Callers should drop it from prePasses.

The kitchen-sink fixture's verify_* block is replaced with the assertion form it verifies (assert_schema(...::regnamespace), assert_function(...::regprocedure), …), and the golden output regenerated with scripts/make-fixtures.ts.

Validation

  • pnpm test in packages/transform: 250 passing, 12 suites
  • pnpm lint: clean

Link to Devin session: https://app.devin.ai/sessions/37a60838adfb4fd6ac8c29f09c2e2827
Requested by: @pyramation

The pre-pass existed to rename schema names inside verify_*('schema.object')
literals, keyed on a hand-maintained list of helper names -- a list that
already omitted verify_security, so that call site never got renamed.

Identity casts replaced those helpers: 'sch.tbl'::regclass and friends are
routed by cast type (18.16.0), and the bare-schema case verify_schema needed
the pre-pass for is now assert_schema('sch'::regnamespace). The kitchen-sink
fixture is updated to the assertion form it replaces.
@pyramation pyramation self-assigned this Aug 6, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

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.

2 participants