docs(voice): consolidate local S2S roadmap into four phases
This commit is contained in:
@@ -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.
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user