Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

docs(logging): say why four quiet handlers stay quiet

rubenluetke10-beepe08b3c524aa8
diff --git a/jarvis/awareness/watchers/window.py b/jarvis/awareness/watchers/window.py
index 6646a31a59..604aa3f92a 100644
--- a/jarvis/awareness/watchers/window.py
+++ b/jarvis/awareness/watchers/window.py
@@ -299,6 +299,8 @@ class WindowFocusWatcher:
try:
self._queue.get_nowait()
except asyncio.QueueEmpty:
+ # Not a failure: an empty queue is exactly the drained state
+ # this loop exists to reach.
break
self._last_hwnd = 0
self._last_emit_ns = 0
diff --git a/jarvis/ui/desktop_app.py b/jarvis/ui/desktop_app.py
index d59a50760c..61fc880fbd 100644
--- a/jarvis/ui/desktop_app.py
+++ b/jarvis/ui/desktop_app.py
@@ -214,6 +214,9 @@ class _AsyncLogWriter:
try:
self._queue.put_nowait(str(message))
except queue.Full:
+ # Silence is the point: a log sink that blocks or raises would stall
+ # whichever thread emitted the record. The drop is not lost — the
+ # count surfaces as a WARNING line in the next emitted batch.
with self._drop_lock:
self._dropped += 1
@@ -235,6 +238,8 @@ class _AsyncLogWriter:
try:
item = self._queue.get_nowait()
except queue.Empty:
+ # Not a failure: an empty queue simply ends this batch and
+ # the outer loop blocks on the next record.
break
if item is _LOG_STOP:
stopping = True
@@ -317,6 +322,9 @@ class _AsyncLogWriter:
reverse=True,
)
except OSError:
+ # Listing the log directory failed (removed, or locked mid-scan on
+ # Windows). Pruning is housekeeping — skipping one round keeps a
+ # few extra rotated files, which beats raising inside the writer.
return
for stale in rotated[self._retention :]:
with suppress(OSError):