Skip to content

Fix CI python version mismatch, address minor review findings, add pg…#2

Merged
aersam merged 1 commit into
mainfrom
followup-fixes
Jul 16, 2026
Merged

Fix CI python version mismatch, address minor review findings, add pg…#2
aersam merged 1 commit into
mainfrom
followup-fixes

Conversation

@aersam

@aersam aersam commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

…devkit.db and fetch-missing

  • CI: bump the workflow's python-version matrix to 3.14 to match requires-python, bump checkout/setup-python actions, and install podman (needed by conftest.py's ensure_testdb() on ubuntu-latest).
  • schema.py: generalize cross-file dependency tracking beyond tables so views/functions/procedures referencing each other also get correct apply ordering, not just table FKs. Also fix apply_schema's retry pass to re-seed .test_data.json, not just re-run the raw SQL.
  • query.py: replace naive ';'-splitting with a dollar-quote/string-literal aware statement splitter so run-sql on a file with a plpgsql function body doesn't get cut in half.
  • container.py: add test coverage for the "name already in use" race fallback branch.
  • config.py: validate extensions is actually a list.
  • tests/testdb: give test project names a per-process suffix so concurrent pytest runs (e.g. from separate worktrees) against the shared container don't drop each other's databases.
  • Add pgdevkit.db: an importable psycopg CRUD helper module (PgPool, PostgresTableModel, SqlLoader, pg_retrieve/pg_insert/pg_upsert/...) so projects depend on a version instead of copy-pasting reference files.
  • Add pgdb fetch-missing: reverse-engineers DDL for tables/views/functions that exist in the database but aren't tracked under database/, reusing the existing introspect/diff machinery.
  • Add docs/database-layout.md as the single source for the database/ folder convention, and a consolidated skills/pgdevkit/SKILL.md superseding postgres-test-setup, postgres-best-practices, and database-in-source (left in place in the separate skills repo for now).

Claude-Session: https://claude.ai/code/session_01GpwZzpmtp1c1ZHp9LT1Asd

…devkit.db and fetch-missing

- CI: bump the workflow's python-version matrix to 3.14 to match
  requires-python, bump checkout/setup-python actions, and install podman
  (needed by conftest.py's ensure_testdb() on ubuntu-latest).
- schema.py: generalize cross-file dependency tracking beyond tables so
  views/functions/procedures referencing each other also get correct apply
  ordering, not just table FKs. Also fix apply_schema's retry pass to
  re-seed .test_data.json, not just re-run the raw SQL.
- query.py: replace naive ';'-splitting with a dollar-quote/string-literal
  aware statement splitter so run-sql on a file with a plpgsql function body
  doesn't get cut in half.
- container.py: add test coverage for the "name already in use" race
  fallback branch.
- config.py: validate `extensions` is actually a list.
- tests/testdb: give test project names a per-process suffix so concurrent
  pytest runs (e.g. from separate worktrees) against the shared container
  don't drop each other's databases.
- Add pgdevkit.db: an importable psycopg CRUD helper module (PgPool,
  PostgresTableModel, SqlLoader, pg_retrieve/pg_insert/pg_upsert/...) so
  projects depend on a version instead of copy-pasting reference files.
- Add `pgdb fetch-missing`: reverse-engineers DDL for tables/views/functions
  that exist in the database but aren't tracked under database/, reusing
  the existing introspect/diff machinery.
- Add docs/database-layout.md as the single source for the database/
  folder convention, and a consolidated skills/pgdevkit/SKILL.md
  superseding postgres-test-setup, postgres-best-practices, and
  database-in-source (left in place in the separate skills repo for now).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GpwZzpmtp1c1ZHp9LT1Asd
@aersam
aersam merged commit b14abe5 into main Jul 16, 2026
1 check passed
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