Skip to content

feat: add missing modules to pgpm export flow#1197

Merged
pyramation merged 2 commits into
mainfrom
feat/export-missing-modules
May 20, 2026
Merged

feat: add missing modules to pgpm export flow#1197
pyramation merged 2 commits into
mainfrom
feat/export-missing-modules

Conversation

@pyramation
Copy link
Copy Markdown
Contributor

@pyramation pyramation commented May 19, 2026

Summary

Syncs the export flow with the current state of pgpm-modules/metaschema-modules. Several modules were added, renamed, or removed in the upstream pgpm-modules repo but the export config here was stale.

Changes:

File Change
pgpm/export/src/export-utils.ts Add pgpm-partman to DB_REQUIRED_EXTENSIONS
Remove pgpm-uuid from DB_REQUIRED_EXTENSIONS (vestigial — no SQL uses uuids.* functions, metaschema.control doesn't require it)
Rename levels_moduleevents_module in META_TABLE_ORDER + META_TABLE_CONFIG (with new fields: events/aggregates/types tables, partition config, achievement rewards)
Remove table_template_module (superseded by blueprints)
Add inference_log_module config (partitioned inference log + usage_daily rollup)
Add rate_limit_meters_module config (state, overrides, window_limits, check function)
Add comment noting blueprint_template/blueprint/blueprint_construction are intentionally excluded
pgpm/core/src/modules/modules.ts Add 'pgpm-partman': '@pgpm/partman' to PGPM_MODULE_MAP

Review & Testing Checklist for Human

  • Verify events_module fields match the actual metaschema_modules_public.events_module table DDL
  • Verify inference_log_module and rate_limit_meters_module fields match their table DDLs
  • Run pgpm export against a provisioned database to confirm the new modules are picked up correctly
  • Confirm removing pgpm-uuid from required extensions doesn't break any existing export flows

Notes

  • Blueprint tables (blueprint_template, blueprint, blueprint_construction) are intentionally NOT in the export flow — they are runtime-only tables, not exported metadata
  • table_template_module was removed from pgpm-modules (superseded by blueprints) — removed from config with a comment explaining why
  • pgpm-uuid was removed because: no SQL references uuids.* functions, metaschema.control doesn't list it in requires, no pgpm-module depends on it. The uuid_module uses metaschema.uuid_seed GUC instead.
  • Build passes cleanly (pnpm build at workspace root)

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

- Add pgpm-partman to DB_REQUIRED_EXTENSIONS
- Add pgpm-uuid and pgpm-partman to PGPM_MODULE_MAP
- Rename levels_module -> events_module (with updated fields)
- Remove table_template_module (superseded by blueprints)
- Add inference_log_module config (partitioned log + daily rollup)
- Add rate_limit_meters_module config (state, overrides, window limits)
- Add comment noting blueprint tables are intentionally excluded
@devin-ai-integration
Copy link
Copy Markdown
Contributor

🤖 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

pgpm-uuid is vestigial — no SQL in constructive-db references uuids.* functions,
metaschema.control does not require it, and no other pgpm-module depends on it.
The uuid_module table uses different mechanisms (metaschema.uuid_seed GUC).
@pyramation pyramation merged commit e92d360 into main May 20, 2026
37 checks passed
@pyramation pyramation deleted the feat/export-missing-modules branch May 20, 2026 00:38
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