From d9f2820b4f4cafbd7e0428f0e735f768f3e9da35 Mon Sep 17 00:00:00 2001 From: agessaman Date: Wed, 7 Jan 2026 20:28:29 -0800 Subject: [PATCH] fix: Clean up critical error logging in NixOS test for meshcore-bot - Refactored the critical error handling logic to strip whitespace from error messages before checking their length, ensuring accurate logging of critical issues during testing. --- nix/nixos-test.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nix/nixos-test.nix b/nix/nixos-test.nix index 355d32e..d47b0e2 100644 --- a/nix/nixos-test.nix +++ b/nix/nixos-test.nix @@ -89,8 +89,9 @@ print("⚠ Database file not found (bot may have failed before DB initialization)") # Check if there are critical errors (import failures, etc.) critical_errors = machine.succeed("journalctl -u meshcore-bot.service | grep -iE 'import.*error|module.*not found|no module named|traceback' | head -3 || echo 'none'") - if "none" not in critical_errors and len(critical_errors.strip()) > 10: - print(f"⚠ Critical errors found: {critical_errors[:150]}") + critical_errors_clean = critical_errors.strip() + if "none" not in critical_errors and len(critical_errors_clean) > 10: + print(f"⚠ Critical errors found: {critical_errors_clean[:150]}") else: print("✓ No critical import/initialization errors (connection failures are expected)")