feat(voice): add isolated Local S2S v3 candidate and acceptance evidence

Extract the provider boundary while retaining OpenAI/Gemini contracts. Add
an opt-in isolated Local S2S adapter, pinned engine extension, bounded
component gateway and frozen effective configuration profiles.

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

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

Phase 1 live listening and Phase 2 complete engine/SDK/POSIX, real component
audio and Persian browser acceptance remain pending. No operational switch,
paid call, model download or Phase 3 implementation is included.
This commit is contained in:
amirhosein mazaheri
2026-10-15 12:28:17 +03:30
parent 872e5f25cb
commit 8d348f0ba1
56 changed files with 8802 additions and 44 deletions
@@ -881,3 +881,14 @@ session setup acknowledgement remain separate. Cancellation event-ID correlation
bounded terminal confirmation, final playback and truncation acknowledgement gates
remain mandatory; unknown errors and failed/incomplete technical terminals remain
fatal. This change does not establish live acceptance for every OpenAI model.
### Local S2S development candidate amendment (2026-10-15)
The server may select `local_s2s` only with explicit development/transport-test
opt-in. This does not add a client provider selector or change PCM24k/public
events. Private setup requires the pinned engine/extension/contract revision,
fixed component identities and effective post-application configuration proof;
a session echo alone is insufficient. Interruption requiring history repair fails
closed pending Phase 3. Preserve owner, Origin, cookie, CSRF, replay, profile and
epoch checks. Candidate startup requires dedicated test DB/storage. Build and
real Persian/browser acceptance remain open; see [Phase 2 evidence](../evaluation/local-s2s/phase-02.md).
@@ -507,3 +507,14 @@ original identity, and missing/mismatched profile fields reject stream admission
No schema/migration or session status enum changes. A limited audio answer keeps
the session connected; incomplete tool/provider/context failures remain terminal.
Current-session limited transcripts/events are not durable voice history.
### Local S2S candidate profile (2026-10-15)
`live_sessions.provider` is already text without a provider enum constraint.
The guarded `local_s2s` candidate uses existing columns and a new private
`execution_profile.local_s2s` JSON object containing engine/patch/contract revision,
component identities and an effective configuration digest. Development-only and
close-on-interruption policy fields are frozen too. No schema migration is needed;
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).
@@ -499,3 +499,16 @@ Source order, text and locations are preserved; strict mode remains unchanged.
This mode does not guarantee complete legal context within each chunk.
117 focused regression checks passed, including malformed legal identifiers
and bounded splitting.
### Local S2S isolated development workflow (2026-10-15)
The guarded local provider reuses VoiceRuntime, trusted tool dispatch and canonical
search; no engine database authority or browser provider configuration is added.
Before startup reconciliation, the candidate requires a dedicated test database
and local-s2s-test storage. The adapter validates initialized engine component and
applied session configuration proof, preserves native input/response identities,
and closes when interruption requires unsupported history mutation. The separate
engine initializes one final-only STT pipeline through bounded HTTP component
clients. Startup probes require explicit paid authorization. No real engine/browser
acceptance is claimed from fixtures. See the [operator guide](../../services/local_s2s/README.md)
and [Phase 2 evidence](../evaluation/local-s2s/phase-02.md).