docs: reconcile project status and local stack operations
Refresh entry points and progress checkpoints, document schema revision 0006, and consolidate the final ElevenLabs/GapGPT profile and host prerequisites. Preserve dated activation evidence and distinguish implementation, targeted validation, incomplete full-suite checks and remaining human acceptance gates. Validation: 409 local Markdown link targets resolved and staged whitespace checks passed.
This commit is contained in:
+40
-40
@@ -1,51 +1,51 @@
|
||||
# Project documentation
|
||||
|
||||
The current implementation baseline is the English revision 1.3
|
||||
[Live document MVP delivery plan](specifications/RAG-AI-Phase1-Delivery-Plan.md).
|
||||
It targets a conditional four-day demo using the existing ingestion/embedding
|
||||
Phases 1-4, LangChain RAG/tools, new browser uploads and direct Gemini Live.
|
||||
The four supplied examples are mandatory initial tests, not an upload allowlist.
|
||||
Full text chat/history and settings editing are deferred.
|
||||
Start with [current status](current-status.md) for implemented capabilities,
|
||||
the last recorded local profile, evidence boundaries and remaining gates.
|
||||
Use the [reference map](agent-reference-map.md) for source locations and dated
|
||||
authorized amendments. Historical reports describe the run/date named in them;
|
||||
their pending or running statements do not describe today's service state.
|
||||
|
||||
## Implementation reading order
|
||||
## Contract authority
|
||||
|
||||
1. [Delivery plan](specifications/RAG-AI-Phase1-Delivery-Plan.md): active scope, gates, Days 1-4 and MVP-01 through MVP-14.
|
||||
2. [Implementation guide](specifications/RAG-Phase1-Implementation-Guide.md): work packages, embedding/LangChain boundary, worker and retained review/resume.
|
||||
3. [API catalog](specifications/RAG-Phase1-API-Catalog.md): active/deferred routes, D06/D07 exact review and authenticated Live.
|
||||
4. [Database design](specifications/RAG-Phase1-Database-Design.md): existing foundation, proposed forward review/identity/voice changes and invariants.
|
||||
5. [English scenarios](specifications/RAG-Phase1-MVP-Scenarios.md): supplied and unseen uploads, factual FAQ, voice and failure walkthroughs.
|
||||
6. [Architecture](specifications/RAG-AI-Architecture.md): dependency boundaries; broader deferred sections are context.
|
||||
1. [Phase 1 delivery plan](specifications/RAG-AI-Phase1-Delivery-Plan.md): scope.
|
||||
2. [API catalog](specifications/RAG-Phase1-API-Catalog.md): public contracts and amendments.
|
||||
3. [Database design](specifications/RAG-Phase1-Database-Design.md): persistence contracts.
|
||||
4. [Implementation guide](specifications/RAG-Phase1-Implementation-Guide.md): workflows.
|
||||
5. [English scenarios](specifications/RAG-Phase1-MVP-Scenarios.md): acceptance scenarios.
|
||||
6. [Architecture](specifications/RAG-AI-Architecture.md): broader context and boundaries.
|
||||
|
||||
The plan governs scope, API/database govern contracts and the guide governs
|
||||
workflows. Proposed mechanisms are not implementation-completion reports.
|
||||
The English revision 1.3 baseline is amended by the dated authorized changes in
|
||||
the reference map. Existing code alone does not override a contract. Full text
|
||||
chat/history and arbitrary settings/model editing remain deferred. The Persian
|
||||
revision 1.2 scenario report is historical.
|
||||
|
||||
Implementation progress is tracked in the [Live document MVP TODO](plans/live-document-mvp-todo.md). Checked baseline components do not prove complete MVP acceptance.
|
||||
## Operations and validation
|
||||
|
||||
## Current code and recorded evidence
|
||||
- [Backend startup/recovery](guides/phase4-backend-operations.md).
|
||||
- [Current local Windows stack](guides/current-local-stack.md): final recorded
|
||||
routing, profile settings, startup dependencies, HTTPS and verification.
|
||||
- [Foundation setup](guides/ingestion-foundation-setup.md) and
|
||||
[worker orchestration](guides/worker-orchestration.md).
|
||||
- [Tests](../tests/README.md): provider-free checks and isolated PostgreSQL acceptance.
|
||||
- [Local S2S engine](../services/local_s2s/README.md): build/native-engine details.
|
||||
- [Progress checklist](plans/live-document-mvp-todo.md) and
|
||||
[Local S2S progress](plans/local-s2s-adapter-progress.md).
|
||||
|
||||
- [Reference map](agent-reference-map.md): source inventory, agent routes and historical acceptance.
|
||||
- [Ingestion pipeline plan](plans/ingestion-pipeline-plan.md): implemented ingestion Phases 1-6 backend/validation and pending HTTP/search/Live integration.
|
||||
- [Setup and validation](guides/ingestion-foundation-setup.md): actual commands and recorded checks; real provider/voice quality remains separate.
|
||||
- [Repository instructions](../AGENTS.md) and [test guidance](../tests/README.md).
|
||||
## Latest change reports
|
||||
|
||||
Phase 5 worker/publication/retry and retained review/resume backend services are
|
||||
implemented; [Phase 6 operator handoff](guides/ingestion-operator-handoff.md)
|
||||
records integration acceptance and the separate opt-in provider smoke command.
|
||||
Scoped pgvector search/selection and Fast-Track Search Phase 2 technical
|
||||
correctness are implemented; [Phase 2 results and calibration prerequisites](guides/scoped-search-phase2.md)
|
||||
record actual acceptance. Real-model cutoff calibration, LangChain, authenticated
|
||||
D06/D07 transport, HTTP identity/upload, browser integration, Live and UI remain pending. Real-provider
|
||||
compatibility and Persian extraction/semantic quality are not certified by mocks.
|
||||
The [root README](../README.md) retains prototype startup instructions.
|
||||
- [Deletion, public models and diagnostics](guides/server-source-sync-20261018.md).
|
||||
- [GapGPT and subsequent ElevenLabs activation](guides/local-gapgpt-20261018.md).
|
||||
- [Strict current-turn grounding and ten-source retrieval](guides/strict-grounding-20261018.md).
|
||||
- [LAN HTTPS and client trust](guides/local-lan-access-20261018.md).
|
||||
- [Combined ingestion/RAG/voice evidence](evaluation/local-s2s/combined-ready-20261017.md).
|
||||
- [Presentation diagrams](presentation/README.md).
|
||||
|
||||
## Historical context and corpus boundary
|
||||
The modular backend implements identity/upload/review transport, scoped search
|
||||
and authenticated voice; older ingestion reports that call these pending are
|
||||
historical checkpoints. Frontend source lives in the sibling repository and
|
||||
cannot be committed from this repository.
|
||||
|
||||
The [Persian scenario report](specifications/RAG-Phase1-Scenario-Report-FA.md)
|
||||
is preserved as historical revision 1.2. New MVP instructions/scenarios are English.
|
||||
Older text/history/settings promises do not override revision 1.3.
|
||||
|
||||
Project documentation stays under docs; uploaded/sample corpus stays under data.
|
||||
Documentation changes do not clean/rebuild any existing vector index.
|
||||
Preserve applied migrations, independent immutable document IDs, technical
|
||||
revisions and compatible embedding profiles. Do not index project specifications
|
||||
as organization knowledge.
|
||||
Documentation stays under docs; uploaded/sample corpus stays under data.
|
||||
Preserve applied migrations, immutable document identities, technical revisions
|
||||
and compatible embedding profiles. Do not rebuild an index as documentation cleanup.
|
||||
|
||||
@@ -1,5 +1,21 @@
|
||||
Current documentation reconciliation (2026-10-20):
|
||||
[implementation/evidence status](current-status.md) and
|
||||
[consolidated local Windows runbook](guides/current-local-stack.md).
|
||||
The latest recorded runtime remains 2026-10-18, not a fresh uptime check.
|
||||
Live schema head is 0006_voice_model_settings; public models remain deployment-owned.
|
||||
Dated checkpoints below are historical where superseded.
|
||||
|
||||
# Phase 1 agent reference map
|
||||
|
||||
Latest user override (2026-10-18): [strict evidence-only local voice answers and ten-source retrieval](guides/strict-grounding-20261018.md). Shared retrieval now admits up to ten whole chunks within 12,000 characters. Local engine validates extractive output before TTS; uploaded-FAQ calibration replaces the previous local synthetic report. Existing settings-editor rollback remains in effect.
|
||||
|
||||
|
||||
Latest local LAN access (2026-10-18): [HTTPS LAN setup and client certificate](guides/local-lan-access-20261018.md). Local test is also available at https://192.168.180.151:4201/login, with same-origin WSS and a LocalSubnet-only firewall rule. A second physical client must trust the local CA for microphone use.
|
||||
|
||||
Latest local activation (2026-10-18): [Local S2S through GapGPT](guides/local-gapgpt-20261018.md). Local STT now uses ElevenLabs scribe_v2; TTS uses ElevenLabs eleven_v3/George with explicit PCM 24000Hz and speed 1.2. Only LLM gpt-4.1-mini remains on GapGPT. The local total request deadline is 60 seconds. Existing embedding profile/documents preserved; microphone acceptance pending.
|
||||
|
||||
Latest user-authorized source import (2026-10-18): [deployed deletion, model display/provider choice and S2S diagnostics](guides/server-source-sync-20261018.md). D05 HTTP/UI is enabled; F01 exposes public deployed model identifiers. Other settings mutation remains deferred. The API catalog amendment supersedes older deferred-D05 and no-model-display statements for this scope.
|
||||
|
||||
Latest document-intake override (2026-10-17): mandatory admin review disabled for new isolated-test uploads; existing Gemini 2.5 Flash Vision configured, automatic admission with warnings enabled. Four user files independently reimported and ready (5/100/3/21 chunks), 75 relevant tests passed. Historical failed rows preserved; active knowledge selection unchanged. Details in [combined runtime evidence](evaluation/local-s2s/combined-ready-20261017.md).
|
||||
|
||||
Latest user override and runtime (2026-10-17): [both voice providers and calibrated RAG ready](evaluation/local-s2s/combined-ready-20261017.md). Cost admission disabled explicitly; old budget ceilings below are historical. Memory prevention remains OFF. Direct OpenAI ASR/TTS, 85 focused tests passed, both actual session_ready/normal close passed, bge-m3 calibration reproduced 6/6 supported and 0/4 false positives. Microphone acceptance and immediate provider-switch cleanup remain open.
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
# Current implementation and recorded evidence
|
||||
|
||||
Documentation reconciled 2026-10-20 against the working tree. The latest local
|
||||
runtime evidence is dated 2026-10-18; no service uptime, provider call or new human
|
||||
acceptance is inferred from this documentation update.
|
||||
|
||||
## Implemented baseline
|
||||
|
||||
The modular FastAPI backend runs through app.server with a separate app.worker,
|
||||
PostgreSQL/pgvector and durable originals/extraction artifacts. Authentication,
|
||||
upload/status, retained review/resume, eligible failed-job retry, active knowledge
|
||||
selection and soft deletion have backend implementations. Every upload creates
|
||||
an independent immutable document; retries reuse the eligible document/job.
|
||||
Deletion retains original/chunk content while removing eligibility, fencing
|
||||
publication and invalidating affected context.
|
||||
|
||||
Shared backend retrieval enforces organization/access scope and ready, active,
|
||||
undeleted, unpurged eligibility. It admits up to ten whole chunks within 12,000
|
||||
characters, with document_id/chunk_id references and policy whole-10-12000.
|
||||
Calibration must match the embedding profile and retrieval policy.
|
||||
SearchInput also removes recognized organization-name filler from longer Persian
|
||||
queries while preserving backend-derived scope; see the grounding guide.
|
||||
|
||||
Voice has private OpenAI, Gemini and development-only Local S2S adapters.
|
||||
Reservations pin provider/profile identity; provider changes require a fresh
|
||||
session. Public F01 model identifiers are deployment-owned display information,
|
||||
not an arbitrary model editor. D05 deletion is enabled; general settings editing
|
||||
and full text chat/history remain deferred.
|
||||
|
||||
## Last recorded local profile
|
||||
|
||||
| Component | Recorded selection |
|
||||
| --- | --- |
|
||||
| STT | ElevenLabs scribe_v2, Persian |
|
||||
| Dialogue | GapGPT gpt-4.1-mini |
|
||||
| TTS | ElevenLabs eleven_v3, George, speed 1.2, PCM mono 24 kHz |
|
||||
| Request deadline | 60 seconds |
|
||||
| Embedding | Existing local bge-m3 profile, preserved |
|
||||
| Grounding | Current-turn extractive gate before local TTS |
|
||||
| Live schema head | 0006_voice_model_settings |
|
||||
| Loopback frontend | http://127.0.0.2:4201/login |
|
||||
| LAN frontend | https://192.168.180.151:4201/login |
|
||||
|
||||
These are local test observations, not repository defaults or a production switch.
|
||||
The full profile, host dependencies and startup references are in the
|
||||
[local runbook](guides/current-local-stack.md).
|
||||
|
||||
## Evidence and open gates
|
||||
|
||||
- [Source import](guides/server-source-sync-20261018.md): 146 focused backend
|
||||
checks, seven isolated PostgreSQL deletion cases, frontend build and 20
|
||||
frontend tests recorded. Three cancellation-diagnostic expectations also failed
|
||||
against the original HEAD runtime and remain open baseline failures.
|
||||
- [Final ElevenLabs route](guides/local-gapgpt-20261018.md): 164 focused
|
||||
provider-free checks and successful native component warmups recorded.
|
||||
This does not establish human Persian accuracy, latency or listening quality.
|
||||
- [Strict grounding](guides/strict-grounding-20261018.md): 108 focused checks,
|
||||
actual gateway answer/refusal checks, six supported calibration cases and four
|
||||
negative cases recorded. Calibration is not held-out quality acceptance.
|
||||
- [LAN verification](guides/local-lan-access-20261018.md): TLS, login and WSS
|
||||
setup/normal close passed from the host. A second physical client remains open.
|
||||
- Earlier browser/interruption acceptance applies to its recorded provider/profile.
|
||||
The latest ElevenLabs/strict-grounding profile still needs human microphone,
|
||||
spoken-answer and interruption acceptance and a bounded paired comparison.
|
||||
- The 2026-10-20 targeted provider-free run passed 199 tests (command below).
|
||||
The full provider-free run stopped producing output late in the suite and was
|
||||
interrupted; it has no passing final result. TEST_DATABASE_URL was absent, so
|
||||
PostgreSQL acceptance was not run. Historical database results remain dated
|
||||
evidence, not verification of this checkout.
|
||||
|
||||
The strict local gate can reject correct paraphrases and multi-source synthesis.
|
||||
Literal source excerpts can still be irrelevant or factually wrong. Common
|
||||
instructions on other adapters do not provide the local deterministic gate.
|
||||
|
||||
## Persistence and reproducibility
|
||||
|
||||
Migration 0006 adds organization_settings.voice_models as an object-valued JSONB
|
||||
column with an empty-object default. Current public model display reads deployment
|
||||
settings; this column does not establish implemented model mutation endpoints.
|
||||
Live admission requires the new head. Apply migrations forward and retain
|
||||
original content, embedding metadata and existing profile bytes.
|
||||
|
||||
Host-specific launch wrappers, credentials, local calibration/runtime evidence
|
||||
and certificates are intentionally ignored. A fresh checkout needs equivalent
|
||||
host provisioning; it cannot reproduce the running stack using tracked files
|
||||
alone. The [runbook](guides/current-local-stack.md) identifies those dependencies.
|
||||
|
||||
## Documentation/commit validation — 2026-10-20
|
||||
|
||||
Targeted command (199 passed in 9.73 seconds):
|
||||
|
||||
~~~powershell
|
||||
.venv/Scripts/python -m pytest tests/unit/test_server_source_sync.py tests/unit/test_grounded_voice_regression.py tests/unit/test_local_s2s_elevenlabs.py tests/unit/test_local_s2s_gapgpt.py tests/unit/test_local_s2s_engine.py tests/unit/test_local_s2s_responsiveness.py tests/unit/test_local_s2s_boundary.py tests/unit/test_local_s2s_phase2.py tests/unit/test_local_s2s_repairs.py tests/unit/test_search_phase2.py -m "not postgres" -q -o faulthandler_timeout=30
|
||||
~~~
|
||||
|
||||
The attempted full command was `.venv/Scripts/python -m pytest -m "not postgres" -q`.
|
||||
It was interrupted after several minutes without further output late in the run;
|
||||
the stalled case was not identified. No product fix or test expectation change
|
||||
was made during documentation reconciliation.
|
||||
|
||||
Local links in changed/new Markdown were checked: 409 targets, none missing.
|
||||
Whitespace checks passed. A basic credential-pattern scan of the 42 changed/new
|
||||
files found no matching provider-key or private-key patterns; this is not a
|
||||
comprehensive security audit. No service startup or paid-provider call was made.
|
||||
@@ -0,0 +1,111 @@
|
||||
# Local Windows stack: consolidated handoff
|
||||
|
||||
Last recorded activation: 2026-10-18. Documentation reconciled: 2026-10-20.
|
||||
This is the isolated Windows development stack, not an operational deployment.
|
||||
No startup or paid call was performed while writing this guide.
|
||||
|
||||
## Routing and required profile
|
||||
|
||||
Set the following consistently for the API and engine's frozen profile:
|
||||
|
||||
~~~dotenv
|
||||
VOICE_PROVIDER=local_s2s
|
||||
LOCAL_S2S_ENABLED=true
|
||||
LOCAL_S2S_COMPONENT_PROVIDER=gapgpt
|
||||
LOCAL_S2S_STT_PROVIDER=elevenlabs
|
||||
LOCAL_S2S_STT_MODEL=scribe_v2
|
||||
LOCAL_S2S_LLM_MODEL=gpt-4.1-mini
|
||||
LOCAL_S2S_TTS_PROVIDER=elevenlabs
|
||||
LOCAL_S2S_TTS_MODEL=eleven_v3
|
||||
LOCAL_S2S_TTS_VOICE=JBFqnCBsd6RMkjVDRZzb
|
||||
LOCAL_S2S_TTS_SPEED=1.2
|
||||
LOCAL_S2S_REQUEST_TIMEOUT_SECONDS=60
|
||||
LOCAL_S2S_STRICT_GROUNDING=true
|
||||
~~~
|
||||
|
||||
These settings describe the final recorded override, not defaults in
|
||||
.env.example or docker-compose.local-s2s-test.yml. The tracked standalone Compose
|
||||
starts with a non-inference embedding endpoint for transport fixtures and is not
|
||||
a replacement for this host's RAG-enabled Compose. Preserve candidate isolation
|
||||
guards, real frozen embedding identity, engine token and matching attestation.
|
||||
|
||||
Only the engine reads /run/secrets/gapgpt_api_key and
|
||||
/run/secrets/elevenlabs_api_key. Host files are ignored
|
||||
.local-s2s-build/gapgpt-api.key and .local-s2s-build/elevenlabs-api.key.
|
||||
Never copy their contents into docs, source, frontend or Git. STT/TTS use native
|
||||
ElevenLabs endpoints; only dialogue uses GapGPT. No automatic fallback is provided.
|
||||
TTS explicitly requests mono 16-bit PCM at 24 kHz; ElevenLabs speed must be 0.7–1.2.
|
||||
|
||||
Strict grounding buffers completion output before TTS and validates current-turn,
|
||||
reported, successfully retrieved/revalidated evidence. Unsupported prose becomes
|
||||
a fixed abstention. Whole-chunk retrieval is bounded to ten sources/12,000
|
||||
characters; preserve a calibration report matching whole-10-12000.
|
||||
|
||||
## Host prerequisites and startup
|
||||
|
||||
The existing stack uses isolated database rag_bge_local_s2s_test, durable original
|
||||
and extraction volumes, host Ollama and the sibling Angular production build.
|
||||
Its embedding identity is http://localhost:11434/v1. A namespace-sharing stdlib
|
||||
TCP relay forwards this identity to host Ollama; do not rewrite frozen metadata
|
||||
to host.docker.internal. Preserve documents, selection and embedding profiles.
|
||||
|
||||
Required ignored host artifacts include windows-gapgpt.compose.json,
|
||||
gapgpt-compose.py, the provider key files, current calibration/engine assets,
|
||||
preview configuration and test login file. Inspect their presence locally.
|
||||
Do not print credentials. If these files are absent on a fresh checkout,
|
||||
reconstruct the host configuration using the
|
||||
[backend operations guide](phase4-backend-operations.md), tracked standalone
|
||||
candidate Compose and [engine guide](../../services/local_s2s/README.md).
|
||||
A portable recreation of the host wrapper is not present in Git.
|
||||
|
||||
With the previously provisioned artifacts, the recorded commands are:
|
||||
|
||||
~~~powershell
|
||||
.venv/Scripts/python .local-s2s-build/gapgpt-compose.py up -d
|
||||
.venv/Scripts/python .local-s2s-build/gapgpt-compose.py ps
|
||||
.venv/Scripts/python .local-s2s-build/check-gapgpt.py
|
||||
.venv/Scripts/python .local-s2s-build/check-lan.py
|
||||
~~~
|
||||
|
||||
Starting/recreating the engine can issue real component warmups. Confirm the
|
||||
applicable provider budget before running these commands; old exclusive ledgers
|
||||
are historical records, not reusable authorization. Do not launch a worker against
|
||||
an unrelated queue. Apply alembic upgrade head to the intended isolated database
|
||||
before API startup; current Live head is 0006_voice_model_settings.
|
||||
|
||||
## Frontend, HTTPS and recovery
|
||||
|
||||
Loopback preview: http://127.0.0.2:4201/login, proxying API 127.0.0.2:8092.
|
||||
LAN preview: https://192.168.180.151:4201/login, with same-origin API/WSS.
|
||||
The sibling source is D:/raymand/projects/faq_chatbot_frontend.
|
||||
Its build/test commands are npm.cmd run build and npm.cmd test -- --watch=false.
|
||||
|
||||
LAN configuration is ignored .local-s2s-build/lan-preview.config.mjs.
|
||||
The firewall rule RAG-Local-LAN-HTTPS-4201 is restricted to LocalSubnet.
|
||||
Each physical client needs the public development CA trusted and browser
|
||||
microphone permission. The generated certificate lasts 30 days; check validity
|
||||
before reuse. A changed IP requires certificate SAN, binding and trusted
|
||||
origin/host updates. Restore the public CA copy after frontend rebuild if needed.
|
||||
Never publish the private server key. See [LAN setup](local-lan-access-20261018.md).
|
||||
|
||||
Check /health/ready, authenticated document listing and knowledge selection,
|
||||
F01 public provider/model inventory, then WSS session_ready and normal close.
|
||||
A ready API is not evidence that embeddings are reachable from inside containers.
|
||||
Use a new voice conversation after profile changes. On failure, inspect numeric
|
||||
diagnostics without exposing provider keys or source bodies.
|
||||
|
||||
For recreation, retain database and original/extraction volumes; do not use
|
||||
down -v or reset the embedding identity. Restore the exact compatible profile
|
||||
and image/configuration, migrate forward and repeat readiness/connection checks.
|
||||
A rollback to older runtime code must account for its schema-head requirements;
|
||||
downgrading the database is not the documented recovery path.
|
||||
|
||||
## Validation boundaries
|
||||
|
||||
See [current status](../current-status.md) and the dated
|
||||
[provider activation](local-gapgpt-20261018.md),
|
||||
[source import](server-source-sync-20261018.md) and
|
||||
[grounding](strict-grounding-20261018.md) evidence.
|
||||
The latest profile still needs human microphone/spoken-RAG/interruption tests and
|
||||
a second-client LAN check. Existing warmups, synthetic audio and host-local WSS
|
||||
checks do not close those gates.
|
||||
@@ -0,0 +1,195 @@
|
||||
Current reading note (2026-10-20): the final recorded configuration is in
|
||||
[the consolidated local runbook](current-local-stack.md). The initial all-GapGPT
|
||||
activation and intermediate Gemini/TTS-only changes below are historical;
|
||||
the final profile uses ElevenLabs STT/TTS and GapGPT dialogue only.
|
||||
No new runtime verification was performed for this reading note.
|
||||
|
||||
# Local S2S through GapGPT — 2026-10-18
|
||||
|
||||
User-authorized local activation only. The Debian deployment was not contacted
|
||||
or modified during this activation. All three Local S2S components now use
|
||||
https://api.gapgpt.app/v1 in the local test stack:
|
||||
|
||||
- STT: whisper-1, Persian, final JSON transcription.
|
||||
- LLM: gpt-4.1-mini, streaming Chat Completions and existing backend tools.
|
||||
- TTS: gpt-4o-mini-tts, alloy, PCM 24kHz, existing speed 1.6.
|
||||
|
||||
## Configuration and routing
|
||||
|
||||
LOCAL_S2S_COMPONENT_PROVIDER=gapgpt must be set on both the API and engine.
|
||||
The split default preserves existing deployments. The selected upstream is part
|
||||
of frozen components/profile identity; switching it cannot silently reuse an old
|
||||
session attestation. Actual initialized engine metadata is checked against it.
|
||||
GapGPT routes never fall back to OpenAI or OpenRouter on error. Multipart STT,
|
||||
streaming chat/tools, response bounds, deadlines and cancellation remain intact.
|
||||
|
||||
Only the engine reads GAPGPT_API_KEY or GAPGPT_API_KEY_FILE. The active local
|
||||
stack mounts ignored .local-s2s-build/gapgpt-api.key read-only at
|
||||
/run/secrets/gapgpt_api_key. The key is not embedded in source, image, API,
|
||||
frontend or Compose environment. The fixed provider endpoint does not accept a
|
||||
model-supplied destination. No additional package or migration was introduced.
|
||||
|
||||
Embedding remains local bge-m3 and document OCR remains its existing provider;
|
||||
these are separate from the three speech pipeline components authorized here.
|
||||
Existing documents, selection, embedding metadata and calibrated cutoff are
|
||||
preserved. The local test UI exposes only Local S2S for this activation.
|
||||
|
||||
## Local run
|
||||
|
||||
Runtime uses image rag-local-gapgpt:20261018, built on the existing engine image
|
||||
with the current app and services/local_s2s sources. The existing isolated
|
||||
rag_bge_local_s2s_test database and original/extraction volumes are reused.
|
||||
|
||||
Start/check from the repository root:
|
||||
|
||||
.venv/Scripts/python .local-s2s-build/gapgpt-compose.py up -d
|
||||
.venv/Scripts/python .local-s2s-build/gapgpt-compose.py ps
|
||||
.venv/Scripts/python .local-s2s-build/check-gapgpt.py
|
||||
|
||||
Compose: .local-s2s-build/windows-gapgpt.compose.json. Runtime files are ignored
|
||||
and contain host-specific paths; credentials are in the separate key file only.
|
||||
Frontend preview is running at http://127.0.0.2:4201/login and proxies the local
|
||||
API at 127.0.0.2:8092. It serves the current sibling Angular production build.
|
||||
The existing test login is in .local-s2s-build/windows-browser-login.txt.
|
||||
Preview config/PID/logs use the .local-s2s-build/gapgpt-preview prefix.
|
||||
|
||||
The migrated embedding identity pins http://localhost:11434/v1. A first startup
|
||||
attempt using host.docker.internal correctly failed compatibility validation;
|
||||
no profile or migrated metadata was rewritten. A local Python stdlib TCP relay
|
||||
now shares the API/worker network namespace and forwards that same loopback
|
||||
address to the host's Ollama. The relay has no provider key and no exposed
|
||||
embedding port. The migration then succeeded and the API became ready.
|
||||
|
||||
## Actual verification
|
||||
|
||||
141 focused provider-free tests passed before the final added upstream-error
|
||||
parameter cases. The earlier real feasibility checks verified streaming tool
|
||||
arguments, PCM audio generation and the same audio transcribed as Persian
|
||||
'سلام'. Native engine startup then made exactly three successful component
|
||||
warmup requests, each logged with provider=gapgpt and status 200.
|
||||
|
||||
GET /health/ready returned 200 with ingestion available. The actual frontend
|
||||
proxy login, allowed-provider inventory, public model catalog and WebSocket
|
||||
session_ready/normal close passed. Evidence is retained in ignored
|
||||
.local-s2s-build/combined-evidence/gapgpt-connection-20261018.json.
|
||||
|
||||
Human microphone quality, interruption and complete spoken RAG acceptance await
|
||||
the user's browser test. These are not established by startup or mock tests.
|
||||
|
||||
Final focused command:
|
||||
|
||||
.venv/Scripts/python -m pytest tests/unit/test_local_s2s_gapgpt.py tests/unit/test_local_s2s_engine.py tests/unit/test_local_s2s_responsiveness.py tests/unit/test_local_s2s_boundary.py tests/unit/test_local_s2s_phase2.py tests/unit/test_local_s2s_repairs.py -m "not postgres" -q
|
||||
|
||||
Result: **144 passed**. Includes all three GapGPT routes with both successful
|
||||
upstream responses and upstream 429 rejection, exactly one outbound attempt,
|
||||
no fallback/credential mixing, profile mismatch rejection and prior-path coverage.
|
||||
`git diff --check` passed. No tracked or pending source file contains the key.
|
||||
|
||||
The actual API container reached host Ollama through the loopback relay:
|
||||
HTTP 200, 1024-dimensional bge-m3 output. Authenticated proxied document listing
|
||||
returned HTTP 200 with four visible active documents; knowledge selection also
|
||||
returned 200. No original content or selection was changed by these checks.
|
||||
|
||||
## Active Gemini TTS follow-up — 2026-10-18
|
||||
|
||||
User selected gemini-2.5-flash-preview-tts. The current local TTS model is now
|
||||
that exact model, voice Kore. STT and LLM retain whisper-1 and gpt-4.1-mini.
|
||||
The earlier gpt-4o-mini-tts activation above is historical.
|
||||
|
||||
GapGPT /audio/speech returned 503 channel:protocol_unsupported for Gemini TTS,
|
||||
with and without speed. The native Gemini-style v1/models generateContent route
|
||||
returned a successful response with empty audio parts. Actual usable audio was
|
||||
verified through /v1/chat/completions with modalities=[audio], audio.voice=Kore,
|
||||
audio.format=pcm16 and stream=false. The TTS gateway now uses that route only for
|
||||
this exact model in GapGPT mode, validates the successful single-choice audio
|
||||
envelope, bounds base64/decoded size, and passes PCM to the existing native TTS
|
||||
handler. Valid mono 24kHz 16-bit WAV envelopes are unwrapped when present;
|
||||
incompatible or empty/partial audio is rejected. No provider fallback exists.
|
||||
Desired pace 1.6 is conveyed in the Gemini read-aloud instruction; unlike the
|
||||
previous model's speed parameter this is not a measured guarantee of exact pace.
|
||||
|
||||
GapGPT's upstream inactivity wait now uses the configured total request deadline;
|
||||
the old split-provider default remains 5 seconds. The current isolated local
|
||||
profile uses 60 seconds (the existing validated maximum), preserving bounded
|
||||
cancellation and no automatic retries. This removes the premature 5-second
|
||||
cutoff observed in the user's STT/TTS logs. It does not guarantee the provider
|
||||
will always reply within the total deadline.
|
||||
|
||||
Final focused suite: 152 passed (same six local_s2s test modules as above).
|
||||
Actual native startup succeeded with all three component warmups: Gemini TTS
|
||||
returned status 200, 48,526 PCM bytes, approximately 3.16 seconds for that one
|
||||
request. Frontend-proxied session_ready and normal close passed again; F01
|
||||
reports the requested Gemini TTS model. API/worker/engine were recreated locally
|
||||
with the current sources. The server was not modified. Browser remains at
|
||||
http://127.0.0.2:4201/login; refresh and start a new voice conversation.
|
||||
|
||||
## Active ElevenLabs TTS follow-up — 2026-10-18
|
||||
|
||||
User replaced Gemini TTS with ElevenLabs for the local test only. Current settings:
|
||||
LOCAL_S2S_COMPONENT_PROVIDER=gapgpt, LOCAL_S2S_TTS_PROVIDER=elevenlabs,
|
||||
LOCAL_S2S_TTS_MODEL=eleven_v3, LOCAL_S2S_TTS_VOICE=JBFqnCBsd6RMkjVDRZzb
|
||||
(George), LOCAL_S2S_TTS_SPEED=1.2. STT and LLM remain whisper-1 and
|
||||
gpt-4.1-mini through GapGPT. The previous Gemini TTS activation is historical.
|
||||
|
||||
A tiny actual Persian synthesis request returned HTTP 200, audio/pcm,
|
||||
107,520 bytes (2.24 seconds at 24kHz mono 16-bit), in about 3.51 seconds.
|
||||
The request explicitly selects output_format=pcm_24000 on ElevenLabs' native
|
||||
text-to-speech endpoint. No MP3 decoding or sample-rate inference is used.
|
||||
The API format contract is documented at
|
||||
https://elevenlabs.io/docs/api-reference/text-to-speech/convert and
|
||||
https://elevenlabs.io/docs/help-center/troubleshooting/what-audio-formats-do-you-support.
|
||||
Human Persian listening/quality acceptance remains pending.
|
||||
|
||||
The supplied key permits synthesis but denies models_read, voices_read and
|
||||
user_read; discovery endpoints returned missing_permissions. No extra permission
|
||||
is needed to run the successful synthesis request using the documented George
|
||||
voice. No key/account permission was changed.
|
||||
|
||||
Only the engine mounts ignored .local-s2s-build/elevenlabs-api.key at
|
||||
/run/secrets/elevenlabs_api_key. The gateway uses xi-api-key for ElevenLabs only,
|
||||
never forwards the GapGPT bearer key there, and never falls back to Gemini or
|
||||
other providers. TTS provider/model/voice/speed are frozen in session identity.
|
||||
Provider/model changes require a new voice conversation. Existing packet,
|
||||
backlog, cancellation and total timeout limits remain in place. Speed outside
|
||||
0.7–1.2 is rejected for ElevenLabs instead of silently clamped.
|
||||
|
||||
159 focused provider-free tests passed, including successful native TTS mapping,
|
||||
401/429 with no fallback, credential separation, PCM 24kHz request parameters,
|
||||
attestation mismatch and speed/credential validation. One new test fixture
|
||||
initially omitted its handler speed; it was supplied to match runtime setup.
|
||||
No runtime assertion was weakened. The API, worker and engine image were rebuilt
|
||||
and restarted locally. Server deployment was not contacted or modified.
|
||||
|
||||
## Active ElevenLabs STT follow-up — 2026-10-18
|
||||
|
||||
The user also moved STT to ElevenLabs. The active local profile now uses
|
||||
LOCAL_S2S_STT_PROVIDER=elevenlabs and LOCAL_S2S_STT_MODEL=scribe_v2.
|
||||
TTS remains ElevenLabs eleven_v3/George at speed 1.2 with PCM 24000Hz.
|
||||
Only the dialogue LLM remains gpt-4.1-mini through GapGPT.
|
||||
|
||||
A small Persian synthetic audio round trip succeeded with the existing key:
|
||||
Scribe v2 returned 'سلام. خوش آمدید', language fas, HTTP 200, in about 1.07
|
||||
seconds for that sample. The key does not require extra permissions for this
|
||||
successful speech-to-text request.
|
||||
|
||||
The engine gateway maps its existing OpenAI-compatible multipart transport to
|
||||
POST https://api.elevenlabs.io/v1/speech-to-text. Audio bytes are preserved;
|
||||
model becomes model_id=scribe_v2, language_code=fa, event tagging/diarization
|
||||
are disabled and timestamps_granularity=none. Whisper response_format, prompt
|
||||
and temperature are not sent to ElevenLabs. The frozen STT profile no longer
|
||||
claims those Whisper-specific settings for this route; sentence-at-a-time LLM
|
||||
handling remains enabled. The final JSON text response uses the existing native
|
||||
handler path. No second search implementation, migration or package was added.
|
||||
|
||||
STT provider is included in session identity and verified against engine setup.
|
||||
The existing engine-only ElevenLabs key file is shared by STT/TTS; GapGPT
|
||||
credentials are not forwarded to ElevenLabs. Authentication/rate failures do not
|
||||
fall back to GapGPT or OpenAI. Existing total request bounds/cancellation remain.
|
||||
|
||||
164 focused tests passed across test_local_s2s_elevenlabs, gapgpt, engine,
|
||||
responsiveness, boundary, phase2 and repairs. New coverage verifies multipart
|
||||
field translation, original audio preservation, no credential mixing or fallback,
|
||||
provider attestation, invalid duplicate fields and omitted Whisper-only policy.
|
||||
Native engine warmup succeeded with STT ElevenLabs HTTP 200 (~0.97s), LLM
|
||||
GapGPT HTTP 200 and TTS ElevenLabs HTTP 200. These are individual measurements,
|
||||
not latency guarantees or human Persian-quality acceptance. No server changed.
|
||||
@@ -0,0 +1,55 @@
|
||||
# Local LAN access — 2026-10-18
|
||||
|
||||
User requested access to the local test service from the internal network.
|
||||
Active URL: https://192.168.180.151:4201/login (Ethernet IPv4 on this computer).
|
||||
The existing http://127.0.0.2:4201/login loopback preview remains available.
|
||||
The Debian deployment was not contacted or modified.
|
||||
|
||||
A separate Vite HTTPS preview binds only 192.168.180.151:4201 and serves the
|
||||
current sibling frontend production build. Same-origin /api HTTP and WSS proxy
|
||||
to the existing loopback-only API at 127.0.0.2:8092. The API trusted origins/hosts
|
||||
now explicitly include this LAN HTTPS origin/authority. No wildcard origin was
|
||||
introduced. The engine, database and API ports were not exposed to the LAN.
|
||||
|
||||
The Windows inbound rule RAG-Local-LAN-HTTPS-4201 allows TCP 4201 only on local
|
||||
address 192.168.180.151 with remote address LocalSubnet. Direct creation initially
|
||||
failed without Administrator rights. The known local script was run via UAC;
|
||||
a process-only PowerShell execution-policy exception was required. No persistent
|
||||
PowerShell policy or global firewall setting was changed. The result file
|
||||
.local-s2s-build/lan-firewall-result.json confirms the rule exists and is enabled.
|
||||
|
||||
## Client certificate setup
|
||||
|
||||
The local development CA and server certificate expire after 30 days. Private
|
||||
server key stays in ignored .local-s2s-build/lan-tls/server.key and is outside the
|
||||
served frontend directory. Only the public CA certificate is downloadable:
|
||||
|
||||
https://192.168.180.151:4201/local-dev-ca.cer
|
||||
|
||||
On the second Windows computer, install this public development CA for Current
|
||||
User in Trusted Root Certification Authorities, then restart/reload the browser.
|
||||
For the initial download the browser can display an untrusted-certificate page
|
||||
because this local CA is not yet trusted. Confirm the address is this LAN host.
|
||||
For microphone use, HTTPS must be trusted on that client and microphone access
|
||||
must be granted. No certificate was silently installed in any device trust store.
|
||||
Other operating systems require their own local-CA trust setup.
|
||||
|
||||
The application uses the existing test account. No account/password was changed.
|
||||
|
||||
## Verification and runtime files
|
||||
|
||||
Strict TLS verification with the generated CA succeeded for the login page and
|
||||
CA download (both HTTP 200). Existing loopback page also returned 200.
|
||||
Authenticated login, provider/model catalog and actual WSS session_ready plus
|
||||
normal close succeeded through the LAN HTTPS origin. Evidence is in ignored
|
||||
.local-s2s-build/combined-evidence/lan-connection-20261018.json.
|
||||
The check was from this host; a separate physical client remains to be verified.
|
||||
No new paid component initialization was needed; only the local API was recreated.
|
||||
|
||||
Configuration: .local-s2s-build/lan-preview.config.mjs.
|
||||
PID/stdout/stderr: .local-s2s-build/lan-preview.*.
|
||||
API Compose: .local-s2s-build/windows-gapgpt.compose.json.
|
||||
Validation command: .venv/Scripts/python .local-s2s-build/check-lan.py.
|
||||
The public CA copy in the Angular dist directory must be restored after a rebuild
|
||||
if it is still needed for client installation. The LAN IP is the current address;
|
||||
a different IP requires updating binding, certificate SAN and trusted origins.
|
||||
@@ -1,3 +1,5 @@
|
||||
Current local profile: see [consolidated Windows runbook](current-local-stack.md) and [current status](../current-status.md). The temporary Gemini selection and fixture results below describe their dated checkpoint. Current Live schema head is 0006_voice_model_settings; apply forward migrations before startup.
|
||||
|
||||
# Phase 4 backend startup and recovery
|
||||
|
||||
This guide describes the modular document/voice backend. The older prototype
|
||||
@@ -99,7 +101,7 @@ python -m app.worker
|
||||
|
||||
Password commands prompt securely; automation can use `--password-stdin` from a
|
||||
secure pipe. Bootstrap is only for a new installation and refuses to reset an
|
||||
existing organization. Never downgrade or edit applied migrations 0001–0005.
|
||||
existing organization. Never downgrade or edit applied migrations 0001–0006.
|
||||
|
||||
Existing production Compose starts migrations before one API and the separate
|
||||
worker, with shared durable original/extraction directories. Build with
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
# Deployed source import — 2026-10-18
|
||||
|
||||
User scope: import the server's stronger S2S logging, document deletion and model
|
||||
settings into the existing local backend and sibling Angular source tree.
|
||||
|
||||
## Provenance
|
||||
|
||||
All seven imported runtime Python sources matched SHA-256 hashes read from the
|
||||
running API and S2S engine containers. Release directories are not assumed to
|
||||
represent the live code without that comparison. No deployed service was changed.
|
||||
Server environment files, provider keys, data and host-specific Compose settings
|
||||
were excluded from the import.
|
||||
|
||||
Backend files: `app/api/v1/documents.py`, `app/modules/documents/deletion.py`,
|
||||
`app/api/v1/knowledge.py`, `app/modules/voice/model_catalog.py`,
|
||||
`app/modules/voice/runtime.py`, `app/modules/voice/diagnostics.py`,
|
||||
`services/local_s2s/components.py`. The supplied deletion regression suite was
|
||||
imported as `tests/integration/test_document_deletion.py`.
|
||||
|
||||
Angular source: `D:/raymand/projects/faq_chatbot_frontend/src/`, from the final
|
||||
server deletion release (which includes the preceding model settings changes).
|
||||
Only six differing existing files and one new test were transferred; 100 source
|
||||
files were already identical after line-ending normalization. Changed files:
|
||||
`app/pages/settings/settings.page.ts`, `settings.page.html`,
|
||||
`settings.live.spec.ts`, `app/services/documents/documents.service.ts`,
|
||||
`documents.types.ts`, `app/services/http-request/http.service.ts`, and
|
||||
`app/shared/ui/ai-model-config-card/ai-model-config-card.component.ts`.
|
||||
Previous frontend files are backed up under ignored
|
||||
`temp/server-sync-20261018/frontend-before/`.
|
||||
|
||||
Deletion retains original content/chunks, removes search eligibility, increments
|
||||
revision/epoch when removing active knowledge, fences worker publication and
|
||||
invalidates older conversations/sessions. It does not physically purge content.
|
||||
Model settings display deployment-owned identifiers and reuse existing Live
|
||||
provider selection. Provider secrets remain on the backend.
|
||||
|
||||
## Validation
|
||||
|
||||
Validation is recorded below after completion. No real provider inference or
|
||||
browser microphone acceptance is implied by mock/provider-free tests.
|
||||
|
||||
Initial focused run: 157 passed, 3 failed. The three failures in
|
||||
`test_voice_search_interruption.py::test_profile_cancellation_diagnostics` also
|
||||
reproduce with the original `HEAD` runtime loaded in memory (3 failed, 1 passed).
|
||||
They are pre-existing expectations around cancellation diagnostic profile flags
|
||||
and the coral cancellation policy; assertions and policy were not changed.
|
||||
|
||||
`npm.cmd run build`: passed (one CommonJS warning for existing moment-jalaali).
|
||||
PowerShell blocks npm.ps1 on this host; npm.cmd runs the same installed tool.
|
||||
|
||||
Final focused backend command:
|
||||
`.venv/Scripts/python -m pytest tests/unit/test_server_source_sync.py tests/unit/test_local_s2s_responsiveness.py tests/unit/test_local_s2s_phase2.py tests/unit/test_local_s2s_repairs.py tests/unit/test_voice_session_incident.py -m "not postgres" -q`
|
||||
Result: **146 passed**. Covers public model-role gating, secret suppression,
|
||||
component completion trace fields, existing S2S lifecycle and incident behavior.
|
||||
|
||||
PostgreSQL command (TEST_DATABASE_URL pointing only at the disposable
|
||||
`rag_sync_20261018_test` database on localhost:55439):
|
||||
`.venv/Scripts/python -m pytest tests/integration/test_document_deletion.py -m postgres --require-postgres -q`
|
||||
Result: **7 passed**, no skips. Active/inactive deletion, recorded replay and
|
||||
changed-payload conflict, stale revision, organization/role authorization,
|
||||
concurrent replay, worker fencing, authenticated HTTP/CSRF all passed.
|
||||
The `rag-sync-20261018-postgres` container used --rm with no persistent volume and
|
||||
was stopped/removed afterward. Local Docker Desktop was started for these tests;
|
||||
its existing configured containers also resumed automatically. No server-side
|
||||
service was restarted or modified.
|
||||
|
||||
Frontend commands, from `D:/raymand/projects/faq_chatbot_frontend`:
|
||||
- `npm.cmd run build`: passed.
|
||||
- `npm.cmd test -- --watch=false --include=src/app/pages/settings/*.spec.ts --include=src/app/services/documents/*.spec.ts`: **20 passed** across three files.
|
||||
|
||||
The first frontend test run found two test integration defects: the imported Live
|
||||
spec lacked zoneless configuration, and the existing deletion test expected the
|
||||
old unsupported-action notice with no delete mock. Both were updated for the
|
||||
intentional feature activation. Added HTTP DELETE body/credentials/CSRF/key
|
||||
coverage and ambiguous-failure retry identity coverage. Runtime frontend sources
|
||||
remain identical to the supplied final source release; only tests were adapted.
|
||||
Two further frontend test files changed during validation:
|
||||
`app/pages/settings/settings.page.spec.ts` and
|
||||
`app/services/documents/documents.service.spec.ts`.
|
||||
|
||||
Provenance limit: the server's currently selected `frontend-dist` index loads
|
||||
`main-RIHA5TKM.js`, whereas the final source release includes
|
||||
`main-FK3BDLSA.js`. Thus the frontend import is attributed to the final release
|
||||
source artifact, not claimed as a reconstruction verified against the currently
|
||||
served minified bundle. The backend source matches were verified against running
|
||||
containers. No remote bundle or deployment setting was replaced.
|
||||
|
||||
No full-suite, production deletion, browser microphone or real-provider inference
|
||||
claim is made. The three baseline cancellation-test failures remain open.
|
||||
@@ -0,0 +1,36 @@
|
||||
# User-authorized grounding correction (2026-10-18)
|
||||
|
||||
Scope: stop unsupported voice answers and send up to ten retrieved passages. The reported incorrect hours and offered appointment coordination were not supported by the supplied evidence. The earlier phone case had its supporting FAQ at rank eight and only five sources reached the model.
|
||||
|
||||
## Behavior
|
||||
|
||||
Shared retrieval now admits up to ten whole chunks within the existing 12,000-character evidence budget; eligibility, document identities, access scope, exact matching and embeddings are unchanged. Fewer than ten may be returned because of cutoff or the text budget. Retrieval policy identity changes to `whole-10-12000`.
|
||||
|
||||
The common voice instruction requires current-turn evidence for every factual claim, ignores source-order authority, forbids invented hours/prices/current open status and unsupported action promises, and requires extractive answers. It distinguishes static documented hours from current day/time/holiday status.
|
||||
|
||||
For the local engine, `LOCAL_S2S_STRICT_GROUNDING=true` activates a gateway gate before assistant text can reach TTS. It accepts answer text only when it is a contiguous excerpt of evidence reported and successfully retrieved/revalidated after the most recent user message, or one of a few fixed nonfactual greetings/clarifications/abstention messages. FAQ question premises are excluded. If there is exactly one cited FAQ with a bounded answer, a generated paraphrase is replaced by that FAQ answer verbatim. Otherwise unsupported output is replaced by a fixed Persian abstention. Tool calls pass through; accompanying unverified assistant prose is removed. Previous assistant prose and previous turns cannot supply evidence. This gate is local-engine-specific; common instructions also affect other voice adapters.
|
||||
|
||||
Chat completion responses are bounded and buffered before forwarding, including SSE, so partial hallucinated sentences cannot reach TTS before validation. This adds waiting until completion and restricts paraphrasing/multi-passage synthesis. It prevents newly generated wording from passing the gate, but does not establish truth of the uploaded text or semantic relevance of every literal excerpt.
|
||||
|
||||
## Validation
|
||||
|
||||
108 focused provider-free tests passed, covering ten-source admission, the former rank-eight phone case, prompt propagation, numeric/hour/appointment rejection, prior-turn and unreported-source rejection, and streamed tool-call preservation.
|
||||
|
||||
The old synthetic calibration report was re-evaluated, then replaced locally by a fresh measured calibration against the active uploaded FAQ and actual current eligible corpus. Six source-bound support cases (phone, CEO contact procedure, hours, land pricing conditions, address and IT extension) and four out-of-domain negative cases produced 6/6 complete support and 0/4 unsupported retrieval positives, at measured cosine cutoff 0.5498457982262681. These are calibration observations, not held-out quality acceptance. Original report and diagnostic reanalysis remain in ignored local evidence files. No document was re-embedded or modified.
|
||||
|
||||
A real-provider prompt-only trial still produced unsupported claims, which motivated the deterministic gate. Do not present prompt instructions alone as a guarantee. Local evidence: `production-ten-calibration.json`, `grounded-provider-answers.json` under ignored `.local-s2s-build/combined-evidence`.
|
||||
|
||||
|
||||
Final live-provider gateway checks used the actual retrieved passages and current GapGPT `gpt-4.1-mini`, with normal tool reporting. Phone: returned literal `031 - 3125`; CEO: returned the literal documented contact procedure; current open/closed status and land total price: refused unsupported generated output with the fixed insufficient-evidence message. These checks verify Chat Completions/gateway output, not a human microphone/TTS quality acceptance. Actual backend/engine WebSocket admission also returned `session_ready` and closed normally. Extractive refusal may reject a valid paraphrase or a multi-source answer; this is the deliberate strict mode tradeoff requested here.
|
||||
|
||||
### Search-query normalization (reconciled 2026-10-20)
|
||||
|
||||
The shared SearchInput validator strips recognized Persian forms of the Isfahan
|
||||
industrial-parks organization name from a longer query, trims adjacent leading
|
||||
or trailing prepositions and collapses whitespace. A removal is retained only
|
||||
when at least three characters remain; an organization-only query is preserved.
|
||||
This reduces repeated organization-name expansion in entity/contact searches.
|
||||
It changes retrieval query text, not authenticated organization scope, document
|
||||
eligibility or the optional context field. The tool description also asks the
|
||||
model not to append the organization name. This code path is separate from the
|
||||
extractive output gate and does not establish measured relevance improvement.
|
||||
@@ -1,3 +1,26 @@
|
||||
# Current checklist reconciliation — 2026-10-20
|
||||
|
||||
The checklist below is the historical 2026-10-08 snapshot. Its unchecked runtime
|
||||
items are superseded where implemented in the [current status](../current-status.md).
|
||||
This separation preserves the distinction between implementation and acceptance.
|
||||
|
||||
- [x] Modular authenticated API and separate worker; uploaded-document search.
|
||||
- [x] Backend upload/status, retained review/resume, retry and active selection.
|
||||
- [x] Owned voice sessions, backend WSS, trusted tool dispatch and profile pinning.
|
||||
- [x] D05 soft deletion, F01 public model inventory and permitted provider selection.
|
||||
- [x] Local GapGPT dialogue plus ElevenLabs STT/TTS and strict extractive gate.
|
||||
- [x] Schema head 0006 and consolidated local startup dependencies documented.
|
||||
- [ ] Human acceptance of the final ElevenLabs/strict-grounding profile.
|
||||
- [ ] Second physical LAN client with trusted HTTPS and microphone.
|
||||
- [ ] Held-out Persian RAG quality and bounded paired-provider evaluation.
|
||||
- [ ] Resolve/revalidate the three documented cancellation-diagnostic baseline failures.
|
||||
- [ ] Full MVP acceptance and operational promotion; component checks do not prove these.
|
||||
|
||||
Use [current evidence and limitations](../current-status.md) for dated results.
|
||||
General settings/model editing and full text history remain deferred.
|
||||
|
||||
---
|
||||
|
||||
# Live document MVP TODO
|
||||
|
||||
Updated 2026-10-08 against the revision 1.3 specifications and scoped-search repair review.
|
||||
|
||||
@@ -1,3 +1,20 @@
|
||||
# Latest reconciliation — 2026-10-20
|
||||
|
||||
The last recorded local activation (2026-10-18) uses ElevenLabs scribe_v2 STT,
|
||||
GapGPT gpt-4.1-mini dialogue and ElevenLabs eleven_v3/George TTS at speed 1.2,
|
||||
with a 60-second request deadline and strict current-turn extractive grounding.
|
||||
Retrieval admits ten whole chunks within 12,000 characters.
|
||||
See [current status](../current-status.md) and the
|
||||
[consolidated runbook](../guides/current-local-stack.md).
|
||||
|
||||
The 2026-10-17 [combined evidence](../evaluation/local-s2s/combined-ready-20261017.md)
|
||||
and 2026-10-18 activation reports supersede earlier preparation-only statements.
|
||||
Human acceptance of the final profile, paired evaluation and operational
|
||||
promotion remain open. Earlier budgets/stopped/running statements below apply
|
||||
only to their dated runs; do not restart an old exclusive ledger.
|
||||
|
||||
---
|
||||
|
||||
## 2026-10-16 — interruption incident follow-up
|
||||
|
||||
[Evidence and scoped budget-denial repair](../evaluation/local-s2s/phase-04-interruption-incident.md): 100 focused checks passed; actual native active cancellation/retained history/next response passed offline,71.037s, zero paid calls. Browser transient error code remains unavailable; do not claim full incident or human acceptance. Exhausted engine and test API/frontend stopped. Old ledger remains exclusive; reserve$0.704504399 held. No tuning changes.
|
||||
|
||||
@@ -43,7 +43,7 @@ Proposed field limits: deferred text message 8000 characters; assistant name 120
|
||||
| D02 | GET `/documents` | Admin | 200 | MVP |
|
||||
| D03 | GET `/documents/{document_id}` | Admin | 200 | MVP |
|
||||
| D04 | POST `/documents/{document_id}/retry` | Admin | 202 | MVP |
|
||||
| D05 | DELETE `/documents/{document_id}?expected_revision=N` | Admin | 202 | Deferred |
|
||||
| D05 | DELETE `/documents/{document_id}` | Admin | 202 | User-authorized server import (2026-10-18) |
|
||||
| D06 | GET `/documents/{document_id}/extraction-review` | Admin | 200 | MVP |
|
||||
| D07 | POST `/documents/{document_id}/extraction-review/decisions` | Admin | 200 | MVP |
|
||||
| K01 | GET `/knowledge-selection` | Admin | 200 | MVP |
|
||||
@@ -183,9 +183,9 @@ paths, models or reviewer fields. Rejecting keeps zero publication and a safe
|
||||
failure reason. Lost worker ownership cannot attach candidates; an admin cannot
|
||||
approve a fresh OCR response using an old digest.
|
||||
|
||||
### D05 — Delete (deferred HTTP/UI)
|
||||
### D05 — Delete (enabled HTTP/UI, 2026-10-18)
|
||||
|
||||
Required `expected_revision` is the current knowledge revision; required idempotency key. Transaction locks selection and document. Mark deleted and inactive; if formerly active, increment knowledge revision and access epoch and invalidate sessions. Physical cleanup is not promised by this response.
|
||||
JSON body: `{"expected_revision": N}` (positive strict integer; extra fields rejected). Required `expected_revision` is the current knowledge revision; required idempotency key. The authenticated administrator route requires Origin/CSRF validation and uses a bounded 1024-byte JSON body. Transaction locks selection and document. Mark deleted and inactive; if formerly active, increment knowledge revision and access epoch and invalidate sessions. Physical cleanup is not promised by this response.
|
||||
|
||||
```json
|
||||
{"document_id":"10000000-0000-4000-8000-000000000001","deleted":true,"knowledge_revision":3,"access_epoch":2,"cleanup_status":"pending_policy"}
|
||||
@@ -922,3 +922,26 @@ for this explicitly requested capability. It does not authorize promotion.
|
||||
|
||||
Provider secrets and tuned OpenAI speech settings stay server-side. Selection adds
|
||||
no tables/migrations or document-content versioning.
|
||||
|
||||
|
||||
## Server source import amendment (2026-10-18)
|
||||
|
||||
The user explicitly authorized importing deployed document deletion, S2S diagnostics
|
||||
and model settings. D05 HTTP/UI is enabled under its existing soft-deletion,
|
||||
revision/epoch, replay and retention rules. The deployed request sends the
|
||||
revision in the JSON body, not the historical query placeholder. This amendment
|
||||
records that intentional contract and its Angular consumer.
|
||||
|
||||
F01 adds `models`, an array of `{id, label, model}` public identifiers. Roles are
|
||||
`embedding`, `ocr`, and, when enabled/selectable, `dialogue`, `stt`, `tts`,
|
||||
`openai` and `gemini`. It contains no credentials or service URLs and does not
|
||||
promise that provider readiness has passed. The settings UI displays deployed
|
||||
models; its Live card uses the existing permitted provider selector for the next
|
||||
conversation. This does not add F02 model/credential editing or a selectable
|
||||
arbitrary-model API. Existing model profile/revision pinning remains intact.
|
||||
|
||||
See [import evidence](../guides/server-source-sync-20261018.md).
|
||||
|
||||
## User-authorized evidence admission amendment (2026-10-18)
|
||||
|
||||
`search_knowledge` and shared search inspection now return up to ten whole eligible source chunks (previously five), within the unchanged 12,000-character text budget. Cutoff filtering may yield fewer. Schema and source identities are unchanged. Retrieval-policy fingerprint includes `whole-10-12000`; calibration reports must match. Current-turn source reporting remains mandatory; source order does not establish relevance. Local voice enables a bounded extractive output gate before TTS; unsupported text becomes a fixed insufficient-evidence response. See [grounding correction and validation](../guides/strict-grounding-20261018.md).
|
||||
|
||||
@@ -103,6 +103,7 @@ Composite FK to users. CHECK expires_at > created_at. Index expires_at for clean
|
||||
| revision | bigint 1 | Settings optimistic revision |
|
||||
| knowledge_revision | bigint 1 | Selected-set revision |
|
||||
| access_epoch | bigint 1 | Invalidation counter for removals |
|
||||
| voice_models | jsonb NOT NULL, empty object | Object-valued schema preparation added by 0006; public model display uses deployment settings |
|
||||
| updated_by | uuid nullable | Actor; scoped FK to users |
|
||||
| updated_at | timestamptz | Last configuration/selection mutation |
|
||||
|
||||
@@ -518,3 +519,23 @@ close-on-interruption policy fields are frozen too. No schema migration is neede
|
||||
old rows/snapshots are not rewritten and credentials/secret-derived hashes are
|
||||
excluded. Replays retain their original profile; changed/missing effective state
|
||||
rejects stream admission. See [Phase 2 evidence](../evaluation/local-s2s/phase-02.md).
|
||||
|
||||
### Model-settings schema amendment (documented 2026-10-20)
|
||||
|
||||
The imported forward revision `0006_voice_model_settings` follows
|
||||
`0005_live_owner_chain` and adds `organization_settings.voice_models jsonb
|
||||
NOT NULL DEFAULT '{}'`, with `CHECK (jsonb_typeof(voice_models)='object')`.
|
||||
It does not add a table or document-content version. Existing rows receive the
|
||||
empty object; existing embedding/session profile metadata is not rewritten.
|
||||
|
||||
Current Live reservation admission requires revision 0006. Ingestion compatibility
|
||||
also recognizes the new head; its broader compatibility allowance does not imply
|
||||
that older schemas satisfy Live admission. Apply online forward migrations before
|
||||
starting the updated API, preserving all applied revisions.
|
||||
|
||||
The column is schema preparation: current F01 public model inventory is derived
|
||||
from deployment settings through the model catalog, not arbitrary values in this
|
||||
column. F02/model mutation endpoints remain deferred. No provider credentials
|
||||
belong in this JSON object. Downgrade removes the column and is not a routine
|
||||
recovery procedure. See [current status](../current-status.md) and
|
||||
[source-import evidence](../guides/server-source-sync-20261018.md).
|
||||
|
||||
Reference in New Issue
Block a user