From e9668855c2af6eb41a8be343b476bffb338e0424 Mon Sep 17 00:00:00 2001 From: elkoled Date: Fri, 29 May 2026 16:11:14 -0700 Subject: [PATCH] car_diff: show unique errors in a dropdown A broken carcontroller fails every segment with the same traceback, spamming the report. Print each unique error once inside a dropdown. Co-Authored-By: Claude Opus 4.8 (1M context) --- opendbc/car/tests/car_diff.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opendbc/car/tests/car_diff.py b/opendbc/car/tests/car_diff.py index b4424be8975..37d82314056 100755 --- a/opendbc/car/tests/car_diff.py +++ b/opendbc/car/tests/car_diff.py @@ -293,8 +293,11 @@ def main(platform: str | None = None, segments_per_platform: int = 10, update_re icon = "⚠️" if with_diffs else "✅" print(f"\n{icon} {len(with_diffs)} changed, {n_passed} passed, {len(errors)} errors") - for plat, seg, err in errors: - print(f"\nERROR {plat} - {seg}: {err}") + if errors: + print("
Show errors\n\n```") + for err in dict.fromkeys(err for _, _, err in errors): + print(f"\n{err}") + print("```\n
") if with_diffs: print("
Show changes\n\n```")