From 8fb7b3764183168f93140d83e2b18b4e953b6cd8 Mon Sep 17 00:00:00 2001 From: "pulse-triage[bot]" <249995291+pulse-triage[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 20:19:02 +0100 Subject: [PATCH] Stabilize release regression tests Contract-Neutral: Freezes mock sampler cadence only inside the existing cache regression and updates release-preflight assertions to recognize current conditional runner routing and shard-degradation behavior; runtime and public contracts are unchanged. Change-source: pulse-maintainer --- .../monitoring/mock_unified_view_cache_test.go | 14 +++++++++++++- .../internal/release_preflight_test.py | 10 +++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/internal/monitoring/mock_unified_view_cache_test.go b/internal/monitoring/mock_unified_view_cache_test.go index 54696d1ab..d1f780538 100644 --- a/internal/monitoring/mock_unified_view_cache_test.go +++ b/internal/monitoring/mock_unified_view_cache_test.go @@ -2,14 +2,26 @@ package monitoring import ( "testing" + "time" "github.com/rcourtman/pulse-go-rewrite/internal/mock" ) func TestCurrentUnifiedStateViewCachedBetweenMockTicks(t *testing.T) { previous := mock.IsMockEnabled() + previousConfig := mock.GetConfig() + if previous { + mustSetMockEnabled(t, false) + } + testConfig := previousConfig + testConfig.UpdateInterval = 5 * time.Minute + mock.SetMockConfig(testConfig) mustSetMockEnabled(t, true) - t.Cleanup(func() { mustSetMockEnabled(t, previous) }) + t.Cleanup(func() { + mustSetMockEnabled(t, false) + mock.SetMockConfig(previousConfig) + mustSetMockEnabled(t, previous) + }) m := &Monitor{} diff --git a/scripts/release_control/internal/release_preflight_test.py b/scripts/release_control/internal/release_preflight_test.py index 93ac45a00..54e0dfd61 100755 --- a/scripts/release_control/internal/release_preflight_test.py +++ b/scripts/release_control/internal/release_preflight_test.py @@ -404,12 +404,15 @@ class ReleasePreflightTest(unittest.TestCase): workflow = (ROOT / ".github/workflows/create-release.yml").read_text() backend = (ROOT / "scripts/run-release-backend-tests.sh").read_text() self.assertIn("frontend_bundle:", workflow) - self.assertIn("runs-on: [self-hosted, Linux, X64, pulse-pve-build]", workflow) - self.assertIn("runs-on: [self-hosted, Linux, X64, pulse-pve-tests]", workflow) + bundle_job = workflow[ + workflow.index(" frontend_bundle:") : workflow.index(" frontend_checks:") + ] + self.assertIn('"pulse-pve-build"', bundle_job) self.assertIn("./scripts/run-release-backend-tests.sh", workflow) backend_job = workflow[ workflow.index(" backend_tests:") : workflow.index(" integration_tests:") ] + self.assertIn('"pulse-pve-tests"', backend_job) self.assertNotIn(" - frontend_checks\n if:", backend_job) self.assertIn("go test -c -race", backend) self.assertIn("python3 scripts/shard_go_tests.py", backend) @@ -418,7 +421,8 @@ class ReleasePreflightTest(unittest.TestCase): 'MEMORY_WAIT_SECONDS="${PULSE_BACKEND_TEST_MEMORY_WAIT_SECONDS:-120}"', backend, ) - self.assertIn("backend shard admission requires", backend) + self.assertIn("shard_admission_required_kib", backend) + self.assertIn("Degrading to $cpu_shards API shard(s)", backend) self.assertIn( "TestWebSocketOriginAllowsTrustedForwardedHostedOriginIPv6Loopback," "TestServerInfoEndpointMethodNotAllowed",