Skip to content

feat: upstream pgpm-modules from constructive-db#70

Merged
pyramation merged 4 commits into
mainfrom
feat/upstream-from-constructive-db
May 19, 2026
Merged

feat: upstream pgpm-modules from constructive-db#70
pyramation merged 4 commits into
mainfrom
feat/upstream-from-constructive-db

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented May 19, 2026

Summary

Syncs all diverged pgpm-modules/* packages from constructive-db into this repo. Key changes by package:

partman (user-requested focus):

  • New create_parent_with_retention procedure — wraps partman.create_parent + sets retention/retention_keep_table on part_config
  • Updated create_parent_by_id to delegate to create_parent_with_retention

metaschema-modules:

  • Renamed: encrypted_secrets_moduleconfig_secrets_user_module, secrets_moduleuser_state_module, levels_moduleevents_module
  • Added: config_secrets_org_module, inference_log_module, rate_limit_meters_module
  • Removed: table_template_module
  • Updated: billing_module (meter_credits columns), entity_type_provision (invite achievements, array-only multi-module storage config), limits_module, realtime_module, storage_module

metaschema-schema:

  • table: added partition columns (partitioned, partition_strategy, partition_key_names, partition_key_types)
  • embedding_chunks: added search_indexes, embedding_model, embedding_provider columns
  • node_type_registry seed: updated from 61 → 73 node types

services: Added enable_bulk column to api_settings and database_settings

object-store / object-tree: Updated READMEs

Cross-cutting: Added forceExit: true to all jest configs

Items NOT upstreamed (constructive-db has stale/incompatible versions):

  • Verify files for blueprint, relation_provision, secure_table_provision — constructive-db verifies reference node_type/node_data columns that don't exist in the deploy (deploy uses nodes). Kept pgpm-modules originals.
  • database-jobs tests — constructive-db test uses a different add_scheduled_job signature (no db_id param) that doesn't match the deployed function.
  • object-tree revert — constructive-db removed DROP FUNCTION set_props_and_commit from the revert, but the deploy still creates it. Kept both DROPs so revert works cleanly.
  • pgpm dependency bump (^4.24.3^4.24.4) — deferred to avoid lockfile churn; caret range already covers it.

Review & Testing Checklist for Human

  • Verify partman.create_parent_with_retention procedure logic — especially the UPDATE partman.part_config SET retention = ... path
  • Confirm the 6 module renames/additions/removals are intentional (encrypted_secrets→config_secrets_user, secrets→user_state, levels→events, +config_secrets_org, +inference_log, +rate_limit_meters, -table_template)
  • Spot-check config_secrets_org_module revert/verify — these were created since constructive-db was missing them (modeled after config_secrets_user_module pattern)
  • Run pgpm deploy --createdb locally to verify full deploy/verify cycle
  • Cross-reference constructive-db to confirm the stale items listed above are intentionally not upstreamed

Notes

  • All 24 CI checks pass (22 unit tests + integration test + socket security)
  • The constructive-db repo has some verify/test files that are out of sync with their own deploy files — those were intentionally not upstreamed to avoid breaking pgpm-modules

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

Major changes:
- partman: add create_parent_with_retention procedure, update create_parent_by_id to support retention params
- metaschema-modules: rename encrypted_secrets_module → config_secrets_user_module, secrets_module → user_state_module, levels_module → events_module; add config_secrets_org_module, inference_log_module, rate_limit_meters_module; remove table_template_module; update billing_module (meter_credits), entity_type_provision (invite achievements, multi-module storage), limits_module, realtime_module, storage_module
- metaschema-schema: add partition columns to table, add embedding_chunks columns (search_indexes, embedding_model, embedding_provider), update node_type_registry seed (73 node types)
- services: add enable_bulk column to api_settings and database_settings
- object-tree: fix set_and_commit revert
- object-store/object-tree: update READMEs
- database-jobs: update tests for JWT claims-based db_id
- all packages: add forceExit to jest configs, bump pgpm to ^4.24.4
@devin-ai-integration
Copy link
Copy Markdown

🤖 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 and CI monitoring

The deploy creates both set_and_commit and set_props_and_commit, so
the revert must drop both to allow the schema to be dropped cleanly.
…apshots

- Revert verify files for blueprint, relation_provision, secure_table_provision
  (constructive-db verifies referenced columns that don't exist in deploy)
- Revert database-jobs test changes (function signature mismatch)
- Update metaschema-modules test snapshots for new module table names
@pyramation pyramation merged commit 16ca859 into main May 19, 2026
24 checks passed
@pyramation pyramation deleted the feat/upstream-from-constructive-db branch May 19, 2026 22:28
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.

1 participant