feat: add standalone constructive-infra pgpm package#51
Conversation
Sliced from constructive-db's monolithic constructive module using: pnpm run slice:constructive -- --renumber-alterations --strip-cross-package-deps Package includes: - constructive_infra_public schema, types, and all tables - constructive_infra_private schema and trigger functions - 254 changes, 764 files Standalone: requires only plpgsql, pgpm-inflection, pgpm-stamps No RLS policies, no grants, no job triggers
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…mignore) The slicer now generates a complete pgpm module with: - package.json with @pgpm/* dependencies mapped from .control requires - Makefile with PGXS include - .npmignore excluding test files This fixes 'No package.json found' error when running pgpm install.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
…ema stripping - Add missing deploy dependencies (type, constraint→column, FK→pkey) - Plan is now topologically sorted for correct deploy order - Remove metaschema partition registrations (INSERT INTO metaschema_public.*) that require the closed-source MetaSchema system - Successfully tested: pgpm deploy --yes --createdb --database testinfra
…tion Separate pgpm module that registers the constructive-infra function tables as a MetaSchema function_module. This allows querying MetaSchema to discover the infra function tables (definitions, invocations, execution_logs, secret_definitions). Dependencies: - constructive-infra (the raw DDL) - @pgpm/metaschema-modules (function_module table) - @pgpm/services (service registration layer) The registration INSERT provides explicit schema/table names for the platform-scoped infra tables, letting the MetaSchema trigger system handle ID resolution and API routing.
Adds a CI workflow that runs 'pgpm test-packages --full-cycle' on every PR that touches pgpm/ files. This validates the full deploy/verify/revert/deploy cycle for constructive-infra against a real postgres-plus:18 instance. constructive-infra-services is excluded since it requires the full MetaSchema system (closed-source triggers) to deploy. Also fixes the function_requirement type revert SQL which was missing the TYPE keyword (DROP → DROP TYPE).
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Summary
Adds standalone pgpm packages for the constructive-infra schema, sliced from constructive-db's monolithic export, plus a CI workflow to continuously validate they deploy correctly.
Three additions:
pgpm/constructive-infra— Standalone DDL (schemas, types, tables, columns, constraints, indexes, triggers) for the infra function system:platform_function_definitions,platform_function_invocations,platform_function_execution_logsplatform_secret_definitions,platform_namespaces,platform_namespace_eventspgpm/constructive-infra-services— MetaSchema registration layer:constructive-infra+@pgpm/metaschema-modules+@pgpm/servicesfunction_moduleINSERT to register infra tables as a MetaSchema module.github/workflows/pgpm-test.yaml— pgpm integration test workflow:pgpm test-packages --full-cycleagainstpostgres-plus:18on every PR touchingpgpm/pgpm-modulesrepoAlso adds
pgpm.jsonworkspace config at root.Companion PR: https://github.com/constructive-io/constructive-db/pull/1575 (slicer improvements that make this reproducible)
Link to Devin session: https://app.devin.ai/sessions/e4d315e507cf4d95ac42056ad22b8925
Requested by: @pyramation