feat(ingestion): add Phase 6 operator tooling, smoke validation, and verification tests

- Add app/ingest.py CLI command for standalone document ingestion
- Add app/ingestion_smoke.py opt-in real-provider smoke test harness with redacted diagnostics
- Add unit and integration tests for Phase 6 operator tooling and audit import coverage
- Update tests/README.md with Phase 5/6 acceptance test results
This commit is contained in:
amirhosein mazaheri
2026-10-07 16:21:52 +03:30
parent 9663caf48e
commit ff9c32823c
6 changed files with 932 additions and 2 deletions
+33 -1
View File
@@ -14,7 +14,7 @@ Run ordinary tests:
~~~
For database tests, configure an isolated TEST_DATABASE_URL as described in
[foundation setup](../docs/ingestion-foundation-setup.md), then run:
[foundation setup](../docs/guides/ingestion-foundation-setup.md), then run:
~~~powershell
.venv/Scripts/python -m tests.postgres_prerequisites
@@ -28,3 +28,35 @@ 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.
Phase 5 worker coverage is in unit/test_phase5.py and integration/test_phase5.py;
see [worker operations](../docs/guides/worker-orchestration.md). The 2026-10-07
provider-free full suite passed 1004 tests with 3 existing Windows symlink skips;
PostgreSQL acceptance passed 160 tests without skips on isolated PostgreSQL 16.15 /
pgvector 0.8.7. The final pointer guard rerun passed all 43 worker database tests.
Extended Phase 5 final acceptance (2026-10-07): provider-free **1050 passed,
3 existing Windows symlink skips**; isolated PostgreSQL **186 passed, no skips**.
New configuration/FAQ cases are in unit/test_phase5_review.py. The 69 worker/review
PostgreSQL cases include exact PDF/image/multi-page resume, concurrent decisions/
retry, source/lease races, revoked access, audit rollback and whole FAQ inclusion.
See [worker operations](../docs/guides/worker-orchestration.md) for the remaining
HTTP identity/Origin/CSRF dependency and real-provider limitations.
Phase 5 remaining-backend repair coverage is in unit/test_phase5_repairs.py and
integration/test_phase5.py: shared/section-specific FAQ conditions and exceptions,
excluded exclusive context, ambiguous/malformed relationship rejection, immutable
legacy factual review, identical versus conflicting attachment, stale/expired
fencing, bounded English/Persian review metadata, exact approved OCR resume,
genuine unreadability and context-preserving publication/mismatch rollback.
Latest full results: provider-free 1064 passed / 3 existing Windows symlink skips;
isolated PostgreSQL 196 passed, zero skips. See
[worker operations](../docs/guides/worker-orchestration.md) for exact commands,
database isolation and remaining HTTP/provider limitations.
Phase 6 integration proof lives in integration/test_phase6.py with real extraction
and support/embedding.py deterministic hash vectors. unit/test_phase6.py covers
opt-in provider smoke gates and redacted diagnostics. The real-provider command
python -m app.ingestion_smoke requires explicit corpus/provider configuration and
--allow-provider-calls; pytest never invokes a real provider. See the
[operator handoff](../docs/guides/ingestion-operator-handoff.md).