From 1f149bda32b0ab92a9f140d9fff6e7b7a1267637 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Thu, 23 Jul 2026 13:38:25 +0000 Subject: [PATCH] Run the convergence-gate unit tests in both CI runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit wait_until_connected decides whether every static suite proceeds or gives up, so a regression in it turns those suites' verdicts into noise. Its unit tests existed and were invoked by nothing. Wire them into ci-local.sh beside the parity and log-string checks, above the mode branches so --only and --test-only are gated too, and add the matching step to the ci-parity job in ci.yml. Putting them in one runner only would create exactly the drift check-ci-parity.sh exists to catch, and neither placement is visible to that checker since this is not a matrix suite. Verified by breaking what it guards rather than by observing green: setting wait_until_connected's default near-converged slack to 0 fails case4, records FAIL wait-converge, and exits the sweep 1. Restored after. They pass, which nothing had established before — 13 assertions, all green. They also take about 45 seconds rather than the "a few seconds" the header claimed, and nothing had contradicted that claim because no runner had ever invoked it. Header corrected with the measurement. The orphan sweep this called for is done and there are now no zero-reference *-test.sh files under testing/. It also settles a disagreement recorded between the audit and the task file: ecn-ab-test.sh is invoked by nothing, its one reference being a README description rather than a driver, so the audit was right and the earlier sweep wrong to call it a documented manual tool. interop-test.sh does have a driver in interop-stress.sh and iperf-test.sh one in iperf-compare-refs.sh, so those two were correctly classified. --- .github/workflows/ci.yml | 7 +++++++ testing/ci-local.sh | 17 +++++++++++++++++ testing/lib/wait-converge-test.sh | 8 ++++++-- 3 files changed, 30 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 321b09b..43e78dc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,13 @@ jobs: run: bash testing/check-ci-parity.sh - name: Check test log matchers against the strings src/ emits run: python3 testing/check-log-strings.py + # Hermetic: synthetic ping functions, no containers, ~45s. Lives beside + # the other two so both runners gate on it identically — putting it in + # only one would create exactly the drift check-ci-parity.sh exists to + # catch, and it is invisible to that checker either way since it is not + # a matrix suite. + - name: Run convergence-gate unit tests + run: bash testing/lib/wait-converge-test.sh fmt: name: Format check diff --git a/testing/ci-local.sh b/testing/ci-local.sh index 083b783..f0137fb 100755 --- a/testing/ci-local.sh +++ b/testing/ci-local.sh @@ -1069,6 +1069,22 @@ run_log_strings() { record "log-strings" $rc } +# Unit tests for the convergence gate every static suite waits on. Hermetic — +# synthetic ping functions against the same SECONDS clock, no containers — but +# it drives real timeouts, so it costs about 45 seconds rather than the "few +# seconds" its own header used to claim. +# +# It is here with the other two rather than in the integration stage because it +# needs nothing built. Note what that buys: wait_until_connected decides whether +# every static suite proceeds or gives up, so a regression in it turns those +# suites' verdicts into noise, and until now nothing ran this at all. +run_wait_converge() { + local rc=0 + info "[wait-converge] Running convergence-gate unit tests" + bash "$SCRIPT_DIR/lib/wait-converge-test.sh" || rc=$? + record "wait-converge" $rc +} + # ── Main ─────────────────────────────────────────────────────────────────── main() { @@ -1082,6 +1098,7 @@ main() { # local run means what a GitHub run means, whichever subset was asked for. run_ci_parity run_log_strings + run_wait_converge if [[ "$TEST_ONLY" == true ]]; then run_tests diff --git a/testing/lib/wait-converge-test.sh b/testing/lib/wait-converge-test.sh index 3abd2de..fda25c4 100755 --- a/testing/lib/wait-converge-test.sh +++ b/testing/lib/wait-converge-test.sh @@ -4,8 +4,12 @@ # These tests drive the convergence gate with synthetic connectivity # checks (ping_fn stand-ins) that report scripted PASSED/FAILED counts # keyed off the same SECONDS clock the gate uses. No containers or -# network are involved, so the whole suite runs in a few seconds and is -# safe to run in CI. +# network are involved, so the suite is hermetic and safe to run in CI. +# +# It is not fast, though: it drives real timeouts against the real clock +# and takes about 45 seconds, measured 2026-07-23. The header claimed "a +# few seconds" from the day it was written until then, which nothing had +# contradicted because no runner had ever invoked it. # # Run: # ./wait-converge-test.sh