diff --git a/scripts/ops/hermes_triage_monitor.py b/scripts/ops/hermes_triage_monitor.py index 495e61b9a..4f0b3881a 100755 --- a/scripts/ops/hermes_triage_monitor.py +++ b/scripts/ops/hermes_triage_monitor.py @@ -96,6 +96,7 @@ class Monitor: self.done: dict[str, str] = {} self.incident = "" self.last_line = "" + self.summarised = False def mark(self, key: str, evidence: str) -> None: """Record a stage as reached and print it once, with its evidence.""" @@ -123,6 +124,7 @@ class Monitor: if incident and incident != self.incident: self.incident = incident self.done.clear() + self.summarised = False print(f"\n{BOLD}{YELLOW}{stamp()} ── incident {incident} ──{RESET}") sys.stdout.flush() @@ -167,10 +169,13 @@ def main() -> None: f"Ariadne refused: {state.get('reason', 'human_required')} — no action taken", ) monitor.mark("response", "escalated to a human; issue filed in the service repository") - if status == "healthy" and state.get("resolved"): + if status == "healthy" and state.get("resolved") and not monitor.summarised: monitor.mark("verify", "rebuild finished green") monitor.mark("outputs", f"resolved: {', '.join(state['resolved'])}") monitor.checklist() + # The resolving tick stays newest until another incident opens, so + # the completed checklist is printed once rather than every poll. + monitor.summarised = True line = f"{status}|{incident}|{fixture_state()}" if line != monitor.last_line: