Skip to content

feat: integration tests, coverage enforcement & CI hardening#2

Merged
Orsso merged 2 commits into
mainfrom
ci/coverage-integration-tests-frontend
Mar 18, 2026
Merged

feat: integration tests, coverage enforcement & CI hardening#2
Orsso merged 2 commits into
mainfrom
ci/coverage-integration-tests-frontend

Conversation

@Orsso

@Orsso Orsso commented Mar 18, 2026

Copy link
Copy Markdown
Owner

Summary

  • Coverage enforcement: pytest-cov with 50% floor (currently at 62%) on core/, api/, db/
  • PostgreSQL in CI: service container + Alembic migrations applied before tests
  • 52 new backend integration tests: 5 repositories (24 tests), 4 routers (27 tests), Alembic migrations (1 test) — all against real PostgreSQL
  • 15 new frontend tests: Vitest + jsdom setup, tests for utils.ts (timeAgo, cn) and tool-meta.ts
  • Pyright enforced in CI: 0 errors on core/, api/, db/
  • Alembic single-head check: catches migration branch divergence before merge
  • Bug fix: eager_defaults=True on Base prevents MissingGreenlet when accessing onupdate columns after async flush

Test plan

  • CI pipeline passes (PostgreSQL service, migrations, all 209+15 tests, coverage ≥ 50%, pyright, ruff, frontend lint+typecheck+tests)
  • Docker builds still succeed

- pytest-cov with 50% threshold enforced (currently 62%)
- PostgreSQL service container in CI for real DB tests
- 52 new backend integration tests (repositories, routers, migrations)
- 15 new frontend tests (Vitest + jsdom for utils and tool-meta)
- Pyright type-checking enforced in CI (0 errors)
- Alembic single-head check to catch migration divergence
- Fix: eager_defaults on Base prevents MissingGreenlet on onupdate columns

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87dc4da5da

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/conftest.py
Comment thread tests/test_migrations.py Outdated
Address review feedback:
- Default to data_agent_test DB locally (never touches dev data)
- Auto-create test DB and apply migrations on first run
- Fix admin connection in migration test to derive from DATABASE_URL
- CI still uses DATABASE_URL from workflow env
@Orsso
Orsso merged commit 29ba49e into main Mar 18, 2026
6 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