feat(voice): implement local S2S retained history and provider selection
Add pinned CPU engine dependencies, retained interrupted-response history, provider admission, offline evaluation and isolated browser tooling. Record Phase 2 acceptance and Phase 3/4 preparation, bounded paid-test accounting and interruption incident findings. Human interruption acceptance, paired OpenAI evaluation and rollback remain pending.
This commit is contained in:
@@ -0,0 +1,373 @@
|
||||
{
|
||||
"date": "2026-10-16",
|
||||
"phase": 2,
|
||||
"status": "accepted",
|
||||
"scope": "Isolated development-only normal Persian browser voice; no operational promotion or interruption continuation",
|
||||
"tests": {
|
||||
"local_adapter": {
|
||||
"passed": 125,
|
||||
"seconds": 13.8,
|
||||
"log_sha256": "79f7c13cb6a0850950823fe820c84e19642feb03b223dab237d62784938bfb7a"
|
||||
},
|
||||
"openai_preservation": {
|
||||
"passed": 258,
|
||||
"seconds": 61.48,
|
||||
"log_sha256": "748bc08057c555bb24f90e76d21d453ae485a9ea835db317f580d6f1a63ee423"
|
||||
},
|
||||
"postgres": {
|
||||
"passed": 63,
|
||||
"seconds": 116.02,
|
||||
"log_sha256": "147e57d13ba6f5ec5d01ae9b0524de26045846b4d2bce3d6e8096677f08c1edf"
|
||||
},
|
||||
"citation_regression": {
|
||||
"passed": 6,
|
||||
"seconds": 17.0,
|
||||
"log_sha256": "990e4e854569f33f2fff8e307f416cac5e3cfbad4760fe7a0613e7598f4bbe9b"
|
||||
},
|
||||
"runner_smoke": {
|
||||
"passed": 2,
|
||||
"seconds": 3.36,
|
||||
"log_sha256": "7164a2c91721a671bbb45ff5dcfae252347871d3e10f82f5f9e1dad2ad9fc2df"
|
||||
}
|
||||
},
|
||||
"unique_primary_tests_passed": 446,
|
||||
"budget_regressions": "browser, native transport and native runner scripts passed",
|
||||
"real_browser": {
|
||||
"session_id": "4445c984-c56b-4269-a7a2-49556c0902d2",
|
||||
"user_reported_input": "سلام چطوریم",
|
||||
"user_reported_reply": "سلام ممنونم. شما چطورید چطور میتونم در زمینه امور شرکت شهرکهای صنعتی اصفهان کمکتون کنم",
|
||||
"terminal_completed": 1,
|
||||
"terminal_limited": 0,
|
||||
"terminal_cancelled": 0,
|
||||
"generated_bytes": 350208,
|
||||
"sent_bytes": 350208,
|
||||
"played_ms": 7296,
|
||||
"final_backlog_bytes": 0,
|
||||
"persisted_close": {
|
||||
"status": "closed",
|
||||
"close_reason": "user_requested",
|
||||
"error_code": null
|
||||
},
|
||||
"evidence": "Actual API diagnostics and read-only isolated live_sessions query, matched to user-reported browser result.",
|
||||
"asr_ground_truth_accuracy": "not_scored",
|
||||
"phase_2_status": "accepted; final invoice accounting remains a disclosed nonblocking follow-up"
|
||||
},
|
||||
"cost": {
|
||||
"method": "read_only_GET_no_inference",
|
||||
"ledgers": {
|
||||
"native": [
|
||||
{
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792161394-vJMHFfdwTmHBDSBW48aH",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.004",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-stt-1792161394-vJMHFfdwTmHBDSBW48aH",
|
||||
"total_cost": 2.5e-05,
|
||||
"usage": 2.5e-05,
|
||||
"tokens_prompt": null,
|
||||
"tokens_completion": null,
|
||||
"native_tokens_prompt": null,
|
||||
"native_tokens_completion": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792161398-BRPNxd79tYYoQZdg43Ce",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.01",
|
||||
"lookup_http_status": 404
|
||||
},
|
||||
{
|
||||
"stage": "speech",
|
||||
"generation_id": "gen-tts-1792161399-3YAyVlL5MSSKbqaZWnIz",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.205",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-tts-1792161399-3YAyVlL5MSSKbqaZWnIz",
|
||||
"total_cost": 0.000175,
|
||||
"usage": 0.000175,
|
||||
"tokens_prompt": 2,
|
||||
"tokens_completion": 29,
|
||||
"native_tokens_prompt": 2,
|
||||
"native_tokens_completion": 29
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792161402-nvlLMzXrx1QdjtVT6Nuu",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.004",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-stt-1792161402-nvlLMzXrx1QdjtVT6Nuu",
|
||||
"total_cost": 0.000308333,
|
||||
"usage": 0.000308333,
|
||||
"tokens_prompt": null,
|
||||
"tokens_completion": null,
|
||||
"native_tokens_prompt": null,
|
||||
"native_tokens_completion": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792161403-FNP9pxaRHEq63J0h1qbo",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.01",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-1792161403-FNP9pxaRHEq63J0h1qbo",
|
||||
"total_cost": 0.000248,
|
||||
"usage": 0.000248,
|
||||
"tokens_prompt": 874,
|
||||
"tokens_completion": 22,
|
||||
"native_tokens_prompt": 584,
|
||||
"native_tokens_completion": 9
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "speech",
|
||||
"generation_id": "gen-tts-1792161415-n472pZcpHCoMng79OO5S",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.205",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-tts-1792161415-n472pZcpHCoMng79OO5S",
|
||||
"total_cost": 0.0003815,
|
||||
"usage": 0.0003815,
|
||||
"tokens_prompt": 6,
|
||||
"tokens_completion": 63,
|
||||
"native_tokens_prompt": 7,
|
||||
"native_tokens_completion": 63
|
||||
}
|
||||
}
|
||||
],
|
||||
"browser": [
|
||||
{
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792162309-6uGLT2gkPHgtKOWXxMTe",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.004",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-stt-1792162309-6uGLT2gkPHgtKOWXxMTe",
|
||||
"total_cost": 0.000308333,
|
||||
"usage": 0.000308333,
|
||||
"tokens_prompt": null,
|
||||
"tokens_completion": null,
|
||||
"native_tokens_prompt": null,
|
||||
"native_tokens_completion": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792162310-PefNVi4EfXsUHh17bpno",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.02",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-1792162310-PefNVi4EfXsUHh17bpno",
|
||||
"total_cost": 2.28e-05,
|
||||
"usage": 2.28e-05,
|
||||
"tokens_prompt": 9,
|
||||
"tokens_completion": 9,
|
||||
"native_tokens_prompt": 17,
|
||||
"native_tokens_completion": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "speech",
|
||||
"generation_id": "gen-tts-1792162311-EvL82g6AOq2uUg0tV49F",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.035",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-tts-1792162311-EvL82g6AOq2uUg0tV49F",
|
||||
"total_cost": 0.0001575,
|
||||
"usage": 0.0001575,
|
||||
"tokens_prompt": 2,
|
||||
"tokens_completion": 26,
|
||||
"native_tokens_prompt": 3,
|
||||
"native_tokens_completion": 26
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792162562-uzf1ExC8XXA2ojtKmzHQ",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.004",
|
||||
"lookup_http_status": 404
|
||||
},
|
||||
{
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792162563-v2xXCeyWczaO6N6sDGYO",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.02",
|
||||
"lookup_http_status": 200,
|
||||
"billing": {
|
||||
"id": "gen-1792162563-v2xXCeyWczaO6N6sDGYO",
|
||||
"total_cost": 0.0007596,
|
||||
"usage": 0.0007596,
|
||||
"tokens_prompt": 2570,
|
||||
"tokens_completion": 27,
|
||||
"native_tokens_prompt": 1839,
|
||||
"native_tokens_completion": 15
|
||||
}
|
||||
},
|
||||
{
|
||||
"stage": "speech",
|
||||
"generation_id": null,
|
||||
"status": "failed",
|
||||
"reserved_usd": "0.035"
|
||||
}
|
||||
],
|
||||
"repair": [
|
||||
{
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792164932-yowwJIs8FCVLhZsAPZCS",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.004",
|
||||
"lookup_http_status": 404
|
||||
},
|
||||
{
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792164934-Xzi45DRGAMNPQMKF6PtM",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.02",
|
||||
"lookup_http_status": 404
|
||||
},
|
||||
{
|
||||
"stage": "speech",
|
||||
"generation_id": "gen-tts-1792164935-lFnqxFlbFB9oZtwUw99p",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.035",
|
||||
"lookup_http_status": 404
|
||||
},
|
||||
{
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792165118-S7omIdaVRJTE9KadsXLE",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.004",
|
||||
"lookup_http_status": 404
|
||||
},
|
||||
{
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792165121-GmxoMAiyn8570Tg4mqfE",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.02",
|
||||
"lookup_http_status": 404
|
||||
},
|
||||
{
|
||||
"stage": "speech",
|
||||
"generation_id": "gen-tts-1792165122-xAsR1xzOCcq0dqYyHJkh",
|
||||
"status": "headers_received",
|
||||
"reserved_usd": "0.035",
|
||||
"lookup_http_status": 404
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_lookup_status": 200,
|
||||
"key_usage": {
|
||||
"usage": 0.136937669,
|
||||
"usage_daily": 0.003504399,
|
||||
"limit": 5,
|
||||
"limit_remaining": 4.863062331
|
||||
},
|
||||
"reconciliation": {
|
||||
"confirmed_cost_usd": "0.003504399",
|
||||
"unknown_reservations_usd": "0.417",
|
||||
"conservative_exposure_usd": "0.420504399",
|
||||
"unknown_attempts_including_initial_failed_wav": 10,
|
||||
"unresolved": [
|
||||
{
|
||||
"ledger": "native",
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792161398-BRPNxd79tYYoQZdg43Ce"
|
||||
},
|
||||
{
|
||||
"ledger": "browser",
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792162562-uzf1ExC8XXA2ojtKmzHQ"
|
||||
},
|
||||
{
|
||||
"ledger": "browser",
|
||||
"stage": "speech",
|
||||
"generation_id": null
|
||||
},
|
||||
{
|
||||
"ledger": "repair",
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792164932-yowwJIs8FCVLhZsAPZCS"
|
||||
},
|
||||
{
|
||||
"ledger": "repair",
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792164934-Xzi45DRGAMNPQMKF6PtM"
|
||||
},
|
||||
{
|
||||
"ledger": "repair",
|
||||
"stage": "speech",
|
||||
"generation_id": "gen-tts-1792164935-lFnqxFlbFB9oZtwUw99p"
|
||||
},
|
||||
{
|
||||
"ledger": "repair",
|
||||
"stage": "transcriptions",
|
||||
"generation_id": "gen-stt-1792165118-S7omIdaVRJTE9KadsXLE"
|
||||
},
|
||||
{
|
||||
"ledger": "repair",
|
||||
"stage": "completions",
|
||||
"generation_id": "gen-1792165121-GmxoMAiyn8570Tg4mqfE"
|
||||
},
|
||||
{
|
||||
"ledger": "repair",
|
||||
"stage": "speech",
|
||||
"generation_id": "gen-tts-1792165122-xAsR1xzOCcq0dqYyHJkh"
|
||||
}
|
||||
],
|
||||
"ledger_files_unchanged": true,
|
||||
"paid_tests_restarted": false
|
||||
}
|
||||
},
|
||||
"paid_engine_shutdown": {
|
||||
"repair": true,
|
||||
"stage": "stopped",
|
||||
"minimum_host_available_bytes": 4494655488,
|
||||
"startup_seconds": 50.411,
|
||||
"elapsed_seconds": 894.304,
|
||||
"reason": "operator_stop"
|
||||
},
|
||||
"new_paid_inference_this_completion": 0,
|
||||
"remaining_phase2_acceptance_gates": [],
|
||||
"nonblocking_followups": [
|
||||
"Final per-request invoice lookups remain unresolved; all unknown attempts retain full reservations.",
|
||||
"Phase 3 interruption/history/shared RAG and declared-source integration remain not started.",
|
||||
"Phase 4 quality/latency/cost benchmarking and controlled switch/rollback remain not started.",
|
||||
"Repository-wide ordinary suite not rerun; earlier unrelated cancellation-diagnostic failures are retained in historical reports."
|
||||
],
|
||||
"historical_initial_results": {
|
||||
"disk_backed_postgres": "11 passed then deliberately interrupted at 113.09s; test-owned database removed",
|
||||
"old_citation_fixture_postgres": "57 passed, 6 failed in 212.44s; all 6 source cases subsequently corrected and passed",
|
||||
"old_transcript_fixture_preservation": "257 passed, 1 failed in 61.18s; deterministic first-delivery synchronization then 258 passed"
|
||||
},
|
||||
"source_sha256": {
|
||||
"services/local_s2s/engine.py": "b6c6f938109efed30e438b87c361a90aae5ec5d0ff9db47d8e92fa8c1957e003",
|
||||
"tests/integration/test_phase2_postgres.py": "4ddc3c170e7a3d3c3813df4c9962ad05b1e8e481764bcf2ace52bbb6b60e09e3",
|
||||
"tests/unit/test_openai_speech_configuration.py": "61f8b6f1c9c71ffa4974c09a9d019d37edcffb582b2afd71cf9a81b94c129c08",
|
||||
"docs/evaluation/local-s2s/phase-02-final-postgres.py": "ebf0ea3df080f072d96b20b40b1e01147f94dd9fd32fdc4c73f020af7340ff38"
|
||||
},
|
||||
"final_resource_verification": {
|
||||
"paid_engine": {
|
||||
"status": "exited",
|
||||
"exit_code": 0,
|
||||
"oom_killed": false
|
||||
},
|
||||
"owned_disposable_test_containers_remaining": 0,
|
||||
"owned_disk_test_databases_remaining": 0,
|
||||
"candidate_database": "running and retained",
|
||||
"operational_database_container": "same preexisting exited state; not started or modified"
|
||||
},
|
||||
"final_document_checks": "JSON/counts/source hashes/Python syntax/local links/provider-secret scan/git diff --check passed"
|
||||
}
|
||||
Reference in New Issue
Block a user