feat(ingestion): add Phase 1 database and application foundation

Add the scoped PostgreSQL/pgvector schema, independent ingestion settings and ports, embedding profile checks, and trusted administrator bootstrap.

Include repository contracts and guidance, organized provider-free and PostgreSQL tests, deployment setup, and byte-preserving migration attributes.

Validation: 163 tests passed; all 48 PostgreSQL cases passed with pgvector Python 0.5.0 and 0.3.6. No production schema or historical metadata was changed.
This commit is contained in:
amirhosein mazaheri
2026-10-05 16:38:28 +03:30
parent cb54a35c90
commit baf58da562
50 changed files with 4628 additions and 3 deletions
+30
View File
@@ -0,0 +1,30 @@
# Test layout
- unit/: provider-free configuration, URL security, imports and test-environment regressions.
- integration/: PostgreSQL constraints, migration/profile lifecycle, concurrency, native vectors and schema isolation.
- support/: reusable PostgreSQL lifecycle and row helpers; helpers do not live in test modules.
- conftest.py: shared settings, isolated environment and acceptance option.
- integration/conftest.py: database fixtures and postgres marker for all integration cases.
- postgres_prerequisites.py: unchanged prerequisite command entry point.
Run ordinary tests:
~~~powershell
.venv/Scripts/python -m pytest -m "not postgres"
~~~
For database tests, configure an isolated TEST_DATABASE_URL as described in
[foundation setup](../docs/ingestion-foundation-setup.md), then run:
~~~powershell
.venv/Scripts/python -m tests.postgres_prerequisites
.venv/Scripts/python -m pytest -m postgres --require-postgres
~~~
Use .venv/minimum/Scripts/python for the minimum pgvector dependency environment.
The same commands and assertions apply. Missing database configuration fails
explicit acceptance; skipped database cases are not passing evidence.
Organization validation: installed environment full suite 163 passed; minimum
pgvector 0.3.6 PostgreSQL suite 48 passed. Both prerequisite checks passed.
Production code and migration history were unchanged.