Diagnostics: forward upstream events + errors to device as 'debug' envelopes

Coolify container logs aren't accessible from the dev sandbox, so the only
log surface we can read is the Pi journal. The relay now forwards every
upstream event type to the device as {type:'debug', message:'relay evt=<T>'}
and every mid-session upstream error event as {type:'error',code:'upstream_<C>'}.

The client's Session.dispatch handles 'debug' as an INFO log line. Updates
the wake-flow integration test's receive-loop to skip over the new debug
envelopes via a ReceiveUntil helper.
This commit is contained in:
2026-06-12 06:59:14 +00:00
parent 8bb0ce51b1
commit a42038b825
3 changed files with 49 additions and 3 deletions
+2
View File
@@ -125,6 +125,8 @@ class Session:
)
elif t == "config_updated":
_log.info("config_updated: %s", env.get("config"))
elif t == "debug":
_log.info("backend %s", env.get("message"))
else:
_log.info("unhandled envelope type=%s", t)