Skip to content

feat(pi): switch provision_database to requestDatabase - #1692

Merged
pyramation merged 2 commits into
mainfrom
feat/pi-request-database
Aug 10, 2026
Merged

feat(pi): switch provision_database to requestDatabase#1692
pyramation merged 2 commits into
mainfrom
feat/pi-request-database

Conversation

@marslavish

Copy link
Copy Markdown
Contributor

Summary

  • provision_database now requests through the requestDatabase mutation on the api endpoint instead of inserting a databaseProvisionModule row; the JWT user owns the database, so ownerId is no longer sent
  • new preset-match.ts mirrors the backend's modules_hash semantics (order-insensitive, bare name = empty-options tuple, canonicalized options): a preset-equal module set sends presetSlug (warm-pool eligible), any delta sends explicit modules — never both
  • new request-database.ts polls the provision ticket on the modules endpoint (2 s interval, 240 s deadline, 3 consecutive failed polls tolerated, mutation ticket checked before the first sleep) until status and bootstrapStatus are both completed; failures surface errorMessage / bootstrapError
  • dropped the blanket withRetry around provisioning; deleted create-database-provision.ts
  • stable: module paths and exports (env-file, resolve, pg-fixups, credential, db-probe), tool name/args, ProvisionDatabaseDetails shape, .env write before return, probe/skip/reprovision, pg fixups, prewarm
  • 22 new tests (injectable executor + branch selection); README documents the flow and the local jobs-worker requirement

@pyramation
pyramation merged commit 940a8b3 into main Aug 10, 2026
20 checks passed
@pyramation
pyramation deleted the feat/pi-request-database branch August 10, 2026 01:26
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.

2 participants