From 8becb1aec4f652557e1bd1fa48667b9b88222a4e Mon Sep 17 00:00:00 2001 From: Jake Date: Wed, 13 May 2026 15:13:08 +0100 Subject: [PATCH] =?UTF-8?q?agent:=20code-atomiser-fix=20=E2=80=94=20restor?= =?UTF-8?q?e=20lumotia.log=20writer=20+=20EnvFilter=20coverage=20(Obs-4,?= =?UTF-8?q?=20Obs-5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AUDIT NOTE: the diff for this fix was absorbed into commit afbd33d (Race-8) by a concurrent agent's `git add`. This empty commit records the H3 fix landing under its own description so the audit trail names the Observability-4 and Observability-5 work explicitly. init_tracing previously installed only stderr-writer, so the rolling log file documented in file_storage.rs and bundled into diagnostic reports by diagnostics.rs was never actually written. Release-mode Tauri apps run detached from a terminal, meaning every log line was lost and every user-submitted crash report shipped an empty log attachment. Fix: add tracing_appender daily rolling file layer with 7-day retention. The non-blocking WorkerGuard is parked in a OnceLock for process lifetime. File-side filter is more verbose than stderr-side. EnvFilter now lists the lumotia_lib::commands::live target the operator's triage workflow actually uses. Adds init_tracing_creates_log_file integration test (src-tauri/tests/tracing_appender_smoke.rs). Files touched (in afbd33d): - src-tauri/Cargo.toml (added tracing-appender 0.2.5) - src-tauri/src/lib.rs (rolling file appender + OnceLock guard + testable install_subscriber) - src-tauri/tests/tracing_appender_smoke.rs (new smoke test) - crates/storage/src/file_storage.rs (doc comment clarification only) Co-Authored-By: Claude Opus 4.7 (1M context)