Async persistence, PostgreSQL default, pgvector image, separated integration tier#28
Merged
Conversation
ADR 0017 makes async the default and supersedes ADR 0006; ADR 0018 makes PostgreSQL (asyncpg, pgvector image) the default with SQLite (aiosqlite) optional; ADR 0019 takes coverage from unit+e2e and moves the Docker integration tier to a separate CI stage. copier.yml gains a database choice (postgres default) and an async, conditional database_url. Refs #24 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…gration tier Convert the whole persistence/service/entrypoint stack to async (create_async_engine, AsyncSession, async UoW/repositories/queries/handlers/routes, async Alembic) per ADR 0017; domain stays synchronous. Default to PostgreSQL via asyncpg with a pgvector/pgvector docker-compose service, SQLite (aiosqlite) optional, per ADR 0018. Per ADR 0019, the 100% coverage gate runs offline from unit (mocked) + e2e (in-memory async SQLite) for both database choices, while the real-Postgres integration tier is marked, skipped offline, and runs in a separate CI job. Bake matrix extended to database x include_user_example (4 combos), all green offline at 100%; integration tier verified against a real pgvector Postgres. Refs #24 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Async-only persistence + PostgreSQL default + separated integration tier
New scope requested on top of the Copier template (epic #24), recorded as three ADRs:
create_async_engine,AsyncSession, async UoW/repositories/queries/handlers/routes, async Alembic); the domain stays synchronous.pgvector/pgvectordocker-compose service (image only, no vector column); SQLite (aiosqlite) optional via a Copierdatabasechoice.unit(mocked) +e2e(in-memory async SQLite) for both DB choices; the real-Postgres integration tier is marked, skipped offline, and runs in a separate CI job with a pgvector service.Validation
database × include_user_example= 4 combos, all green at 100% (ruff, ruff format, pyrefly, pytest). Independently re-run: 18 passed.pgvector/pgvector:pg17): integration tier 9 passed (User on) / 4 passed (User off);alembic upgrade headover asyncpg verified.aiosqliteregardless of the chosen runtime DB, so the gate stays offline and fast even for Postgres projects.Note
Adds
concurrency = ["thread", "greenlet"]to the generated coverage config (load-bearing for measuring post-awaitbranches under SQLAlchemy's greenlet bridge) — documented in ADR 0019.Refs #24
🤖 Generated with Claude Code