For the current modular document/voice backend, use the [Phase 4 startup and recovery guide](docs/guides/phase4-backend-operations.md) and [acceptance evidence](docs/guides/realtime-agent-phase4-acceptance.md). Install `.[api,voice,embedding]`, apply online migrations, and run one `python -m app.server` process with a separate `python -m app.worker`. Service readiness does not certify calibrated retrieval or usable grounded voice. The paragraphs and prototype walkthrough below preserve older checkpoints.
Phase 6 adds [integration validation and operator handoff](docs/guides/ingestion-operator-handoff.md), redacted worker heartbeat/stage diagnostics and an opt-in real-provider smoke command. The existing chat retriever still uses Chroma/FastEmbed and does not search uploaded PostgreSQL chunks. Scoped pgvector search and authorized knowledge selection are the next milestone; published documents remain inactive.
Current target: the English [LangChain Live document MVP](docs/specifications/RAG-AI-Phase1-Delivery-Plan.md), with new browser uploads and direct Persian speech-to-speech. Ingestion Phases 1-4 plus the [Phase 5 worker, publication and retry](docs/guides/worker-orchestration.md) are implemented. Durable review decisions/resume and factual FAQ inclusion are implemented behind trusted backend services. Scoped uploaded-document retrieval, HTTP identity/upload/review transport, Live and UI remain planned. See [documentation and implementation order](docs/README.md) and [recorded setup/validation](docs/guides/ingestion-foundation-setup.md). The four sample files are acceptance examples, not the accepted corpus. The startup/API details below describe the legacy prototype.
its existing native cancellation/truncation contract. Canonical search, original
documents, frozen profiles and owner/replay/revocation rules remain unchanged.
See [Phase 2 repair report](guides/realtime-agent-phase2-repair.md).
Use this index to select the governing contract and inspect the real implementation before changing, testing, or reviewing behavior. Paths are relative to this file. Current voice contract amended 2026-10-08 by Realtime Phase 0; English revision 1.3 remains the broader scope baseline. Historical component evidence below is preserved; the English revision 1.3 documentation checkpoint reran no application/provider/database tests; current repair acceptance is recorded at the end. Use the latest applicable recorded acceptance, not earlier unavailable-database reports. Dated component records below describe their historical checkpoint; absence-of-worker statements there are superseded by the current Phase 5/6 inventory and repair evidence.
@@ -71,7 +74,7 @@ Ingestion foundation now exists: [manifest](../pyproject.toml), [settings/types/
| `git status --short` | Executed for working-tree inspection |
| `git diff --check` | Executed for tracked whitespace validation; untracked new files need separate inspection |
| `python -m app.services.agent.exec` | README example and CLI entry point verified statically; provider smoke harness, not automated regression tests; not run |
Prototype runtime prerequisites remain unverified: configured credentials, approved corpus, writable vector storage, and provider/model access. Importing the application creates settings/retrieval singletons and can load embeddings/index documents. Do not use imports as a supposedly network-free smoke test. README installation now uses pyproject.toml extras. Foundation imports are independent of those prototype prerequisites. Verified foundation commands are listed below; current worker commands and acceptance are in the Phase 5 section at the end of this map.
@@ -1871,3 +1874,194 @@ Regression sources add `tests/unit/test_phase2_remaining.py` and executable
acceptance uses a local transport bridge; Node executes the delivered client and
worklet. Exact results and unrun real-provider/browser prerequisites are in the
repair record. No selected-model multi-turn or frontend readiness claim is made.
## Phase 2 provider selection and transport repair (2026-10-09)
Current locations: [selected provider factory](../app/infrastructure/voice_provider.py),
16 populated draft answerable labels, four unseen slots pending and six draft
unsupported labels. Drafts do not constitute independent frozen approved labels.
| Required input | Observed status / exact blocker |
| --- | --- |
| Developer UI checkout / URL / Origin | Not supplied; developer says UI is under development. No matching checkout found under `/home/moz/Projects/raymand`; broader frontend candidates did not establish this project's UI. |
| Approved corpus and hash-to-document bindings | No approved bindings package supplied or configured in `.env`. Sample originals are not approval. |
| Enabled persisted acceptance actor | No acceptance actor ID supplied or configured; disposable test actors do not qualify. |
| Human extraction and factual decisions | No approved decision package supplied; never synthesized. |
| Measured finalized calibration | Configured report is pending with null cutoff; retrieval stays fail-closed. |
| Ingestion opt-in and budget | Not supplied. Worker was not started against an operational corpus. |
| Calibration opt-in and budget | Not supplied; existing command caps at ten query embedding calls. |
| Evaluation opt-in and budget | Not supplied; existing command permits up to 26 calls. |
| Voice opt-in and budget | Not supplied for either provider; existing smoke permits at most 600 seconds and ten tool calls. A key's presence is not spending authorization. |
| Large D07 JSON, concurrent loop heartbeat | passed | 26,784,224 bytes: 994.92 ms processing, 96 ticks, 13.06 ms maximum gap; 59,504,172 bytes: 5,617.58 ms, 546 ticks, 16.21 ms maximum gap. Actual escaped JSON/DTO processing; both below the existing 100 ms regression threshold. |
| JSON admission, malformed bodies, timeout/cancellation and child/spool cleanup | passed | Focused 92-case suite includes real-child creation cancellation, disk lifetime ownership and normalized DTO retention. |
| Restored ingestion, HTTP repairs, Gemini fake transport and cold-start preparation | passed | Same focused suite; all 55 restored ingestion tests, ten Gemini adapter tests, startup preparation off-loop before readiness. |
| Full provider-free regression | passed | 1,753 passed, two existing Windows-path skips, 397 PostgreSQL cases deselected; 176.37 s. 25 existing WebSocket deprecation warnings. |
| Isolated PostgreSQL acceptance | passed | 397 passed, zero skips, 1,755 deselected, four existing WebSocket deprecation warnings; 666.32 s. Includes both real-parser cases and all 25 Phase 3 HTTP cases. Disposable PostgreSQL 16.15 / pgvector 0.8.7. |
| Missing database prerequisite | passed | Expected exit 1: both parameter cases fail with `TEST_DATABASE_URL is required for PostgreSQL acceptance`; 1.57 s, no skips. |
| Provider-free health behavior | passed | ASGI requests with permitted Host: liveness 200 in both states, readiness 503/200. Provider adapter/search entrypoints guarded to raise; zero calls. This does not exercise operational startup or deployment. |
| Developer UI login/upload/poll/review/retry/selection/voice/recovery | not_run | UI still in development; actual checkout/URL and acceptance account/corpus unavailable. Helpers and mocked requests are excluded as UI acceptance. |
| Retrieval A01–A20 and U01–U06 | not_run | Missing approved bindings/reviews, four unseen annotations, frozen labels, measured cutoff and evaluation opt-in/budget. Per-case existing status remains not_run. |
| Gemini funded selected-model quality and Persian voice | not_run | Key configured, but funding/access unverified; actor, approved corpus/reviews, calibration and voice opt-in/budget absent. |
| OpenAI funded selected-model quality and Persian voice | not_run | OpenAI Realtime key absent, plus the independent actor/corpus/calibration/authorization prerequisites. No switch to Gemini used to claim OpenAI acceptance. |
| Persian factual question | not_run | Real selected-provider session, approved evidence/question and UI/hardware unavailable. |
| Follow-up question | not_run | Approved multi-turn question sequence, real session and UI/hardware unavailable. |
| Topic change | not_run | Approved multi-document sequence, real session and UI/hardware unavailable. |
| Interruption during search | not_run | Real selected provider, UI microphone and eligible calibrated search unavailable. |
| Interruption during playback | not_run | Real selected provider and UI microphone/playback hardware unavailable. |
| Provider loss | not_run | Authorized real provider session and actual UI unavailable. |
| Logout during voice | not_run | Actual UI, enabled acceptance account and authorized real voice session unavailable. |
| Access epoch revocation | not_run | Actual UI, approved actor/authorization mutation scenario and real session unavailable. |
| API restart during voice | not_run | Actual UI and authorized operational voice environment unavailable. Technical reconciliation tests are separate. |
The enabled administrator and all four immutable document/job bindings were
created through supported bootstrap and actual authenticated HTTP, not requested
from the developer or invented. They belong to a disposable isolated acceptance
database; none is a ready selected operational corpus or a human approval.
| Scenario | Actual result | Correlation / timing / classification |
| --- | --- | --- |
| Approved DOCX upload and one worker attempt | failed closed | Document `e1425aec-14c3-40d4-9438-b136e9459553`, job `08657dad-f1f0-41a2-b859-7ffacf49a2d0`, request `88b37dcd-b0e8-4503-9eb9-c7598a736feb`; 1.9884 s; chunk/review association, zero provider calls. |
| Approved infographic upload and one worker attempt | failed closed | Document `c9a0d811-c342-47bf-bfe5-d9d76021a2ee`, job `e27b6945-a1f9-430c-be77-68899ce0eed6`, request `96026e3c-8da6-44a3-977c-5eeb67178409`; 18.9965 s; extraction quality, one OpenRouter vision HTTP attempt using its configured Gemini vision model. This is not Gemini Live acceptance. |
| Approved letter PDF upload | passed intake; processing not_run | Document `73c016f1-45bb-4c6b-872a-deb86a8138fc`, job `dcb167d7-ad46-4660-b108-2eb2f2c42726`, request `c84c69eb-ac28-4aac-aad1-a68e5ac80aaf`; 0.3404 s; queued, zero calls. No automatic multi-page paid work. |
| Real lifespan readiness, process counts and provider-free health | passed | 2.7411 s; actual health request IDs `9dd17fda-95e3-45a9-8cdc-a6268e9020bd`, `1ed86221-2edb-4cee-b783-4f71461c91e5`; zero fixture/real calls at readiness. |
| Supported bootstrap/provision and authenticated HTTP | passed | 17.4340 s; enabled fixture admin `e85e7d43-331f-42dc-bbcf-0f46fffc400f`; user account also provisioned. |
| Upload/replay, separate worker publication and explicit K02 | passed | 3.7689 s; document `2005c5a1-0e37-41e1-8b25-96395c1a0ad6`, job `993e0e39-4b1c-4080-a440-b991449407e6`; one fixture embedding call, zero real calls. |
| Repeated live/ready health after publication | passed | 1.6058 s; fixture-call counter remained 1 before/after six health requests. |
| PostgreSQL/API/worker recreation, retained storage and live reconciliation | passed | 58.8780 s; original hash, stored extraction validation, account/session and selection persisted; abandoned live session `6e05019e-8289-455f-99e9-a2c863bbd87c` was failed before ready observation. |
| Kill worker during an observed blocked embedding HTTP request; lease reclaim | passed | 32.2947 s; job `e205df31-423c-4c36-8a1d-451a41e713b5` completed on attempt 2 with exactly one chunk, no duplicate/partial publication. The recorded final claim change includes its clearing on publication; stale-token fencing is additionally verified by the full PostgreSQL suite. |
| Synthetic factual review/decision and same-job retry | passed | 3.3185 s; job `a51bf8d4-d338-4d06-b430-22866b1c028e` preserved; publication stayed inactive. Decision is explicitly fixture-only, not human evidence for an original. |
| HTTP logout and actual graceful API/worker shutdown | passed | 2.4198 s; subsequent `/me` was 401; both container exit codes were 0 and API shutdown-complete log was observed. |
Final image: `rag-phase4-operational:verified`, ID
Compose, worker, reference map, Phase 3 handoff and this report). Eight task files
were added: the operations guide, two evidence JSON files, two execution harnesses,
Compose/embedding fixtures and worker shutdown regression tests. All original
inputs and applied migration files stayed byte-identical. `git diff --check`
passed. After cleanup, Docker listed only the pre-existing `spiderfoot` and
`fastapi_db` containers; acceptance volumes were retained intentionally.
### Subsequent scoped ingestion/admission repair
The [ingestion and voice admission repair](ingestion-voice-admission-repair.md)
supersedes the original DOCX preamble terminal behavior and adds explicit
`VOICE_TRANSPORT_TESTING=true` connectivity admission with uncalibrated metadata.
Vision recognition warnings/incomplete recognition now preserve legible candidates
for genuine human review. Historical paid results and IDs above remain unchanged;
no paid rerun or fabricated decision/calibration occurred. Shared retrieval quality
still requires finalized measured calibration. The scoped report contains current
deterministic repair coverage; these changes do not complete Phase 4.
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.