docs(voice): consolidate local S2S roadmap into four phases
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
# Local S2S phase prompts
|
||||
# Four active local S2S implementation prompts
|
||||
|
||||
Read [the complete plan](../local-s2s-adapter-plan.md) and [progress ledger](../local-s2s-adapter-progress.md). Each file contains one copy-ready English prompt. Run one phase at a time; never assume prerequisites passed.
|
||||
Read [the plan](../local-s2s-adapter-plan.md) and [progress ledger](../local-s2s-adapter-progress.md).
|
||||
Run one prompt per phase. These four prompts supersede the eight-stage version;
|
||||
[historical prompts](../archive/local-s2s-eight-phase/README.md) are not active.
|
||||
|
||||
- [Phase 0 - Baseline and immutable upstream audit](phase-00.md)
|
||||
- [Phase 1 - Small provider boundary with OpenAI preserved](phase-01.md)
|
||||
- [Phase 2 - Isolated S2S engine with OpenRouter stages](phase-02.md)
|
||||
- [Phase 3 - Local provider and normal browser session](phase-03.md)
|
||||
- [Phase 4 - Verified interruption and history synchronization](phase-04.md)
|
||||
- [Phase 5 - Shared RAG and declared-source integration](phase-05.md)
|
||||
- [Phase 6 - Persian quality, latency, cost and resilience](phase-06.md)
|
||||
- [Phase 7 - Controlled switch and verified rollback](phase-07.md)
|
||||
- [Phase 1 - Preserve OpenAI and introduce the provider boundary](phase-01.md)
|
||||
- [Phase 2 - Add an isolated local stack and browser voice session](phase-02.md)
|
||||
- [Phase 3 - Complete interruption, shared RAG and used sources](phase-03.md)
|
||||
- [Phase 4 - Validate quality/cost and prove controlled switch/rollback](phase-04.md)
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
# Phase 0 - Baseline and immutable upstream audit
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
|
||||
```text
|
||||
Implement Phase 0 only: Baseline and immutable upstream audit.
|
||||
|
||||
Prerequisite:
|
||||
No implementation prerequisite. The current deployment must remain unchanged.
|
||||
|
||||
Required visible outcome:
|
||||
Produce a compatibility matrix and baseline evidence that a user can inspect before any adapter changes.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
- Implement only this phase. Check actual prerequisite artifacts, not just the existence of code. State observed, simulated, unverified and blocked outcomes separately.
|
||||
- Preserve OpenAI/Gemini behavior, original operational/rollback containers/images, frozen old profiles and unrelated working-tree changes. No database reset, compose down, pruning or implicit provider switch.
|
||||
- Keep existing browser PCM24k/application events, backend-derived identity, one canonical search implementation, document/chunk references and authorization/revision checks.
|
||||
- Make the smallest scoped change. No plugin framework, full runtime rewrite, new broker or unrelated refactor. Update intentional contracts and affected consumers coherently; never edit applied migrations.
|
||||
- Ordinary tests are provider-free. DB acceptance requires a verified disposable TEST_DATABASE_URL and --require-postgres; never production. Do not run a parallel application API against the operational database.
|
||||
- Reuse explicit authorization already present. Paid requests, downloads and operational switching need the applicable bounded authorization. Without it, finish independent offline preparation, identify the exact missing prerequisite and keep dependent live acceptance open.
|
||||
- Do not print keys/full environments/raw provider payloads or real user speech. Consent-controlled fixture artifacts are separate from default logs.
|
||||
- Never fake provider events, terminal success or history acknowledgements. Unsupported capabilities fail safely. Do not introduce automatic cross-provider fallback.
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Capture baseline selected profile, preserved container IDs/image digests, ports and mounts without credentials; do not recreate containers.
|
||||
2. Resolve an immutable speech-to-speech commit and dependency/build inputs. Inspect actual implementation/tests for setup, consumed input, manual turn control, identities, tools, audio, terminals, cancellation and history mutation.
|
||||
3. Map each required operation to supported / patch-required / unverified. Explicitly flag no-op truncate and completed-but-unplayed assistant history.
|
||||
4. Run focused current regressions and classify any pre-existing failures without changing assertions. Prepare an authorized frozen Persian fixture corpus and expected critical facts.
|
||||
5. Record exact heard-prefix policy, profile attestation design, missing live prerequisites and decision owners. Propose alternatives without silently accepting weaker history behavior.
|
||||
|
||||
Acceptance criteria:
|
||||
- Baseline and rollback identities are recorded; no service/data changes occurred.
|
||||
- Upstream is pinned and every required semantic has a proof test or explicit gap.
|
||||
- Existing test failures, missing credentials and live-unverified items are visible.
|
||||
- No unsupported acknowledgement is accepted by inference.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
app/modules/voice/, app/infrastructure/realtime.py, voice_provider.py, gemini_live.py, app/api/v1/live.py, app/main.py, current tests and pinned upstream sources.
|
||||
|
||||
Validation:
|
||||
Use current selected-provider/context-sync/search-reuse/sources/output-limit/style tests; inspect lifecycle/profile and schema constraints. No paid calls.
|
||||
|
||||
Visible demonstration:
|
||||
Open the compatibility matrix and replay one existing offline interruption trace. The user sees what works and what needs a patch.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
Unknown semantics stay unverified. Do not start refactoring or downloading models in this phase.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-00.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
```
|
||||
@@ -1,15 +1,16 @@
|
||||
# Phase 1 - Small provider boundary with OpenAI preserved
|
||||
# Phase 1 - Preserve OpenAI and introduce the provider boundary
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
Copy this prompt into a fresh implementation session in the repository.
|
||||
|
||||
```text
|
||||
Implement Phase 1 only: Small provider boundary with OpenAI preserved.
|
||||
Implement Phase 1 of the active FOUR-phase local S2S plan only: Preserve OpenAI and introduce the provider boundary.
|
||||
Do not execute the archived eight-stage prompts.
|
||||
|
||||
Prerequisite:
|
||||
Phase 0 audit, scoped contract proposal and baseline evidence exist.
|
||||
No adapter implementation has started. Inspect the current repository and deployment first.
|
||||
|
||||
Required visible outcome:
|
||||
OpenAI still produces the same command/ack behavior through a provider boundary; show a deterministic before/after replay.
|
||||
An existing OpenAI session still works; an offline before/after interruption replay proves the same cleanup and next-turn behavior.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
@@ -24,34 +25,36 @@ Execution rules:
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Implement minimal internal typed operations/events for actual runtime needs, preserving raw provider replay fingerprints and identities.
|
||||
2. Keep turn ownership, authorization, evidence, deadlines, audio credits, final played positions and next-turn release in runtime. Move native encoding/parsing and confirmation interpretation into adapters.
|
||||
3. Define interruption progress with operation/response/item/session identities and separate generation-stop/history-repair proof. Capability declarations must not waive cleanup.
|
||||
4. Adapt OpenAI using existing cancel/terminal/truncate semantics unchanged. Preserve Gemini conservative failure. No model/voice branches in shared control.
|
||||
5. Add controlled-clock regression/replay tests and document the internal responsibility amendment while keeping browser wire behavior fixed.
|
||||
- Capture current/preserved container and image identities, effective provider/profile and focused regression results. Keep the operational deployment unchanged.
|
||||
- Pin an upstream commit/build inputs and audit actual setup, input consumption, manual turn control, metadata/identities, tool events, audio rates, terminal states and history repair.
|
||||
- Record a compatibility matrix and unresolved decisions, especially the no-op truncate and completed-but-unplayed history case.
|
||||
- Extract only the small internal provider boundary needed by runtime. Runtime owns authorization, turn identity, playback credits, deadlines, evidence lifetime and next-turn release; adapters own native wire/confirmation details.
|
||||
- Keep native OpenAI cancel/terminal/truncate/ack semantics, raw replay fingerprints and correlation intact. Preserve Gemini's conservative failures.
|
||||
- Define correlated interruption progress with separate generation-stop and actual history-repair proof. Capability flags never waive safety gates.
|
||||
- Add controlled-clock replay/conformance coverage and document the internal responsibility split without changing public browser behavior.
|
||||
|
||||
Acceptance criteria:
|
||||
- Existing OpenAI assertions remain and affected tests pass, with prior failures reported honestly.
|
||||
- Before/after trace releases exactly one next response after matching cleanup.
|
||||
- Wrong/missing/late/duplicate-conflicting events, limited tools and timeouts fail safely.
|
||||
- No deployment/default change or unnecessary persistence migration.
|
||||
- Existing OpenAI regressions retain their assertions and pass; pre-existing failures are reported honestly.
|
||||
- The same fixture before/after refactoring releases exactly one new response after matching cleanup, with wrong/missing/late/conflicting acknowledgements failing safely.
|
||||
- Upstream SHA/build provenance, compatibility gaps and original rollback identities are recorded.
|
||||
- No runtime switch, production data change, wholesale rewrite or model/voice branch in shared turn control.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
runtime.py, a minimal internal provider-contract module if justified, realtime.py, Gemini adapter only where needed, diagnostics and focused tests.
|
||||
Relevant areas; verify actual paths first:
|
||||
configuration/settings, runtime.py, realtime.py, provider factory, minimal shared contract, Gemini compatibility, focused tests and voice contract docs.
|
||||
|
||||
Validation:
|
||||
Provider-free adapter/runtime conformance plus existing races, final playback, output limits and evidence tests. Isolated PostgreSQL only if persistence behavior changed.
|
||||
Existing context-sync, provider-selection, retained-search, source-report, output-limit and style tests; controlled-clock replay. Isolated PostgreSQL acceptance if persisted profile/lifecycle behavior is touched.
|
||||
|
||||
Visible demonstration:
|
||||
Replay a fixture: interrupted old output stops, matching final played position is confirmed, and one new response begins.
|
||||
Visible demo:
|
||||
Run an existing OpenAI interaction if already authorized, and show a deterministic interruption trace through the new boundary. No new provider is enabled.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
No wholesale state-machine rewrite or generic provider-error suppression.
|
||||
Stop/narrow condition:
|
||||
Unknown upstream behavior stays unverified. Do not weaken OpenAI or start a deployment switch to make the new boundary easier.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-01.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
Deliver scoped implementation/configuration/tests/contracts as necessary,
|
||||
docs/evaluation/local-s2s/phase-01.md with exact commands and actual/simulated/
|
||||
unverified outcomes, and an updated docs/plans/local-s2s-adapter-progress.md.
|
||||
Provide demo steps, acceptance verdict, risks, not-run checks and rollback relevance.
|
||||
Do not declare completion while mandatory real-provider/human checks are missing.
|
||||
Do not implement the next phase or switch the operational provider implicitly.
|
||||
```
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
# Phase 2 - Isolated S2S engine with OpenRouter stages
|
||||
# Phase 2 - Add an isolated local stack and browser voice session
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
Copy this prompt into a fresh implementation session in the repository.
|
||||
|
||||
```text
|
||||
Implement Phase 2 only: Isolated S2S engine with OpenRouter stages.
|
||||
Implement Phase 2 of the active FOUR-phase local S2S plan only: Add an isolated local stack and browser voice session.
|
||||
Do not execute the archived eight-stage prompts.
|
||||
|
||||
Prerequisite:
|
||||
Pinned engine/build design from Phase 0; independent of Phase 1 where no application integration is used.
|
||||
Phase 1 accepted. Isolated engine and candidate API use disposable DB/storage, not the operational database.
|
||||
|
||||
Required visible outcome:
|
||||
A Persian recording independently becomes a transcript, LLM response and playable WAV with stage timings and actual usage.
|
||||
The existing browser talks in Persian through local_s2s using OpenRouter STT/LLM/TTS, displays transcripts and closes normally in a disposable environment.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
@@ -24,34 +25,37 @@ Execution rules:
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Build a separate pinned engine image/environment. Use local VAD and independently configured remote STT, Chat Completions LLM and TTS.
|
||||
2. Discover/pin supported model IDs/voices/parameters and test Persian language behavior. Choose a tool-capable text LLM, not an assumed universal audio endpoint.
|
||||
3. Verify explicit credential forwarding, multipart/JSON STT, TTS stream fields, raw PCM rate/endianness and startup probes. Add a narrow shim only for an observed mismatch.
|
||||
4. Use final-utterance STT initially. Bound retries, requests, response sizes, concurrency and cleanup; include startup probes in cost.
|
||||
5. Provide deterministic stub mode and opt-in live smoke with bounded requests/time/cost. Save only consented evaluation outputs; do not connect to production DB/API.
|
||||
- Build a separate engine from the pinned SHA with local VAD and independently configured OpenRouter HTTP STT, tool-capable Chat Completions LLM and TTS. Avoid unnecessary local-model/GPU downloads.
|
||||
- Discover/pin actual model IDs, voices, Persian hints, supported fields and PCM rates. Verify multipart/JSON STT, TTS streaming/format compatibility and explicit server-side credential forwarding.
|
||||
- Begin with final-utterance STT. Bound requests/concurrency/bytes/retries/cleanup and meter startup probes. Provide stub mode plus an explicitly opt-in bounded live smoke and playable test audio.
|
||||
- Add local_s2s settings/factory/readiness alongside openai/gemini. Preserve the browser PCM16LE mono24k and existing JSON events; use bounded stateful resampling if required.
|
||||
- Freeze engine/patch/contract revision, component identities, voice/input policy and effective instruction/config digest. Compare to authoritative engine state, not request echoes or socket reachability.
|
||||
- Map actual input acceptance, manual response creation/intent, tool framing, terminal/error and transcript/audio semantics without invented native commit events.
|
||||
- Preserve owner/Origin/cookie/CSRF/replay/epoch checks and old snapshots. Audit provider DTO/DB constraints; use a forward migration only if actually needed and compatible with rollback.
|
||||
- Use a separate test hostname/browser identity and disposable DB/storage. Until Phase 3, interruptions must fail safely and be labelled development-only; do not enable unsafe continuation.
|
||||
|
||||
Acceptance criteria:
|
||||
- With authorized live prerequisites, all three stages succeed and output audio is valid; otherwise mark live-pending.
|
||||
- Invalid key/model/voice/rate cannot produce false readiness.
|
||||
- Models remain independently replaceable and keys remain server-side.
|
||||
- Existing app, worker, database and rollback container are untouched.
|
||||
- A normal browser greeting/answer/transcript/close works against the isolated candidate, and independent stage probes produce valid audio.
|
||||
- Model/voice/rate/credential/effective-config mismatches fail setup accurately; keys and secret-derived hashes never enter profiles or logs.
|
||||
- Existing OpenAI remains usable; new configuration does not rewrite old reservations or change the operational provider.
|
||||
- Actual provider checks are distinguished from stubs. Missing credentials or real speech evidence leaves live acceptance pending.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
An opt-in engine build/service directory, isolated Compose configuration, smoke command and evaluation fixtures. Do not vendor all upstream code into app/.
|
||||
Relevant areas; verify actual paths first:
|
||||
Pinned engine service/build config, isolated Compose profile, local adapter, validated settings/profile/factory/readiness, .env.example, smoke harness and tests.
|
||||
|
||||
Validation:
|
||||
Pinned upstream relevant tests and HTTP fixtures; optional bounded actual-provider requests. Ordinary tests require no keys or weights.
|
||||
HTTP boundary fixtures, pinned-engine relevant tests, local adapter contract tests, isolated PostgreSQL profile/admission/replay/revocation cases and bounded actual browser/provider smoke.
|
||||
|
||||
Visible demonstration:
|
||||
Run the isolated Persian smoke, inspect its requested test transcript, hear the WAV and view per-stage timing/usage.
|
||||
Visible demo:
|
||||
Show a recorded Persian utterance becoming a WAV response, then perform a normal greeting in the existing browser against the isolated candidate.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
Missing keys/availability blocks live proof only. Do not install unrelated local-model/GPU extras.
|
||||
Stop/narrow condition:
|
||||
A different port is not DB isolation. Do not claim safe barge-in or production parity before Phase 3; do not promote this provider.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-02.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
Deliver scoped implementation/configuration/tests/contracts as necessary,
|
||||
docs/evaluation/local-s2s/phase-02.md with exact commands and actual/simulated/
|
||||
unverified outcomes, and an updated docs/plans/local-s2s-adapter-progress.md.
|
||||
Provide demo steps, acceptance verdict, risks, not-run checks and rollback relevance.
|
||||
Do not declare completion while mandatory real-provider/human checks are missing.
|
||||
Do not implement the next phase or switch the operational provider implicitly.
|
||||
```
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
# Phase 3 - Local provider and normal browser session
|
||||
# Phase 3 - Complete interruption, shared RAG and used sources
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
Copy this prompt into a fresh implementation session in the repository.
|
||||
|
||||
```text
|
||||
Implement Phase 3 only: Local provider and normal browser session.
|
||||
Implement Phase 3 of the active FOUR-phase local S2S plan only: Complete interruption, shared RAG and used sources.
|
||||
Do not execute the archived eight-stage prompts.
|
||||
|
||||
Prerequisite:
|
||||
Phases 1 and 2 have accepted prerequisite evidence. Candidate app has disposable DB/storage.
|
||||
Phase 2 accepted. Local engine history ownership and compatibility gaps are understood; shared SearchService remains authoritative.
|
||||
|
||||
Required visible outcome:
|
||||
The existing browser opens a local_s2s session, greets in Persian, displays transcript and closes cleanly in isolation.
|
||||
The user interrupts and continues safely, receives correct document answers and sees only valid used sources; repeated interrupted searches are not duplicated.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
@@ -24,36 +25,39 @@ Execution rules:
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Add local_s2s to validated selection/factory/settings/readiness without removing openai/gemini or adding a UI selector.
|
||||
2. Freeze engine/patch/contract revisions, effective component models, voice, speech policy, rates and instruction/config digest. Do not store secrets or secret hashes.
|
||||
3. Compare reservation expectations with authoritative effective engine setup; do not rely on connection reachability or echoing desired values.
|
||||
4. Map real input acceptance, response intent/identity, tool frames, terminal states and audio/transcript. Do not synthesize native commit acknowledgements from timing.
|
||||
5. Keep browser PCM16LE mono24k and public events. Bound resampling and convert playback coordinates correctly.
|
||||
6. Preserve owner/Origin/cookie/CSRF/replay/epoch checks and old profiles. Audit DB/DTO constraints; new migration only if necessary.
|
||||
7. Use isolated DB/storage and separate test browser credentials/origin. Unsupported interruption fails closed until Phase 4.
|
||||
- First implement/prove local interruption and history synchronization. Patch/version the pinned engine narrowly if it cannot apply the required real mutation.
|
||||
- Cover active generation AND already-completed generation with queued unplayed audio. Track operation/response/item/segment/session identities and actual played coordinates.
|
||||
- Inspect the next real controlled LLM request: unheard assistant sentinel text must be absent while valid previous user/tool/assistant context remains. Do not infer text alignment from duration/character ratios.
|
||||
- Accept only receipts emitted after the actual mutation with applied history revision/provenance. Missing, wrong, stale or conflicting receipts fail within bounded deadlines; runtime retains release authority.
|
||||
- If exact heard-prefix repair is unproven, keep the gate open. Whole-turn rollback or fully-played-segment retention is a weaker policy requiring explicit acceptance and contract documentation.
|
||||
- Suppress obsolete STT/LLM/TTS outputs even if remote inference keeps computing. Keep backend retained retrieval separate from speech cancellation and preserve original deadlines.
|
||||
- Then expose search_knowledge, reuse_last_evidence and report_used_sources through the existing backend dispatcher/ToolContext/DurableTools/SearchService; never add engine DB authority or a parallel RAG implementation.
|
||||
- Preserve successful-terminal tool validation, call/item/response dedup, backend scope, calibrated eligible retrieval, source identities and handoff/delivery revalidation.
|
||||
- Test current-turn source reports, private invalid-report correction, no_evidence versus technical error, knowledge revocation, topic switch and interrupted pending-search reuse.
|
||||
- Evaluate known hours/fees, deputy name/organization and incentive percentage/date/exclusion failures. Correct citations alone do not prove correct answer content.
|
||||
|
||||
Acceptance criteria:
|
||||
- Ready/audio/transcript/close work end to end in the isolated app.
|
||||
- Incorrect profile, configuration, ownership or epoch is rejected; no snapshot rewrites.
|
||||
- Malformed terminals/disconnects cannot cause false success.
|
||||
- This remains development-only, not operational parity or a default switch.
|
||||
- No next response before generation-stop, real context repair and playback gates. Active and completed-unplayed history tests pass without fabricated acknowledgement events.
|
||||
- Missing/wrong receipts fail safely; late output cannot contaminate a new turn or reused session; OpenAI interruption regressions remain intact.
|
||||
- All three tools execute through existing authority; no stale/revoked/inactive/deleted evidence reaches reuse/delivery.
|
||||
- Repeating an interrupted same-topic question uses one original retrieval plus revalidation, with valid used-source subset. Known critical document fixtures are answered correctly.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
configuration.py, settings.py, voice_provider.py, new local adapter, live admission/lifecycle only where required, .env.example and isolated deployment config.
|
||||
Relevant areas; verify actual paths first:
|
||||
Local adapter and minimal pinned-engine repair extension, shared interruption contract/barriers, tool event mapping, existing dispatch/DurableTools and focused conformance/evaluation tests.
|
||||
|
||||
Validation:
|
||||
Provider-free adapter contract tests, isolated PostgreSQL admission/replay/profile/revocation, then bounded browser live smoke.
|
||||
Controlled-clock/history-inspection/late-event tests; all affected OpenAI tests; existing retained-search/source suites extended to local; isolated DB evidence/revocation acceptance; bounded real barge-in and RAG checks.
|
||||
|
||||
Visible demonstration:
|
||||
Use the existing browser to greet and close. Show the local pinned profile and separate OpenAI conformance results.
|
||||
Visible demo:
|
||||
Interrupt before an unheard sentinel and inspect the subsequent LLM context; then ask hours, deputy and incentive questions, including a pending-search interruption/repeat.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
Never use a second port with the operational DB. No promotion before interruption/RAG acceptance.
|
||||
Stop/narrow condition:
|
||||
This phase has two required checkpoints: history safety before dependent continuation tests, then shared RAG. They are not extra phases, and neither can be skipped or accepted from stopped playback alone.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-03.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
Deliver scoped implementation/configuration/tests/contracts as necessary,
|
||||
docs/evaluation/local-s2s/phase-03.md with exact commands and actual/simulated/
|
||||
unverified outcomes, and an updated docs/plans/local-s2s-adapter-progress.md.
|
||||
Provide demo steps, acceptance verdict, risks, not-run checks and rollback relevance.
|
||||
Do not declare completion while mandatory real-provider/human checks are missing.
|
||||
Do not implement the next phase or switch the operational provider implicitly.
|
||||
```
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
# Phase 4 - Verified interruption and history synchronization
|
||||
# Phase 4 - Validate quality/cost and prove controlled switch/rollback
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
Copy this prompt into a fresh implementation session in the repository.
|
||||
|
||||
```text
|
||||
Implement Phase 4 only: Verified interruption and history synchronization.
|
||||
Implement Phase 4 of the active FOUR-phase local S2S plan only: Validate quality/cost and prove controlled switch/rollback.
|
||||
Do not execute the archived eight-stage prompts.
|
||||
|
||||
Prerequisite:
|
||||
Phase 3 works in isolation. Upstream history/turn ownership and required patch are understood.
|
||||
Phase 3 accepted. Frozen corpus/model profiles, bounded live evaluation authorization and reviewable deployment/rollback configuration are available.
|
||||
|
||||
Required visible outcome:
|
||||
The user interrupts a long answer and continues coherently; inspect the next model request to prove unheard sentinel text is absent.
|
||||
A paired OpenAI/local scorecard supports the deployment decision, and the preserved OpenAI container is demonstrably restorable without rebuild.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
@@ -24,36 +25,38 @@ Execution rules:
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Add an actual correlated engine repair operation/extension if needed. Pin the patch and test it independently; do not monkey-patch installed packages as the deployment strategy.
|
||||
2. Handle both active generation and completed generation with audio still queued at the browser. Closing TTS HTTP or getting response.done does not prove history repair.
|
||||
3. Track response/item/segment/session identities, final consumed position and reliable text/audio mapping; no proportional text slicing.
|
||||
4. Preserve valid earlier user/assistant/tool state and remove unheard assistant continuation from subsequent LLM input. Verify applied history revision/digest.
|
||||
5. If exact heard-prefix repair cannot be proven, keep this gate open. Whole-turn rollback or fully-played-segment-only retention needs explicit policy acceptance and contract changes.
|
||||
6. Validate real applied receipts against operation identity; reject stale/missing/conflicting receipts with bounded safe failure. Runtime owns final release.
|
||||
7. Suppress late STT/LLM/TTS work and preserve same-topic backend search independently. Re-run all affected OpenAI interruption tests.
|
||||
- Run paired Persian fixtures with the same authorized corpus and expected facts: names/roles, numbers/dates/conditions, noise/pauses/corrections, ambiguity, no evidence, follow-up and topic switch.
|
||||
- Measure first audible response after speech end, tool time, interruption stop, underruns, duplicates, disconnects and successful tasks. Count actual model usage, STT duration, TTS units, startup/failure/abandoned work; unknown cost stays unknown.
|
||||
- Fault-test quota, slow/down endpoints, partial stream loss, restart, saturation and teardown; no unbounded queues, retry storms or stale output. Use human listening separately from deterministic checks.
|
||||
- Set/accept thresholds before evaluation. Provisional targets: zero critical factual fixture errors, p95 first-audible latency <= baseline + 1 second, no persistent underruns and cost per successful task <= 70% baseline for cost-saving promotion.
|
||||
- Change one component at a time and report failures honestly. If quality/cost targets fail, keep OpenAI rather than silently changing thresholds or padding buffers.
|
||||
- Finalize opt-in Compose, .env.example and operator runbook. Keep original container/image/config intact and separately tag candidate. Check any schema change against the old image; incompatible schema blocks simple rollback.
|
||||
- Complete all reviewable preparation before operational switching. With explicit authorization, drain/close sessions, stop current API, then start candidate on operational DB. Never run both APIs against it simultaneously.
|
||||
- Verify fresh-session greeting, RAG, sources, interruption and close; actually stop candidate/start preserved OpenAI without rebuild and verify a fresh baseline session.
|
||||
- Leave final provider as explicitly requested. Record IDs/digests/commands/checks and limitations; container rollback is not DB/filesystem rollback or seamless media resume.
|
||||
|
||||
Acceptance criteria:
|
||||
- Generation stop, real context repair and application playback gates all precede next response.
|
||||
- Active and completed-unplayed cases pass controlled history inspection and actual microphone testing.
|
||||
- Wrong/missing receipts fail safely; late output cannot contaminate another turn/session.
|
||||
- No fabricated conversation.item.truncated or weakened OpenAI checks; unapproved weaker policies block promotion.
|
||||
- Required paired factual, human-quality, failure and resource checks have actual evidence and sample counts; missing live checks block promotion.
|
||||
- Cost-saving claims include failed/abandoned/startup usage; model pricing alone is not measured service savings.
|
||||
- Original OpenAI restoration has actually succeeded and users/ingestion data are preserved. One API owns the operational lifecycle at a time.
|
||||
- Final provider is explicitly recorded. Without switch authorization, prepare the result and remain operationally unchanged rather than claiming deployment completion.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
Internal interruption contract, local adapter, pinned engine extension/patch, runtime barrier integration, diagnostics and regression tests.
|
||||
Relevant areas; verify actual paths first:
|
||||
Evaluation harness/fixtures/usage diagnostics, opt-in Compose configuration, .env.example, operator runbook and phase evidence; code changes only for demonstrated defects.
|
||||
|
||||
Validation:
|
||||
Controlled clocks, ordering, races, receipt replay, mid-segment interruption, teardown/reuse, terminal-completed/unplayed audio, plus actual bounded live interruption.
|
||||
Focused/provider-free tests, isolated PostgreSQL acceptance, controlled faults, authorized paired real-provider checks and human listening; config/image inspection and controlled fresh-session switch/rollback.
|
||||
|
||||
Visible demonstration:
|
||||
Generate an answer with a late sentinel, interrupt before hearing it, inspect the following LLM context, then demonstrate real barge-in and continuation.
|
||||
Visible demo:
|
||||
Play paired Persian name/date clips and show the scorecard. If authorized and accepted, demonstrate local RAG then OpenAI rollback without rebuilding the preserved container.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
This is the highest-risk gate. Stopped playback or upstream SDK compatibility does not prove the required semantics.
|
||||
Stop/narrow condition:
|
||||
Quality/cost evidence and explicit operational switch authorization are separate gates within this phase. Prepare independent work but do not bypass either.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-04.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
Deliver scoped implementation/configuration/tests/contracts as necessary,
|
||||
docs/evaluation/local-s2s/phase-04.md with exact commands and actual/simulated/
|
||||
unverified outcomes, and an updated docs/plans/local-s2s-adapter-progress.md.
|
||||
Provide demo steps, acceptance verdict, risks, not-run checks and rollback relevance.
|
||||
Do not declare completion while mandatory real-provider/human checks are missing.
|
||||
Do not implement the next phase or switch the operational provider implicitly.
|
||||
```
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
# Phase 5 - Shared RAG and declared-source integration
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
|
||||
```text
|
||||
Implement Phase 5 only: Shared RAG and declared-source integration.
|
||||
|
||||
Prerequisite:
|
||||
Phase 4 context safety accepted. Existing shared search and evidence policy remain authoritative.
|
||||
|
||||
Required visible outcome:
|
||||
Document questions work with valid used sources, and a repeated interrupted question reuses one original retrieval.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
- Implement only this phase. Check actual prerequisite artifacts, not just the existence of code. State observed, simulated, unverified and blocked outcomes separately.
|
||||
- Preserve OpenAI/Gemini behavior, original operational/rollback containers/images, frozen old profiles and unrelated working-tree changes. No database reset, compose down, pruning or implicit provider switch.
|
||||
- Keep existing browser PCM24k/application events, backend-derived identity, one canonical search implementation, document/chunk references and authorization/revision checks.
|
||||
- Make the smallest scoped change. No plugin framework, full runtime rewrite, new broker or unrelated refactor. Update intentional contracts and affected consumers coherently; never edit applied migrations.
|
||||
- Ordinary tests are provider-free. DB acceptance requires a verified disposable TEST_DATABASE_URL and --require-postgres; never production. Do not run a parallel application API against the operational database.
|
||||
- Reuse explicit authorization already present. Paid requests, downloads and operational switching need the applicable bounded authorization. Without it, finish independent offline preparation, identify the exact missing prerequisite and keep dependent live acceptance open.
|
||||
- Do not print keys/full environments/raw provider payloads or real user speech. Consent-controlled fixture artifacts are separate from default logs.
|
||||
- Never fake provider events, terminal success or history acknowledgements. Unsupported capabilities fail safely. Do not introduce automatic cross-provider fallback.
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Expose search_knowledge, reuse_last_evidence and report_used_sources schemas to the LLM. Execute through current dispatch, ToolContext, DurableTools and SearchService.
|
||||
2. Preserve backend identity, eligibility, calibration, references, handoff/delivery revisions and access checks; no engine DB credentials or independent retrieval.
|
||||
3. Validate streamed tool arguments after successful terminal validation; correlate call/item/response identities and deduplicate replays.
|
||||
4. Preserve pending same-topic search with original deadline; revalidate reuse, discard changed-topic results, never use old assistant prose as evidence.
|
||||
5. Validate current-turn source reports and repair invalid metadata privately. Only used sources reach UI; metadata reports create no retrieval row.
|
||||
6. Exercise no_evidence versus technical error, limited tools, revocation/deactivation, interrupted source delivery and known name/percentage/date mistakes.
|
||||
|
||||
Acceptance criteria:
|
||||
- All three tools use existing authority and canonical retrieval.
|
||||
- No stale/inactive/deleted/revoked evidence is emitted, including reuse/delivery races.
|
||||
- Repeated same-topic continuation causes no duplicate search; labels map to original document/chunk IDs.
|
||||
- Evaluation checks actual answer facts, not only valid citation membership.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
Local tool mapping, current runtime dispatch, durable_tools.py and shared knowledge services only as needed for a demonstrated integration change.
|
||||
|
||||
Validation:
|
||||
Existing sources and retained-search tests extended to local, isolated PostgreSQL evidence/revocation acceptance and bounded live RAG fixtures.
|
||||
|
||||
Visible demonstration:
|
||||
Ask hours/Thursday, the named deputy in the letter and incentive conditions; interrupt a search and repeat it while showing one retrieval and revalidation.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
Do not loosen cutoff/authorization filters or introduce another search service to hide model failures.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-05.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
```
|
||||
@@ -1,58 +0,0 @@
|
||||
# Phase 6 - Persian quality, latency, cost and resilience
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
|
||||
```text
|
||||
Implement Phase 6 only: Persian quality, latency, cost and resilience.
|
||||
|
||||
Prerequisite:
|
||||
Phases 3-5 accepted; exact model/profile choices and frozen evaluation corpus recorded.
|
||||
|
||||
Required visible outcome:
|
||||
A paired OpenAI/local scorecard and audio samples demonstrate measured accuracy, latency, failure behavior and cost per successful task.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
- Implement only this phase. Check actual prerequisite artifacts, not just the existence of code. State observed, simulated, unverified and blocked outcomes separately.
|
||||
- Preserve OpenAI/Gemini behavior, original operational/rollback containers/images, frozen old profiles and unrelated working-tree changes. No database reset, compose down, pruning or implicit provider switch.
|
||||
- Keep existing browser PCM24k/application events, backend-derived identity, one canonical search implementation, document/chunk references and authorization/revision checks.
|
||||
- Make the smallest scoped change. No plugin framework, full runtime rewrite, new broker or unrelated refactor. Update intentional contracts and affected consumers coherently; never edit applied migrations.
|
||||
- Ordinary tests are provider-free. DB acceptance requires a verified disposable TEST_DATABASE_URL and --require-postgres; never production. Do not run a parallel application API against the operational database.
|
||||
- Reuse explicit authorization already present. Paid requests, downloads and operational switching need the applicable bounded authorization. Without it, finish independent offline preparation, identify the exact missing prerequisite and keep dependent live acceptance open.
|
||||
- Do not print keys/full environments/raw provider payloads or real user speech. Consent-controlled fixture artifacts are separate from default logs.
|
||||
- Never fake provider events, terminal success or history acknowledgements. Unsupported capabilities fail safely. Do not introduce automatic cross-provider fallback.
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Use identical authorized corpus/questions/audio fixtures for baseline and candidate; record exact profiles/sample counts.
|
||||
2. Cover names/roles, numbers/dates, pauses/noise, correction/ambiguity, follow-up/topic switch, no evidence and conflicts.
|
||||
3. Measure first audible response after speech end, first text/audio, tool time, interruption stop, underruns, duplicates, disconnects and completion rate.
|
||||
4. Count actual returned input/output/cache usage, STT duration, TTS billed units, failed/abandoned work and startup probes; unknown costs stay unknown.
|
||||
5. Fault-test slow/down providers, quota, partial stream loss, engine restart, saturation and teardown; no late contamination, unbounded queues or retry storms.
|
||||
6. Change one component at a time. Predeclare thresholds and keep human Persian listening separate from transport checks. Do not tune thresholds after observing failures.
|
||||
|
||||
Acceptance criteria:
|
||||
- Zero incorrect critical names/numbers/dates/conditions in the agreed fixture set; no fabricated unsupported answers.
|
||||
- Interruption scenarios complete or fail safely as specified; no persistent underruns.
|
||||
- Assess predeclared targets with counts and failures. Provisional p95 first-audible latency <= baseline + 1 second; cost/task <= 70% baseline for cost-saving promotion.
|
||||
- If quality/cost targets fail, classify honestly and keep OpenAI. Missing live/human checks leave the gate open.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
Evaluation harness, consented fixtures/annotations, content-free usage/timing diagnostics and only demonstrated bounded resource/error fixes.
|
||||
|
||||
Validation:
|
||||
Focused regressions, isolated DB acceptance, controlled transport faults, authorized bounded paired provider evaluation and human listening.
|
||||
|
||||
Visible demonstration:
|
||||
Play paired name/number/date clips; open the scorecard and demonstrate a controlled provider failure without cross-session output.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
No blanket prompt/buffer expansion, selected anecdotes or mocked quality claims. Targets are provisional goals, not achieved measurements.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-06.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
```
|
||||
@@ -1,59 +0,0 @@
|
||||
# Phase 7 - Controlled switch and verified rollback
|
||||
|
||||
Paste the following into a fresh implementation session in this repository.
|
||||
|
||||
```text
|
||||
Implement Phase 7 only: Controlled switch and verified rollback.
|
||||
|
||||
Prerequisite:
|
||||
All mandatory prior gates accepted; candidate configuration, evidence and rollback procedure are reviewable.
|
||||
|
||||
Required visible outcome:
|
||||
Switch to local_s2s only when authorized, demonstrate a document interaction, then restore preserved OpenAI without rebuilding it.
|
||||
|
||||
Execution rules:
|
||||
- Read docs/plans/local-s2s-adapter-plan.md and docs/plans/local-s2s-adapter-progress.md first. Read applicable AGENTS.md, repository skills and governing API/database/workflow sections. Inspect current code; historical defaults are not current evidence.
|
||||
- Implement only this phase. Check actual prerequisite artifacts, not just the existence of code. State observed, simulated, unverified and blocked outcomes separately.
|
||||
- Preserve OpenAI/Gemini behavior, original operational/rollback containers/images, frozen old profiles and unrelated working-tree changes. No database reset, compose down, pruning or implicit provider switch.
|
||||
- Keep existing browser PCM24k/application events, backend-derived identity, one canonical search implementation, document/chunk references and authorization/revision checks.
|
||||
- Make the smallest scoped change. No plugin framework, full runtime rewrite, new broker or unrelated refactor. Update intentional contracts and affected consumers coherently; never edit applied migrations.
|
||||
- Ordinary tests are provider-free. DB acceptance requires a verified disposable TEST_DATABASE_URL and --require-postgres; never production. Do not run a parallel application API against the operational database.
|
||||
- Reuse explicit authorization already present. Paid requests, downloads and operational switching need the applicable bounded authorization. Without it, finish independent offline preparation, identify the exact missing prerequisite and keep dependent live acceptance open.
|
||||
- Do not print keys/full environments/raw provider payloads or real user speech. Consent-controlled fixture artifacts are separate from default logs.
|
||||
- Never fake provider events, terminal success or history acknowledgements. Unsupported capabilities fail safely. Do not introduce automatic cross-provider fallback.
|
||||
- Before finishing: inspect diff, run meaningful checks, record exact commands/results and demo steps, update the progress ledger and list all not-run checks. Do not accept a phase with required live/human checks unrun. Do not begin the next phase.
|
||||
|
||||
Required work:
|
||||
1. Finalize opt-in Compose and .env.example; OpenAI remains default until explicit switching. No UI provider selector or automatic cross-provider fallback.
|
||||
2. Verify original OpenAI container/image/config remain intact. Build separate candidate tags; never remove/prune/rebuild the original rollback target.
|
||||
3. Check authoritative profile, readiness, credentials, rates/bounds and DB compatibility. An old-image-incompatible migration blocks simple rollback.
|
||||
4. Drain/close current sessions, stop the current API, then start candidate on operational DB. Never run both against that DB simultaneously.
|
||||
5. Use fresh sessions for greeting, Persian audio, tools, sources, barge-in and close; old reservations are not repinned.
|
||||
6. Actually stop candidate/start preserved OpenAI and verify health plus a fresh real session. Container rollback is not DB/filesystem rollback or seamless media resume.
|
||||
7. Leave provider state as explicitly requested and record exact commands, IDs, digests, validation and limitations.
|
||||
|
||||
Acceptance criteria:
|
||||
- Original OpenAI image/container remain intact and restoration has actually succeeded.
|
||||
- One API owns operational lifecycle at a time; users/documents/ingestion data preserved.
|
||||
- Fresh-session admission and profile pinning hold; no credentials exposed.
|
||||
- Final provider and live check results recorded; health alone is not speech/RAG acceptance.
|
||||
|
||||
Relevant paths (verify actual locations before editing):
|
||||
Opt-in Compose overrides, .env.example, operator runbook and progress/evaluation evidence; app changes only for confirmed deployment defects.
|
||||
|
||||
Validation:
|
||||
Config/image inspection, authorized controlled switch/rollback, health and actual fresh-session smoke.
|
||||
|
||||
Visible demonstration:
|
||||
Show local RAG, execute documented OpenAI rollback without rebuilding, and repeat the same question in a fresh session.
|
||||
|
||||
Explicit stop/narrow condition:
|
||||
Complete preparation first; missing explicit switch authorization, compatibility or acceptance blocks operational switching.
|
||||
|
||||
Deliver:
|
||||
1. Scoped code/configuration and necessary tests/contracts where this phase requires implementation; Phase 0 remains an audit.
|
||||
2. docs/evaluation/local-s2s/phase-07.md with exact commands, results, actual/simulated/unverified evidence, fingerprints, not-run checks and risks.
|
||||
3. Updated docs/plans/local-s2s-adapter-progress.md with a candid acceptance verdict.
|
||||
4. Exact demo instructions and rollback relevance. Preserve the operational provider unless this phase explicitly authorizes switching and session authorization exists.
|
||||
Do not implement the next phase. Do not mark acceptance complete with mandatory live or human checks unrun.
|
||||
```
|
||||
Reference in New Issue
Block a user