commit 29802cb08b6336a4fce34ec093c0ab258401a68a
parent a921d18102dbc35780d447e0c4e242fc433c1118
Author: triesap <tyson@radroots.org>
Date: Tue, 11 Aug 2026 15:55:04 +0000
test: qualify build-logic stability
- add a nondefault 25-run packaging TestKit stability lane
- preserve the historical expected and observed diagnostics
- prove standalone and governed mode routing for the lane
- keep repeat execution out of ordinary source verification
Diffstat:
3 files changed, 46 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -17,10 +17,10 @@ else
override BUILD_RUNNER :=
endif
-.PHONY: help doctor governed-doctor lock metadata build-logic-check mode-check format format-fix lint test check governed-check build bindings dev run audit licenses foundation-check package host-package-check governed-package-check source-check governed-source-check package-check integration-check governed-integration-check acceptance-check signing-check _signing-check notarization-check _notarization-check release-check _release-check clean
+.PHONY: help doctor governed-doctor lock metadata build-logic-check build-logic-stability-check mode-check format format-fix lint test check governed-check build bindings dev run audit licenses foundation-check package host-package-check governed-package-check source-check governed-source-check package-check integration-check governed-integration-check acceptance-check signing-check _signing-check notarization-check _notarization-check release-check _release-check clean
help:
- @printf '%s\n' doctor governed-doctor lock metadata build-logic-check mode-check format format-fix lint test check governed-check build bindings dev run audit licenses foundation-check package host-package-check governed-package-check source-check governed-source-check package-check integration-check governed-integration-check acceptance-check signing-check notarization-check release-check clean
+ @printf '%s\n' doctor governed-doctor lock metadata build-logic-check build-logic-stability-check mode-check format format-fix lint test check governed-check build bindings dev run audit licenses foundation-check package host-package-check governed-package-check source-check governed-source-check package-check integration-check governed-integration-check acceptance-check signing-check notarization-check release-check clean
doctor:
@printf '%s\n' "harvestcircle.build.mode=$(BUILD_MODE)"
@@ -45,6 +45,9 @@ metadata: doctor
build-logic-check: doctor
$(BUILD_RUNNER) $(GRADLE) --no-daemon -p build-logic :contracts:check :plugins:check :plugins:functionalTest
+build-logic-stability-check: doctor
+ $(BUILD_RUNNER) tools/test-build-logic-stability.sh
+
mode-check:
tools/test-build-modes.sh
diff --git a/tools/test-build-logic-stability.sh b/tools/test-build-logic-stability.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -eu
+
+repository_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
+gradle="$repository_root/gradlew"
+test_name='org.harvestcircle.buildlogic.plugins.ConventionPluginSmokeTest.packagingPluginRejectsMissingCloseTimeoutAndSecretOutput'
+runs=25
+run=1
+
+while [ "$run" -le "$runs" ]; do
+ printf '%s\n' "harvestcircle.build-logic-stability.run=$run/$runs"
+ "$gradle" \
+ --no-daemon \
+ --no-configuration-cache \
+ -p "$repository_root/build-logic" \
+ :plugins:functionalTest \
+ --tests "$test_name" \
+ --rerun-tasks
+ run=$((run + 1))
+done
+
+printf '%s\n' \
+ 'harvestcircle.build-logic-stability.prior-expected=did not report closed health evidence' \
+ 'harvestcircle.build-logic-stability.prior-observed=health-check timed out' \
+ "harvestcircle.build-logic-stability.runs=$runs" \
+ 'harvestcircle.build-logic-stability.result=pass'
diff --git a/tools/test-build-modes.sh b/tools/test-build-modes.sh
@@ -30,6 +30,21 @@ for lane in source-check integration-check; do
done
for mode in standalone governed; do
+ stability_output=$(PATH="$fixture:$PATH" "$make_command" --no-print-directory -n BUILD_MODE="$mode" -C "$repository_root" build-logic-stability-check)
+ stability_count=$(printf '%s\n' "$stability_output" | grep -c 'test-build-logic-stability.sh')
+ if [ "$stability_count" -ne 1 ]; then
+ printf '%s\n' "build-logic stability in $mode mode must invoke its qualification tool exactly once" >&2
+ exit 1
+ fi
+
+ source_output=$(PATH="$fixture:$PATH" "$make_command" --no-print-directory -n BUILD_MODE="$mode" -C "$repository_root" source-check)
+ if printf '%s\n' "$source_output" | grep -q 'test-build-logic-stability.sh'; then
+ printf '%s\n' "ordinary source-check in $mode mode invoked the nondefault stability lane" >&2
+ exit 1
+ fi
+done
+
+for mode in standalone governed; do
clean_output=$(PATH="$fixture:$PATH" "$make_command" --no-print-directory -n BUILD_MODE="$mode" -C "$repository_root" clean)
root_clean_count=$(printf '%s\n' "$clean_output" | grep -Ec '(^| -- )\./gradlew --no-daemon clean$')
included_clean_count=$(printf '%s\n' "$clean_output" | grep -Ec '(^| -- )\./gradlew --no-daemon -p build-logic clean$')