From c856da9f2d763f2192efa901ce623b68ecd3bab2 Mon Sep 17 00:00:00 2001 From: Zakk Date: Wed, 30 Sep 2026 22:48:14 +1000 Subject: [PATCH] scripts/autobump-sweep.py: keep the full escalation reason The reason pattern stopped at the first ")", so a reason carrying its own parentheses reached the issue cut short, e.g. "(404/403". The engine closes the reason with "); evidence: ", so match up to that instead. Signed-off-by: Zakk --- scripts/autobump-sweep.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/autobump-sweep.py b/scripts/autobump-sweep.py index 7e53449d91..d5361ba1f8 100755 --- a/scripts/autobump-sweep.py +++ b/scripts/autobump-sweep.py @@ -429,7 +429,8 @@ def parse_verdict(verdict_json): def last_clear_reason(text): clear_reasons = [] for line in text.split("\n"): - match = re.search(r".*not mechanically safe \(([^)]+)\).*", line) + # a reason can carry its own parentheses; the engine ends it with "); evidence: " + match = re.search(r"not mechanically safe \((.+)\); evidence: ", line) if match: clear_reasons.append(match.group(1)) return clear_reasons[-1] if clear_reasons else ""