Mirrored from https://github.com/davoodmehraban89/Aram.git
Synced Dec 3, 20:45 UTC
source-data-cleanup
ADR-017 — CI quality gates and tooling
- Status: Accepted (Phase 0, D-12)
- Date: 2026-12-03
- Booklet: §13 (CI gates), §12 (D-12), §19 (no dependency without ADR)
Context
The booklet requires green CI gates: ruff, mypy --strict, coverage (domain ≥90%,
total ≥80%), SQLite + PostgreSQL migration round-trips, and git diff --check.
The existing workflow only ran pytest + SQLite migrations + compileall.
Decision
Add dev tooling to the test extra (single install in CI):
ruff— lint + format check.mypy— static typing,--stricton the pure domain layer first; the broader package is type-checked with pragmatic settings and tightened toward strict as the services/api layers mature (Phases 1–7).coverage/pytest-cov— enforce domain ≥90% and total ≥80%.pip-audit— dependency vulnerability scan (advisory; fails on known CVEs).
CI matrix runs migrations on SQLite and PostgreSQL (service container) in
addition to the test suite. git diff --check guards whitespace.
New dependencies (justification)
| Package | Purpose | Runtime? |
|---|---|---|
| ruff | lint/format gate | dev only |
| mypy | type gate | dev only |
| coverage, pytest-cov | coverage gate | dev only |
| pip-audit | vuln scan | dev only |
| psycopgbinary | PostgreSQL driver for CI migration matrix | CI only |
None are imported by the application at runtime; the offline desktop build is
unaffected (P-10, zero runtime network). The ci extra is installed only in the
migration-matrix job, never in the packaged desktop runner.
Consequences
- Every PR must pass lint, types, coverage, and dual-dialect migrations.
- Domain code is held to strict typing from Phase 0; other layers ratchet up.
Rejected alternatives
- Coverage without a threshold: no enforcement.
- Skipping PostgreSQL: the booklet requires both dialects for migration safety.