pyln-testing: catch special CI string so we can have non-BROKEN CI warnings.
What changed, and why it matters
This commit is a testing-only change. It adds a new log prefix 'That's weird: ' for unusual but non-fatal real-world events, and updates the test harness to treat those lines similarly to **BROKEN** logs during CI. There is no security-relevant code change and no vulnerability is present or fixed.
No security action required; review as normal testing infrastructure change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch defines CI_UNEXPECTED as the string ‘That’s weird: ’ in common/status_levels.h and modifies contrib/pyln-testing/pyln/testing/fixtures.py so that checkBroken() flags lines containing either ‘BROKEN’ or the new CI_UNEXPECTED prefix. This is purely a test/CI quality-of-life change to allow distinguishing expected CI anomalies from true broken-log assertions.
Changed components
common/status_levels.hcontrib/pyln-testing/pyln/testing/fixtures.pyInspect captured patch +4 / −1
diff --git a/common/status_levels.h b/common/status_levels.h
index 79f7bc57..baa04ebb 100644
--- a/common/status_levels.h
+++ b/common/status_levels.h
@@ -20,6 +20,9 @@ enum log_level {
};
#define LOG_LEVEL_MAX LOG_BROKEN
+/* Things that can happen in real life, but we don't expect under CI. */
+#define CI_UNEXPECTED "That's weird: "
+
const char *log_level_name(enum log_level level);
bool log_level_parse(const char *levelstr, size_t len,
enum log_level *level);
diff --git a/contrib/pyln-testing/pyln/testing/fixtures.py b/contrib/pyln-testing/pyln/testing/fixtures.py
index 7bc45a25..694189bc 100644
--- a/contrib/pyln-testing/pyln/testing/fixtures.py
+++ b/contrib/pyln-testing/pyln/testing/fixtures.py
@@ -612,7 +612,7 @@ def checkBadGossip(node):
def checkBroken(node):
node.daemon.logs_catchup()
- broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l]
+ broken_lines = [l for l in node.daemon.logs if '**BROKEN**' in l or "That's weird: " in l]
if node.broken_log:
ex = re.compile(node.broken_log)
broken_lines = [l for l in broken_lines if not ex.search(l)]
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.