Стабилизация переключения Bridge и Quick Connect

Безопасно восстанавливает управляющее подключение и локальные checkpoint без повторных команд сканеру.

Добавляет PCAP/Bridge guardrails и регрессионные проверки одношагового переподключения.

Известный дефект: после второго подключения интерфейс не присоединяется к новой генерации preview правой камеры. В живой Quick Connect-сессии STOP был принят, но READY не подтвердился до таймаута; автоматический повтор STOP запрещён.
This commit is contained in:
DCCONSTRUCTIONS
2026-08-23 00:15:28 +03:00
parent 1001a31638
commit 0752e5c6bf
12 changed files with 3481 additions and 234 deletions
File diff suppressed because it is too large Load Diff
@@ -1134,6 +1134,44 @@ def test_cease_prepared_resolved_start_standby_rejects_inexact_restart_proofs(
replace(status, mqtt_retained=True)
def test_cease_prepared_resolved_start_standby_accepts_fresh_same_runtime_boundary(
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""A new verified control generation is sufficient without a process restart."""
prepared_binding = _binding()
store = _store(tmp_path, monkeypatch)
_prepare(store, prepared_binding)
kwargs = _cease_prepared_resolved_start_standby_kwargs(
prepared_binding,
terminal_state="ready",
)
status = kwargs["cessation_status_proof"]
physical = kwargs["cessation_physical_proof"]
same_runtime_binding = replace(
status.binding,
runtime_instance_id=prepared_binding.runtime_instance_id,
producer_generation=prepared_binding.producer_generation + 1,
)
kwargs["cessation_status_proof"] = replace(
status,
binding=same_runtime_binding,
)
kwargs["cessation_physical_proof"] = replace(
physical,
binding=same_runtime_binding,
)
ceased = store.cease_prepared_resolved_start_standby(**kwargs)
assert ceased.state == "ceased"
assert ceased.current_binding == same_runtime_binding
assert ceased.current_evidence_session_id == "evidence-restarted"
assert ceased.activated_at_utc is None
assert ceased.first_published_pcl_proof is None
@pytest.mark.parametrize("terminal_state", ("ready", "scan_over"))
def test_cease_active_reconciled_standby_atomically_opens_and_closes_gap(
tmp_path: Path,