HEL-879 rework: fix the four manager-review edges - (1) dual-port launcher owns the app lifecycle exactly once: uvicorn listeners run with lifespan=off, either listener ending stops the other BEFORE the shared store closes, cancellation cleans up listeners first, and create_app's lifespan gains a fail-closed double-entry guard (the old shape silently re-initialized Store/epoch/life/chat_lock on the second entry); (2) room ownership survives delete failures: end_session keeps the session in a bounded persisted cleanup ledger until the remote delete lands (retry/idempotent, LiveKit 404 = already gone = settled), expiry moves rooms into that ledger instead of silently dropping them (the manager measured zero DELETE attempts on expired ends), graceful shutdown does not hang up live calls, restart compensates only this instance's own recorded rooms bounded by attempts/TTL+grace with abandonment recorded, and the router answers 503 (not 404) while a room is still owned so the browser keeps its owed DELETE; (3) TurnLedger binds each speech handle to its own generation stream explicitly (oldest pending handle gets the stream the SDK starts; a newer speech retires an older generation-less handle) - a handle without a generation can no longer steal the next turn's stream/receipt, the worker discards interrupted/failed bindings fail-closed before consuming; (4) release snapshot v3: verify requires three-way count equality (manifest source = manifest snapshot = restored actual; rows_match is an extra constraint, never an OR bypass), the rollback drill actually restores by source path into a persistent isolated tree and opens the restored DBs there, same-basename DBs get collision-free archive names, duplicate sources are refused; new regression file tests/test_voice_rework_hel879.py 14/14 reproducing every edge first, full pytest 338/338
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
co-authored by
multica-agent
parent
7f0a739213
commit
78a5cfd8d7
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ok": true,
|
||||
"code_commit": "7f66015ac854b7f513a35a42b680a143058561bb",
|
||||
"tool_version": 2,
|
||||
"code_commit": "7f0a739213e1cd8010d6e7118827884e973ea7c9",
|
||||
"tool_version": 3,
|
||||
"checks": [
|
||||
{
|
||||
"name": "naive_online_copy_loses_wal_reproduced",
|
||||
@@ -21,32 +21,47 @@
|
||||
{
|
||||
"name": "fix1b_row_mismatch_fails_no_archive",
|
||||
"ok": true,
|
||||
"detail": "error=源/快照行数不一致,不打包:/tmp/multica-task-29494715/hel879-snapshot-sel artifacts=[]"
|
||||
"detail": "error=源/快照行数不一致,不打包:/tmp/multica-task-3939683741/hel879-snapshot-s artifacts=[]"
|
||||
},
|
||||
{
|
||||
"name": "fix_verify_rejects_rows_match_false_legacy_package",
|
||||
"ok": true,
|
||||
"detail": "ok=False checks=[{'db': 'databases/companion.db', 'sha256_ok': True, 'rows_ok': False, 'counts': {'companion': 1, 'chat_message': 1, 'events': 0}, 'source_counts': {'companion': 1, 'chat_message': 1, 'events': 1}, 'rows_match_recorded': False, 'rejected_legacy_package': True}]"
|
||||
"detail": "ok=False checks=[{'db': 'databases/companion.db', 'restored': '/tmp/multica-task-3939683741/hel879-snapshot-selftest-jc481l71/verify-restore-legacy-pkg.tar-20261027-035938/by-source/tmp__multica-task-3939683741__hel879-snapshot-selftest-jc481l71__instance__companion.db', 'sha256_ok': True, 'rows_ok': False, 'counts': {'companion': 1, 'chat_message': 1, 'events': 1}, 'source_counts': {'companion': 1, 'chat_message': 1, 'events': 1}, 'snapshot_counts': {'companion': 1, 'chat_message': 1, 'events': 0}, 'rows_match_recorded': False, 'rejected_legacy_package': True}]"
|
||||
},
|
||||
{
|
||||
"name": "fix2_online_mode_refuses_dir_with_sqlite",
|
||||
"ok": true,
|
||||
"detail": "在线模式只允许显式单库 backup API(--db);--file /tmp/multica-task-29494715/hel879-snapshot-selftest-pxbo6xw1/instance/history_root 内"
|
||||
"detail": "在线模式只允许显式单库 backup API(--db);--file /tmp/multica-task-3939683741/hel879-snapshot-selftest-jc481l71/instance/history_root"
|
||||
},
|
||||
{
|
||||
"name": "fix2_stop_mode_embeds_sqlite_via_consistency_path",
|
||||
"ok": true,
|
||||
"detail": "embedded=['/tmp/multica-task-29494715/hel879-snapshot-selftest-pxbo6xw1/instance/history_root/mem0_public_history.db']"
|
||||
"detail": "embedded=['/tmp/multica-task-3939683741/hel879-snapshot-selftest-jc481l71/instance/history_root/mem0_public_history.db']"
|
||||
},
|
||||
{
|
||||
"name": "fix3_verify_maps_source_paths_and_passes",
|
||||
"ok": true,
|
||||
"detail": "ok=True commit=7f66015ac854b7f513a35a42b680a143058561bb plan_entries=4"
|
||||
"detail": "ok=True commit=7f0a739213e1cd8010d6e7118827884e973ea7c9 plan_entries=4"
|
||||
},
|
||||
{
|
||||
"name": "backup_api_snapshot_complete",
|
||||
"ok": true,
|
||||
"detail": "{\"companion\": 1, \"chat_message\": 1, \"events\": 1}"
|
||||
},
|
||||
{
|
||||
"name": "fix_rows_match_true_cannot_bypass_source_counts",
|
||||
"ok": true,
|
||||
"detail": "ok=False counts={'companion': 1, 'chat_message': 1, 'events': 1} source={'companion': 1, 'chat_message': 1, 'events': 2}"
|
||||
},
|
||||
{
|
||||
"name": "fix_same_basename_no_overwrite_and_duplicate_refused",
|
||||
"ok": true,
|
||||
"detail": "snap_names=['ledger.db', 'ledger__0e56d727.db'] verify_ok=True restored_rows=['first', 'second'] dup_refused=yes"
|
||||
},
|
||||
{
|
||||
"name": "restore_drill_paths_persist",
|
||||
"ok": true,
|
||||
"detail": "restore_root=/tmp/multica-task-3939683741/hel879-snapshot-selftest-jc481l71/same-restore"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user