feat(2): Q4.2 mumble — parity port (health/protocol-handshake/web) + 2 specific + P4 sqlite
- functional/_mumble_proto.py: stdlib Mumble TLS protocol client (adapted from corpus mumble_connect.py) - 3 parity ports: test_tcp_health, test_protocol_handshake (channel presence+ServerSync), test_web_client - 2 NEW recipe-specific (P3): welcome-text + max-users config round-trips over the protocol - P4: ops.py + test_backup/test_restore seed ci_marker in /data/mumble-server.sqlite (recipe's own backupbot DB), busy_timeout for live-server locks - test_install overlay: voice server listening on 64738 (beyond web-sidecar readiness) - recipe_meta: COMPOSE_FILE=compose.yml:mumbleweb:host-ports; WELCOME_TEXT/USERS markers - PARITY.md mapping table Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""mumble — RESTORE overlay (Phase 1e HC3 / Phase 2 P4): data-integrity, assertion-only + additive.
|
||||
|
||||
ops.pre_restore dropped the ci_marker table (diverge from the backup); the orchestrator restored
|
||||
once (generic tier asserted healthy/serving; the recipe's restore.post-hook `mv`s the backed-up
|
||||
sqlite back over /data/mumble-server.sqlite). This overlay ADDS: the restored DB carries the
|
||||
pre-mutation 'original' marker — proving the seeded data actually survived backup→restore, not just
|
||||
that the service came back up. Read via a fresh sqlite3 CLI in the app container (reads the restored
|
||||
on-disk file).
|
||||
"""
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..", "runner"))
|
||||
from harness import lifecycle # noqa: E402
|
||||
|
||||
DB = "/data/mumble-server.sqlite"
|
||||
|
||||
|
||||
def _sqlite(domain, sql):
|
||||
cmd = f'sqlite3 {DB} "PRAGMA busy_timeout=20000; {sql}"'
|
||||
return lifecycle.exec_in_app(domain, ["sh", "-c", cmd], service="app").strip()
|
||||
|
||||
|
||||
def test_restore_returns_state(live_app):
|
||||
assert _sqlite(live_app, "SELECT v FROM ci_marker;") == "original", (
|
||||
"restore did not return the pre-mutation mumble sqlite marker (data-integrity failure)"
|
||||
)
|
||||
Reference in New Issue
Block a user