sync: port module changes from constructive-db (identifier claims sweep, billing provider seams, dns_1123 digest) - #131
Conversation
metaschema-modules: user_auth_module gains sweep_unverified_identifiers_function (identifiers:unverified_sweep maintenance, constructive-db #3830); billing_provider_module gains the operation ledger / provider state / billing health table refs and their generated-function name columns. inflection: dns_1123 digest-suffixes values longer than 63 chars (50-char head + '-' + 12 hex of sha256) instead of truncating. Tests ported (pgsql-test imports kept), FK snapshot updated, bundles regenerated with pgpm package.
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Review complete. 🟡 1 medium 💬 Inline comments (1)
This PR changes the
Reviewed commit: 1c03e17 |
There was a problem hiding this comment.
PR #131 rewrites the SQL inflection.dns_1123 name-normalizer to a hash-truncation scheme and extends the billing/auth module table schemas, with matching generated bundle artifacts and tests.
Key findings
- 🟡 Declare
pgcryptofordns_1123'ssha256— dns_1123.sql:49
Summary
Ports the module drift that accumulated in
constructive-db/pgpm-modules/*since the last sync (84ce6026), following the same pattern as previous syncs (original table change files mutated in place, no ALTER changes, bundles regenerated withpgpm package).metaschema-modules
user_auth_module(+1 column, aftersweep_expired_sessions_function) — constructive-db #3830:billing_provider_module— operation ledger / provider state / billing health table refs (billing_operations_table_*,billing_provider_state_table_*,billing_health_table_*+ FKs, indexes,@module_tablecomments) and the generated-function name columns (reserve_billing_operation_function…record_billing_health_function). Verify file updated to match.constraintCount567 → 570 (three new FKs).inflection
dns_1123now digest-suffixes values > 63 chars (left(value,50)with trailing-trimmed +-+ first 12 hex ofsha256(original)) instead of truncating, so long namespaces can't collide. Test vectors ported.Deliberately not ported
LICENSE/Makefile/*.control/README.mddifferences: repo-specific boilerplate that previous syncs never carried over.constructive-test→ test imports staypgsql-testhere (this repo's convention; upstream renamed its test package).constraintCount: 565— stale on their side; the live schema here yields 570, which is what the snapshot now records.packages/types/__tests__/upload-ids.test.tsexists only here; kept.db-utils/infra-utilsexist upstream but not here and were never mirrored; left out (not part of the shared module set).Verified locally on Postgres 18:
pnpm testin both touched modules andpgpm test-packages --full-cycle(deploy → verify → revert) across all modules pass.Link to Devin session: https://app.devin.ai/sessions/81c4f0c6da0146aaaae029cb31c88ec8
Open in Devin Desktop: https://app.devin.ai/desktop/session/81c4f0c6da0146aaaae029cb31c88ec8?variant=devin
Requested by: @pyramation