carlos / platform Public

make staticcheck: drop the cutover-witness tag

TestCutoverWitnessControlsAreTagged allows that tag only in
.amadan/test-gate.sh and the files it builds, so that no Makefile target
can ever build with it; naming it in the staticcheck target failed the
gate. staticcheck now runs with -tags rootrunner only. The witnesses' two
files stay covered by test-gate.sh's vet-tags and cutover-witness jobs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 11602a453adbac58d12eed62df40e25e921a9c4e parent 2a432ec
2 files changed, +11 −8
  • .amadan/ci.d/40-staticcheck +3 −3
  • Makefile +8 −5

CI passed — run details

diff --git a/.amadan/ci.d/40-staticcheck b/.amadan/ci.d/40-staticcheck
index f92e95c86..359991236 100755
--- a/.amadan/ci.d/40-staticcheck
+++ b/.amadan/ci.d/40-staticcheck
@@ -1,8 +1,8 @@
#!/bin/sh
# staticcheck's bug checks (SA), pinned, over the whole module with the
-# rootrunner and carlos_cutover_witness tags. `make staticcheck` is the one
-# definition; this step only runs it, so a developer gets the same answer
-# with the same command.
+# rootrunner tag (the Makefile says why not the cutover witnesses' tag
+# too). `make staticcheck` is the one definition; this step only runs it,
+# so a developer gets the same answer with the same command.
#
# Its own step, not part of `make test`: a red here is a finding in the
# code, and it should read as that, not as a failed test run. It also keeps
diff --git a/Makefile b/Makefile
index ab4cd9be3..cd6258f01 100644
--- a/Makefile
+++ b/Makefile
@@ -45,10 +45,13 @@ fmt:
# toolchain (.amadan/go-toolchain.sh): a staticcheck older than the Go it
# reads cannot decode that release's export data.
#
-# The tags are the gate's tagged vet's (.amadan/test-gate.sh): the
-# root-runner tests and the cutover witnesses are read too. The one file
-# that drops out under rootrunner, internal/host/departure_queue_default.go,
-# is two one-line stubs; its rootrunner twin is read in its place.
+# -tags rootrunner, so the root-runner tests are read too. The one file
+# that drops out under it, internal/host/departure_queue_default.go, is two
+# one-line stubs; its rootrunner twin is read in its place. The cutover
+# witnesses' tag is not named here: TestCutoverWitnessControlsAreTagged
+# allows it only in .amadan/test-gate.sh and the files it builds, so no
+# Makefile target can ever build with it. Its two files are vetted by the
+# gate's vet-tags job and compiled by its cutover-witness job instead.
STATICCHECK := honnef.co/go/tools/cmd/staticcheck@v0.8.2
# staticcheck caches in the user cache directory (~/.cache/staticcheck),
# which a sandboxed CI runner may mount read-only. Where the environment
@@ -64,7 +67,7 @@ endif
# does not promise to count it. Findings go to stdout; go run's own
# "downloading" lines go to stderr and are left alone.
staticcheck:
- @out=$$(go run $(STATICCHECK) -tags rootrunner,carlos_cutover_witness ./...); rc=$$?; \
+ @out=$$(go run $(STATICCHECK) -tags rootrunner ./...); rc=$$?; \
if [ -n "$$out" ]; then printf '%s\n' "$$out"; fi; \
if [ $$rc -ne 0 ] || [ -n "$$out" ]; then echo "staticcheck: findings above (staticcheck.conf says which checks run)" >&2; exit 1; fi; \
echo "staticcheck: clean"