Severity
Low
Summary
Error handling across the data/ingestion path hides failures: print() is used instead of logging (and is dangerous in stdio-transport workers), causal-rule load failures fail silently and leave the engine empty, and several bare except: pass blocks swallow TF and timestamp parse errors — masking real bugs.
Findings
Project-rule reference
n/a
Severity
Low
Summary
Error handling across the data/ingestion path hides failures:
print()is used instead of logging (and is dangerous in stdio-transport workers), causal-rule load failures fail silently and leave the engine empty, and several bareexcept: passblocks swallow TF and timestamp parse errors — masking real bugs.Findings
print()used for error reporting instead of logging —backend/app/services/causal_rules.py:39,41andbackend/app/api/sessions.py:352—print(...)writes to stdout. In MCP workers stdout is the stdio JSON-RPC transport (seemcp_workers/_shared/health.py:50-52), so stray prints can corrupt the protocol; elsewhere it bypasses the logger entirely. Fix: replace withlogger.warning/logger.exception.Silent rule-load failure leaves the causal engine empty with only a
print—backend/app/services/causal_rules.py:29-41— Ifcausal.yamlis missing or malformed,self.rules = []with only aprint. The evaluator then produces zeroCAUSED/TRIGGEREDedges and RCA causal chains come back empty with no operator-visible error. Fix: log at ERROR and expose a health/status flag; consider failing ingestion loudly if the rules file is expected to exist.Bare
except Exception: passswallows TF and timestamp parse errors —backend/app/services/tf_parser.py:36-37,mcap_parser/parser.py:109-110,backend/app/services/parser.py:284-289,backend/app/services/causal_rules.py:16-22— TF parse failures are silently dropped (producing an incomplete frame graph with no warning), and the timestamp parsers swallow everything and return0.0, which also masks the long-bag day-format timestamp bug. Fix: catch narrowly and at minimumlogger.debug/ append a warning; let unexpected errors surface instead of being silently ignored.Project-rule reference
n/a