Repository navigation
refactor!: move to the pdbcore API hygiene release - #103
Merged
Merged
Conversation
- The smart_comments plugin checks every commented object against pdbcore's shared vocabulary and logs unknown omit actions and unknown or deprecated behavior tokens at build time, as pdbq does; the behavior smart tag now honours the PostGraphile V5 spellings -filterBy and -orderBy, with -filter and -order deprecated. - LoadConfig and config.Load take command-line values as a map (cliflags.Changed builds it); removed keys name the reason they were removed; doubled underscores after a section in PDBR_* variables are errors; the shared database and watch durations are validated. - A live boot no longer reorders schema.schemas, so the bare aliases come from the first configured schema. - Isolation and error detail come from the rejecting pdbcore parsers, postgis output uses OutputSQL with options, contract views report an unknown policy, and the watcher is built with watch.New.
archlemon
force-pushed
the
refactor/pdbcore-b15
branch
from
November 24, 2026 02:06
3edc3e2 to
bf1fa64
Compare
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.
Moves pdbr to the pdbcore changes in suprbdev/pdbcore PRs 89 (shared smart-tag checks), 93 (API hygiene) and 92 (schema order, env and duration checks). It pins the tagged release pdbcore v0.19.0, which contains all three.
Rebased on main, which gained the audit fixes from PR 104 (count-only
limit=0, RFC 4180 CSV writer,queryFieldfor~names,Varyheaders,server.request_timeoutof at least 1s). OnlyCHANGELOG.mdconflicted; both sides' entries are kept, with the schema order fix listed under Fixed next to the audit fixes. Config validation has therequest_timeoutcheck alongsideRemovedKeysandValidateDatabase.Smart tags, now the same as pdbq
@behavior -filterBy/-orderBy(the PostGraphile V5 spellings) are honoured as@omit filter/@omit order. pdbr used to ignore them.-filter/-orderkeep working and now warn at build time with their replacement.smart_commentsplugin runs pdbcore'scatalog.CheckinTransformCatalogagainst pdbr's@omitvocabulary (read, all, create, update, delete, many, filter, order).TransformAPIthen logs unknown@omitactions and unknown@behaviortokens through the configured logger. pdbq uses the same checks.docs/smart-comments.md, with tests for the warnings and for both spellings.Schema order
A live boot used to alphabetise
schema.schemas, because pdbcore'sIntrospectsorted the slice in place. The bare/{table}and/rpc/{fn}aliases then came from the alphabetically first schema, while a schema-cache boot used the configured first one. They now always followschema.schemas[0]. A new e2e test boots live with[public, b15_order]and checks this.Config (user-visible, in
CHANGELOG.mdanddocs/upgrading.md)RemovedKeys).PDBR_*variables with a doubled underscore after the section are errors with a did-you-mean hint.transactions.isolationerrors name the accepted values.database.*,auth.jwt.jwks_cache_ttlandwatch.poll_intervaldurations are validated, andexamples/pdbr.example.yamlis regenerated.Embedding API
pdbr.LoadConfig(path, flags)takesmap[string]any.cliflags.Changedfrompdbcore/confx/cliflagsbuilds that map from a pflag set.Internal
pgexecparsers.OutputSQL(ref, Output{…}), andOps(),Deriveds()andRasterAccessors()are accessor calls.watch.New.-update/UPDATE_GOLDEN=1).Tests
go test -race ./...,go vet,golangci-lint, actlint-test./test/ ./cmd/pdbr/,-p 1) on PostGIS 18 with pgvectorFuzzFilter,FuzzSpatial,FuzzParseandFuzzSplitEnvelope, 10s each