feat(pgpm): pgpm env keeps already-set PG* vars; pgpm skill accepts a developer's own Postgres - #1804
pyramation wants to merge 1 commit into
Conversation
…loper's own Postgres - pgpm env no longer overwrites PGHOST/PGPORT/PGUSER/PGPASSWORD/PGDATABASE that the shell already has; it fills in the missing ones and prints a '# keeping ...' comment. --reset (and --supabase) overwrite as before. - pgpm skill: check pg_isready before starting Docker, reuse an existing server with the developer's credentials, never stop it to free 5432; --port 5433 + PGPORT=5433 only when both are wanted. Add the ERR_PNPM_IGNORED_BUILDS -> pnpm-policy.yaml row.
🤖 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:
|
|
Review complete. No issues found — approved ✅. This PR refactors
The change is well-scoped and tested; the keep/overwrite logic and object-store handling are covered by the new test cases. Reviewed commit: c0a08e9 |
|
Superseded by a docs-only PR (the |
Summary
Onboarding follow-up (constructive-io/constructive-planning#1970): a developer who already runs PostgreSQL on 5432 was told by the pgpm skill to
lsof -i :5432and stop it, andeval "$(pgpm env)"silently replaced their credentials with the Docker defaults. Both are fixed here; the boilerplate side is constructive-io/pgpm-boilerplates#45.pgpm env— PG* variables already present in the shell win; only the missing ones come from the profile, and the output says so:New
--resetrestores the old overwrite-everything behaviour;--supabaseimplies it (an explicit profile switch should switch). Same rule applies in exec mode (pgpm env pnpm test). The logic is pulled into an exportedresolveEnvVars(profile, existing, { objectStore, reset })with unit tests; object-store vars (CDN_ENDPOINT,AWS_*) are always emitted as before.pgpm skill (
.agents/skills/pgpm, installed into every new workspace bypgpm init): Quick Start and the docker/env/troubleshooting references now say — checkpg_isready -h localhost -p 5432first; if it answers, use that server with the developer's superuser credentials andpgpm admin-users bootstrap --yes, never stop it; want the container as well →pgpm docker start --port 5433+export PGPORT=5433. The "port in use → stop conflicting process" rows are gone. Added anERR_PNPM_IGNORED_BUILDS→ editpnpm-policy.yaml, don'tpnpm approve-buildsrow.Verified:
pgpm/clijest (__tests__/env.test.ts), eslint,tsc --noEmit, and the built CLI output above.Link to Devin session: https://app.devin.ai/sessions/1ef0d1c209f041afa29e0e4cc4b2cb29
Open in Devin Desktop: https://app.devin.ai/desktop/session/1ef0d1c209f041afa29e0e4cc4b2cb29?variant=devin
Requested by: @pyramation