Skip to content

feat(api): add postgres-backed api_db tests and CI job#47

Merged
spideystreet merged 2 commits into
developfrom
feat/postgres-api-db-ci-tier
May 2, 2026
Merged

feat(api): add postgres-backed api_db tests and CI job#47
spideystreet merged 2 commits into
developfrom
feat/postgres-api-db-ci-tier

Conversation

@spideystreet
Copy link
Copy Markdown
Collaborator

@spideystreet spideystreet commented May 2, 2026

Summary

Adds a Postgres-backed FastAPI test tier (tests/api_db), a matching postgres-db GitHub Actions job (pgvector service, Prisma migrate deploy + seed), and LINKER_SKIP_SEMANTIC_INIT so CI can skip loading sentence-transformers.

Details

  • Local: DATABASE_URL=... LINKER_SKIP_SEMANTIC_INIT=true make test-database (see AGENTS.md)
  • API routes use shared row_mapping helpers; compose defaults Postgres bind to loopback (POSTGRES_BIND_ADDR)
  • Host Dagster: make dev uses workspace.host.yaml

Verification

  • pytest -m unit — 137 passed locally

- Add tests/api_db with database marker; skip locally when DATABASE_URL is unset
- GHA postgres-db job: pgvector, prisma migrate deploy + seed, pytest tests/api_db
- LINKER_SKIP_SEMANTIC_INIT skips sentence-transformers in FastAPI lifespan
- Consolidate SQL result mapping in row_mapping module
- make test-database target; default Postgres bind to loopback via POSTGRES_BIND_ADDR
- Host Dagster dev uses workspace.host.yaml; document verification tiers (AGENTS.md, README)
@spideystreet spideystreet self-assigned this May 2, 2026
…igration

Empty databases never had DDL for ProjectClassificationFailure, so prisma migrate deploy failed at 20260421130000. Insert 20260421121500 between prompt-version and drop-fk so the table exists (no FK).
@spideystreet spideystreet merged commit 9d4649b into develop May 2, 2026
10 checks 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