From c34ea92842c98cf2710d3d9791503657e0eea031 Mon Sep 17 00:00:00 2001 From: Amperstrand Date: Mon, 12 Oct 2026 23:00:54 +0200 Subject: [PATCH] =?UTF-8?q?rebase=20onto=20main=20(post-rc2):=20test(contr?= =?UTF-8?q?act):=20four=20drift=20fences=20=E2=80=94=20fragment=20identity?= =?UTF-8?q?,=20toolchain=20ceiling,=20SSID=20matcher=20table,=20clean-cont?= =?UTF-8?q?ainer=20lane?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/scripts/clean-container-gate.sh | 149 ++++++++++ .github/workflows/test.yml | 69 ++++- .ngit/act/workflows/test.yml | 8 + ...aign.added.md => 704-vm-campaign.added.md} | 3 +- .../767-contract-drift-fences.internal.md | 19 ++ .../827-admin-credential-choice.changed.md | 30 ++ .../admin-credential-choice.changed.md | 12 - hooks/pre-commit | 7 +- tests/README.md | 2 +- .../changelog-fragment-numbers_test.sh | 119 ++++++++ tests/contract/check-changelog-fragments.py | 263 ++++++++++++++++++ tests/contract/check-toolchain-parity.py | 123 ++++++-- .../contract/clean-container-known-issues.txt | 19 ++ tests/contract/toolchain-parity_test.sh | 104 +++++++ 14 files changed, 877 insertions(+), 50 deletions(-) create mode 100755 .github/scripts/clean-container-gate.sh rename changelog.d/{vm-campaign.added.md => 704-vm-campaign.added.md} (87%) create mode 100644 changelog.d/767-contract-drift-fences.internal.md create mode 100644 changelog.d/827-admin-credential-choice.changed.md delete mode 100644 changelog.d/admin-credential-choice.changed.md create mode 100755 tests/contract/changelog-fragment-numbers_test.sh create mode 100755 tests/contract/check-changelog-fragments.py create mode 100644 tests/contract/clean-container-known-issues.txt create mode 100755 tests/contract/toolchain-parity_test.sh diff --git a/.github/scripts/clean-container-gate.sh b/.github/scripts/clean-container-gate.sh new file mode 100755 index 000000000..902b44ea6 --- /dev/null +++ b/.github/scripts/clean-container-gate.sh @@ -0,0 +1,149 @@ +#!/usr/bin/env bash +# +# Run the module suite as a HOST-STATE gate — the engine of test.yml's +# clean-container-test job. +# +# Usage: clean-container-gate.sh (from anywhere; resolves the repo root) +# +# The job's body runs in a pristine golang:-bookworm container, +# so a test that is green on the ubuntu-latest runner image and red here is +# coupled to host state (the /etc/tollgate class, $HOME leftovers, runner +# packages on PATH, warm caches) — it passes because of where it runs, not +# because of what it tests. +# +# This gate fails closed: +# * any failing test NOT listed in +# tests/contract/clean-container-known-issues.txt is fatal; +# * a listed failure is printed as TOLERATED with its issue, and the list +# is the complete, meant-to-shrink tolerance (same contract as the +# happy-path gate): when the issue closes, the line is deleted and the +# failure is fatal again by itself; +# * a module that fails to build (a FAIL with no failed test name) is +# always fatal — a build cannot be a known issue; +# * a non-zero go test exit that reports no failed test is fatal too +# (a harness failure is never tolerated). +# +# The module list mirrors the go-test matrix in test.yml (same nine nested +# modules) plus the main package's testenv run. Intentionally omitted, same +# as the matrix: src/cli, src/upstream_detector and src/upstream_session_manager +# — their go.mods transitively pull the lnd -> ltcsuite/ltcd chain, which only +# builds standalone after an invasive rewrite (the NOTE in test.yml's go-test +# job); they still build under make go-battery's root-module build. Adding +# them here is tracked where the matrix tracks it. +set -uo pipefail + +ROOT="$(cd "$(dirname "$0")/../.." && pwd)" +KNOWN="$ROOT/tests/contract/clean-container-known-issues.txt" +WORK="$(mktemp -d)" +trap 'rm -rf "$WORK"' EXIT + +MODULES=( + src/config_manager + src/utils + src/cmd/tollgate-cli + src/lightning + src/merchant + src/tollgate_protocol + src/tollwallet + src/valve + src/wireless_gateway_manager +) + +fatal=0 +tolerated=0 +# Every " " that failed, one per line. +: >"$WORK/failures.txt" + +run_lane() { # run_lane