From 293b9bf23979c545a81153484234b1a6dcadb66c Mon Sep 17 00:00:00 2001 From: "anthony.wen" Date: Thu, 26 Mar 2026 14:40:11 -0400 Subject: [PATCH] Delay categorized watcher posts until host summary is available - keep categorized grouped sub-runs in RUNNING state when only the grouped check-xml-files.ts artifact has appeared and the parent log has not yet exposed the real host summary - prevent blank Mattermost grouped-run posts with empty host tables, zero counts, and zero/invalid timing caused by posting too early - require the categorized watcher to wait for host-level grouped summary data before treating the grouped run as complete --- atvm/watcher-service/atvm_run_watcher.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/atvm/watcher-service/atvm_run_watcher.py b/atvm/watcher-service/atvm_run_watcher.py index 4ffe5c6..cef7bb4 100644 --- a/atvm/watcher-service/atvm_run_watcher.py +++ b/atvm/watcher-service/atvm_run_watcher.py @@ -753,6 +753,8 @@ def discover_categorized_subruns( state = "RUNNING" if cancelled: state = "CANCELLED" + elif check_ts and not host_results and parent_active: + state = "RUNNING" elif check_ts or raw_display_name != current_subrun_build or not parent_active: state = "FAILED" if any(result.failures for result in host_results.values()) else "COMPLETED" display_name = corrected_categorized_display_name(raw_display_name, list(host_results)) @@ -761,6 +763,8 @@ def discover_categorized_subruns( notes.append("Final `check-xml-files.ts` validation passed.") if summary and host_results: notes.append("Host result details were derived from the parent categorized run log summary.") + elif check_ts and not host_results and parent_active: + notes.append("Grouped reporter XML arrived before the parent run log exposed the final host summary; waiting to post until host details are available.") if display_name != raw_display_name: notes.append(f"Child build id was reported as `{raw_display_name}`, but the actual grouped run was inferred from host execution as `{display_name}`.") if cancelled: