Files
rag-technical-docs-assistant/tests
amirhosein mazaheri 8d348f0ba1 feat(voice): add isolated Local S2S v3 candidate and acceptance evidence
Extract the provider boundary while retaining OpenAI/Gemini contracts. Add
an opt-in isolated Local S2S adapter, pinned engine extension, bounded
component gateway and frozen effective configuration profiles.

Enforce request token limits, zero retries, local asset validation,
connection deadlines, disconnect ownership, bounded cleanup and signals.
Include regression coverage, pinned source fixtures, operator guidance,
asset fingerprints and guarded disposable PostgreSQL acceptance tooling.
Preserve immutable fixture bytes across Git line-ending conversion.

Validation recorded in the reports:
- 74 repair, 107 combined and 242 preservation checks passed.
- Fresh PostgreSQL local checks: 2 passed.
- Expanded PostgreSQL: 57 passed, 6 documented baseline failures.
- Compose configurations, staged whitespace and fixture hashes passed.

Phase 1 live listening and Phase 2 complete engine/SDK/POSIX, real component
audio and Persian browser acceptance remain pending. No operational switch,
paid call, model download or Phase 3 implementation is included.
2026-10-15 12:28:17 +03: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:

.venv/Scripts/python -m pytest -m "not postgres"

For database tests, configure an isolated TEST_DATABASE_URL as described in foundation setup, then run:

.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.

Phase 5 worker coverage is in unit/test_phase5.py and integration/test_phase5.py; see worker operations. 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 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 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.