Skip to content

feat: upstream all changes from constructive-db main#75

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

feat: upstream all changes from constructive-db main#75
pyramation merged 5 commits into
mainfrom
feat/upstream-from-constructive-db

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented May 28, 2026

Summary

Syncs deploy/revert/verify source files from constructive-db main (post-merge of #1388), excluding internal-only modules (node_type_registry). Preserves pgpm-modules versioning (bumped to 0.26.1).

Provision fixes (from constructive-db #1388):

  • SECURITY DEFINER on partman wrapper functions (create_parent_with_retention, run_maintenance_by_id) — fixes pg_partman 5.x SET ROLE 'postgres' privilege limitation
  • Extended partman schema grants: USAGE, CREATE, table DML, ALTER DEFAULT PRIVILEGES
  • Partition table added to metaschema-schema (deploy/revert/verify + pgpm.plan entry)

Other upstream changes:

  • database-jobs: organization_id + entity_type columns on jobs table and add_job
  • metaschema-modules: deploy changes for agent_module, config_secrets_user_module, entity_type_provision, function_module, memberships_module, merkle_store_module, namespace_module, storage_module
  • object-tree: revert script preserved

Excluded from upstream:

  • node_type_registry — internal to constructive-db
  • Verify files referencing columns not in pgpm-modules deploys (restored to main versions)
  • Services package — intentionally diverged between repos

All SQL packages regenerated as 0.26.1.

Review & Testing Checklist for Human

  • Verify SECURITY DEFINER is present on both partman wrapper functions and the justification comments make sense
  • Confirm node_type_registry is NOT included (it's internal to constructive-db)
  • Spot-check partition table deploy/revert/verify matches constructive-db source
  • Run a local provision to verify the three fixes work end-to-end (partman wrappers, partition INSERT ordering, partition table in metaschema-schema)
  • Verify database-jobs snapshot includes new organization_id and entity_type columns

Notes

  • Version bumped from 0.26.0 to 0.26.1 for all changed packages (partman, metaschema-schema, metaschema-modules, database-jobs, object-tree)
  • Several verify/revert files were restored from pgpm-modules main where constructive-db had diverged (removed files for modules still in pgpm.plan)
  • The namespace_module deploy has structural changes (added key column, removed some columns, changed unique constraint)"

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

@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, CI, and merge conflict monitoring

Syncs deploy/revert/verify source files from constructive-db, excluding
internal-only modules (node_type_registry). Key changes:

Provision fixes:
- SECURITY DEFINER on partman wrappers (create_parent_with_retention,
  run_maintenance_by_id) for pg_partman 5.x SET ROLE privilege fix
- Extended partman schema grants (USAGE, CREATE, table DML, ALTER DEFAULT PRIVILEGES)
- Partition table added to metaschema-schema (deploy/revert/verify + pgpm.plan)

Other upstream changes:
- database-jobs: organization_id + entity_type columns on jobs table and add_job
- metaschema-modules: agent_module → agent_chat_module rename, removed deprecated
  modules (config_secrets_org, graph, merkle_store, session_secrets), verify fixes
- object-tree: revert script fix

All SQL packages regenerated as 0.26.1.
@devin-ai-integration devin-ai-integration Bot force-pushed the feat/upstream-from-constructive-db branch from 1a752c9 to 5e8a4ce Compare May 28, 2026 03:37
…snapshot

- Restored DROP FUNCTION set_props_and_commit in object-tree revert
  (needed for clean schema drop during integration tests)
- Updated database-jobs snapshot to include organization_id and entity_type columns
Verify files for tables where only the verify (not deploy) changed from
constructive-db were restored to pgpm-modules main versions. These verify
files reference columns that don't exist in the pgpm-modules deploy.

Restored: secure_table_provision, relation_provision, blueprint,
compute_log_module, db_usage_module, inference_log_module, profiles_module,
storage_log_module, transfer_log_module verify files.

Also restored object-tree set_and_commit revert (needed for integration test).
Regenerated SQL packages.
Constructive-db removed revert/verify files for modules it considers
deprecated, but pgpm-modules still has them in the plan and deploys them.
The integration test runs deploy→verify→revert and needs all three files.

Restored: agent_module, config_secrets_org_module, entity_type_provision,
graph_module, merkle_store_module, session_secrets_module revert+verify files.
Removed orphaned agent_chat_module files (not in pgpm.plan).
constraintCount changed from 394604 to 396560 due to new columns
in namespace_module and other deploy changes.
@pyramation pyramation merged commit 5dd1799 into main May 28, 2026
24 checks passed
@pyramation pyramation deleted the feat/upstream-from-constructive-db branch May 28, 2026 03:53
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