feat(k1): add USB networking, device management and acquisition recovery

This commit is contained in:
DCCONSTRUCTIONS
2026-11-04 00:42:57 +03:00
parent 14c3c7c2b6
commit 038337783f
78 changed files with 4612 additions and 384 deletions
+8 -1
View File
@@ -306,10 +306,13 @@ class FakeExecutor:
observed: Any,
*,
reconciled_active_observed: Any | None = None,
standby_work: Callable[[], None] | None = None,
) -> str | None:
self.records.append(f"wait:{event}")
deadline = time.monotonic() + 2.0
while not observed():
if standby_work is not None:
standby_work()
if (
reconciled_active_observed is not None
and reconciled_active_observed()
@@ -372,8 +375,12 @@ class FakeExecutor:
def maintain_post_stop_until_standby(self) -> None:
self.records.append("wait:device-standby")
def maintain_standby_until_next_acquisition(self, requested: Callable[[], bool]) -> None:
def maintain_standby_until_next_acquisition(
self, requested: Callable[[], bool], *, standby_work: Callable[[], None] | None = None,
) -> None:
while not requested():
if standby_work is not None:
standby_work()
if self.transport.state == "closed":
raise RuntimeError("test transport closed")
if not self.transport.proof_fresh: