Skip to content

feat: sync pgpm modules from constructive-db#100

Merged
pyramation merged 2 commits into
mainfrom
feat/sync-pgpm-modules-from-db
Jul 15, 2026
Merged

feat: sync pgpm modules from constructive-db#100
pyramation merged 2 commits into
mainfrom
feat/sync-pgpm-modules-from-db

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Syncs the standalone workspace from constructive-db/pgpm-modules (source of truth), porting SQL sources (deploy/verify/revert), pgpm.plan entries, and the affected generated sql/*.sql bundles. Standalone adaptations are preserved: workspace:* deps, pgsql-test test imports (except metaschema-modules, which already uses constructive-test in both repos), and each module's existing frozen extension version (bundles regenerated in place — no version churn).

New module

  • uuid — copied verbatim from db; adapted package.json (version0.32.1, @pgpm/verifyworkspace:*, dropped gitHead). Added a single packages/uuid importer to pnpm-lock.yaml (mirrors base32) so pnpm install --frozen-lockfile passes; no other lockfile churn. Not added to the CI test matrix (it has no tests, matching db).

Module content synced

  • metaschema-modules — new module tables: infra_config_module, infra_secrets_module, internal_secrets_module, webhook_module, integration_providers_module, db_preset_module; one_platform_scope constraints on the *_log_module/graph/events/db_usage tables; dropped config_secrets_module (superseded). Test + snapshot updated from db; sessions_module columns renamed sessions_tablesessions_table_name, session_credentials_tablesession_credentials_table_name.
  • metaschema-schemametaschema_private.is_valid_step_up validator wired into the table change's requires.
  • database-jobsschedule_min_interval_seconds estimator; authenticated EXECUTE grant on add_scheduled_job for INVOKER trigger support.
  • services, utils — source-tree sync (services revert tree; enforce_identity_providers_quota).

Notable non-obvious change

# packages/metaschema-modules/jest.config.js
-  testTimeout: 30000,
+  testTimeout: 60000,

The larger module set makes the information_schema.constraint_column_usage FK-introspection test straddle the old 30s limit (≈4s warm, ≈32s cold), so the timeout is bumped. Pure config; no assertion changes.

Testing

pnpm install --frozen-lockfile (pnpm 9, as CI) + pnpm test for every changed module — all green: utils, database-jobs, metaschema-schema, services, metaschema-modules (8/8, snapshots regenerated to include webhook_module, which db's own committed snapshot still lacks).

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

Sync SQL sources, plans, and generated bundles from constructive-db/pgpm-modules:
- add new uuid module
- metaschema-modules: new module tables (infra_config/infra_secrets/internal_secrets/
  webhook/integration_providers), platform-scope constraints, updated test+snapshot
- metaschema-schema: is_valid_step_up validator + step_up field wiring
- database-jobs: schedule_min_interval_seconds + add_scheduled_job execute grant
- services/utils: sync source trees
@pyramation pyramation self-assigned this Jul 15, 2026
@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

The sync's directory replacement overwrote the standalone repo's verify/revert
trees with constructive-db's (which is less complete), removing revert scripts
required by the integration-test full-cycle. Restore them from main and add
verify/revert for the two genuinely-new tables (integration_providers_module,
db_preset_module).
@pyramation
pyramation merged commit 1f6e611 into main Jul 15, 2026
23 checks passed
@pyramation
pyramation deleted the feat/sync-pgpm-modules-from-db branch July 15, 2026 09:46
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