Skip to content

feat: add constructive-platform-seed (compute API + domain + site metadata)#63

Open
pyramation wants to merge 1 commit into
feat/compute-workerfrom
feat/platform-seed
Open

feat: add constructive-platform-seed (compute API + domain + site metadata)#63
pyramation wants to merge 1 commit into
feat/compute-workerfrom
feat/platform-seed

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Adds pgpm/constructive-platform-seed — an idempotent seed package that registers the platform metadata required for API resolution, mirroring how constructive-db's provisioning system attaches apis/domains/sites in production without RLS.

The seed creates the full routing chain the server needs to resolve a request into schemas:

services_public.domains ('compute.localhost')
  → services_public.apis ('compute', authenticated/anonymous, public)
    → services_public.api_schemas (5 links)
      → metaschema_public.schema (infra, store, objects, fbp, storage)
        → metaschema_public.database (well-known 00000000-…-000000000000)

All inserts use ON CONFLICT DO NOTHING for idempotency. The compute API exposes all 5 module public schemas (constructive_infra_public, _store_public, _objects_public, _fbp_public, _storage_public).

scripts/up.sh deployment order updated:

Step 4: modules (infra, store, objects, fbp, storage)
Step 5: constructive-platform-seed  ← NEW (creates database row + metadata)
Step 6: constructive-infra-services ← NEW (registers function_module, needs DB row)
Step 7: constructive-infra-seed     (seeds namespaces + function definitions)

The package declares requires = 'metaschema-schema,services' — pgpm resolves these from the vendored extensions/@pgpm/ packages (no new external deps).

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

…adata)

Adds a new pgpm package that seeds the platform metadata required for
API resolution, mirroring how constructive-db's provisioning system
attaches apis/domains/sites in production — without RLS.

Seeds (all idempotent via ON CONFLICT):
- metaschema_public.database row (well-known zero UUID)
- metaschema_public.schema rows for all 5 module public schemas
- services_public.apis 'compute' API (authenticated/anonymous, public)
- services_public.api_schemas linking compute API to all 5 schemas
- services_public.domains 'compute.localhost' routing to compute API
- services_public.sites + 'app.localhost' site domain

Deployment order in up.sh:
  modules → platform-seed → infra-services → infra-seed

The platform-seed declares requires='metaschema-schema,services' which
pgpm resolves from extensions/@pgpm/ (vendored upstream packages).
@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

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