Ver Fonte

fix(m11_smoke): include publish_ok column in summary table

The F2 publish-rate assertion (assert_nats_publish_rate_near) was
already wired into the per-minute soak log, but the final summary
table at the end of the smoke was missing the publish_ok column.
This adds it so the saved log file shows whether the NATS publish
path tracked the receive path throughout the run.

Without this, an operator reading a saved smoke log would see the
'rate' column green and assume the system is healthy, but would
have to do PromQL gymnastics to verify the publish path was
actually OK. Now it's right there in the table.
Luis Rosales há 1 mês atrás
pai
commit
dc71b38
1 ficheiros alterados com 8 adições e 3 exclusões
  1. 8 3
      scripts/m11_smoke.py

+ 8 - 3
scripts/m11_smoke.py

@@ -276,10 +276,15 @@ def print_summary(samples: list[dict], dlq_final: int) -> None:
     print(f"p99 thresh: {P99_THRESHOLD_MS}ms")
     print()
     if samples:
-        print(f"{'Time':>6}  {'Rate/s':>8}  {'p99(ms)':>8}  {'DLQ':>4}  {'Streams':>7}")
-        print("-" * 45)
+        # F2: include publish_ok column so the summary shows whether the
+        # NATS publish path tracked the receive path throughout. A divergence
+        # here is the silent-failure mode the M11 NATS investigation exposed.
+        print(f"{'Time':>6}  {'Rate/s':>8}  {'PublishOK/s':>11}  {'p99(ms)':>8}  {'DLQ':>4}  {'Streams':>7}")
+        print("-" * 60)
         for s in samples:
-            print(f"{s['elapsed_min']:>5}m  {s['rate']:>8.0f}  "
+            pub = s.get("publish_ok")
+            pub_str = f"{pub:>11.0f}" if pub is not None else f"{'n/a':>11}"
+            print(f"{s['elapsed_min']:>5}m  {s['rate']:>8.0f}  {pub_str}  "
                   f"{s['p99_ms']:>8.1f}  {s['dlq']:>4}  {s['streams']:>7}")
     print()
     print(f"Final DLQ count: {dlq_final} (expected 0)")