From 6bc423718368fc201b5cb643cde6093a34fb3e75 Mon Sep 17 00:00:00 2001 From: Lukas Wuttke Date: Tue, 14 Jul 2026 14:17:40 +0200 Subject: [PATCH 1/2] ci: run e2e on develop pushes; ratchet + extend coverage floors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scheduled workflows execute the default branch's tree (main), which trails develop by ~46 commits — discovery_e2e_test.go, delete_e2e_test.go, and the delete-teardown job don't exist there, so the nightly never actually ran them. Add push: branches: [develop] to e2e.yml so the suite runs against the tree it was written for. Ratchet the coverage floors to just under current develop numbers and add the two missing load-bearing packages: internal/cli 68 -> 80 (current 82.9%) internal/submit 72 -> 78 (current 80.4%) internal/push NEW 87 (current 89.0%) internal/cluster NEW 75 (current 78.5%) Verified locally: ./scripts/coverage-floor.sh passes all four floors. Fixes #293 Fixes #294 Co-Authored-By: Claude Fable 5 --- .github/workflows/build.yml | 4 ++-- .github/workflows/e2e.yml | 9 +++++++++ scripts/coverage-floor.sh | 9 ++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea325467..5cf29a20 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,9 +79,9 @@ jobs: # us from having to retrofit it later. run: go test -race -cover ./... - - name: Coverage floor (internal/cli, internal/submit must not rot) + - name: Coverage floor (cli, submit, push, cluster must not rot) # `go test -cover` above prints numbers but asserts nothing. This - # enforces a per-package floor on the two load-bearing, historically + # enforces a per-package floor on the load-bearing, historically # thin-tested packages (the money path + submit orchestration) so a # test deletion can't silently drop coverage. Floors ratchet UP only — # see scripts/coverage-floor.sh (backend#1009). diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index de54c5c3..1a9eada2 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -7,11 +7,20 @@ name: Integration (e2e) # 0% in unit coverage — this is where every live bug actually lived). # # Heavy (kind boot + image pulls), so it does NOT run on every PR: +# - on every push to develop # - nightly (schedule) # - manual (workflow_dispatch) # - on a PR only when it carries the `e2e` label +# +# The push trigger exists because scheduled workflows always execute the +# DEFAULT branch's tree (main), which trails develop by dozens of commits — +# discovery_e2e_test.go, delete_e2e_test.go, and the delete-teardown job +# don't exist on main, so the nightly never actually ran them (#293). +# Running on develop pushes exercises the tree the tests were written for. on: + push: + branches: [develop] schedule: - cron: "0 3 * * *" workflow_dispatch: diff --git a/scripts/coverage-floor.sh b/scripts/coverage-floor.sh index e9775f4c..bb51c6e1 100755 --- a/scripts/coverage-floor.sh +++ b/scripts/coverage-floor.sh @@ -10,7 +10,8 @@ # The floors are a RATCHET: set just under the current numbers, and bumped UP # as coverage improves — never silently down. Lowering a floor must be a # deliberate, reviewed edit here (with a reason), not a side effect of deleting -# tests. Current (develop): internal/cli ~70%, internal/submit ~75%. +# tests. Current (develop, 2026-07-14): internal/cli 82.9%, internal/submit +# 80.4%, internal/push 89.0%, internal/cluster 78.5%. # # Usage: scripts/coverage-floor.sh (run from the repo root) # @@ -20,8 +21,10 @@ set -euo pipefail # "package:floor" entries. Keep floors integers; coverage is compared as a # float against them. FLOORS=" -internal/cli:68 -internal/submit:72 +internal/cli:80 +internal/submit:78 +internal/push:87 +internal/cluster:75 " status=0 From d1d82e2c6502bcfba8f97893091fea3e218bb2ce Mon Sep 17 00:00:00 2001 From: Lukas Wuttke Date: Tue, 14 Jul 2026 14:29:25 +0200 Subject: [PATCH 2/2] =?UTF-8?q?fix(ci):=20cluster=20floor=2073=20=E2=80=94?= =?UTF-8?q?=20CI=20runner=20measures=2074.6%,=20not=20the=20local=2078.5%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit internal/cluster coverage is environment-dependent: the kubeconfig-resolution paths only execute on a machine that has a real ~/.kube/config, so a dev laptop reads 78.5% while the bare ubuntu runner reads 74.6% (first CI run on this PR). The floor gates on CI, so it must be set against the CI number: 73 (= actual - 1), not the ticket's proposed 75. Co-Authored-By: Claude Fable 5 --- scripts/coverage-floor.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/coverage-floor.sh b/scripts/coverage-floor.sh index bb51c6e1..723cfd34 100755 --- a/scripts/coverage-floor.sh +++ b/scripts/coverage-floor.sh @@ -10,8 +10,13 @@ # The floors are a RATCHET: set just under the current numbers, and bumped UP # as coverage improves — never silently down. Lowering a floor must be a # deliberate, reviewed edit here (with a reason), not a side effect of deleting -# tests. Current (develop, 2026-07-14): internal/cli 82.9%, internal/submit -# 80.4%, internal/push 89.0%, internal/cluster 78.5%. +# tests. Current (develop, 2026-07-14, ubuntu CI runner): internal/cli 82.9%, +# internal/submit 80.4%, internal/push 89.0%, internal/cluster 74.6%. +# +# NOTE: internal/cluster measures higher on a dev machine with a real +# ~/.kube/config (78.5% on macOS) than on the bare CI runner (74.6%) — the +# kubeconfig-resolution paths only execute where one exists. Floors must be +# set against the CI number, since that's where the gate runs. # # Usage: scripts/coverage-floor.sh (run from the repo root) # @@ -24,7 +29,7 @@ FLOORS=" internal/cli:80 internal/submit:78 internal/push:87 -internal/cluster:75 +internal/cluster:73 " status=0