carlos / platform Public

Move the gate scripts under .amadan: CI tooling, not box code

TestPlan14RootReadCensus reads every .sh outside dot directories as part
of the root source envelope, because scripts/ holds what runs as root on
a box. test-gate.sh and test-weights.sh never ship; they sit beside
ci.d, which the census already leaves out for the same reason.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 0dc914abcfebf87037f1f0f2f3de2901ee9c98bf parent ce9f4c5
6 files changed, +10 −10
  • .amadan/ci.d/10-gate +2 −2
  • {scripts => .amadan}/test-gate.sh +0 −0
  • {scripts => .amadan}/test-weights.sh +4 −4
  • .amadan/test-weights.tsv +1 −1
  • AGENTS.md +1 −1
  • Makefile +2 −2
diff --git a/.amadan/ci.d/10-gate b/.amadan/ci.d/10-gate
index b46bff652..daf132329 100755
--- a/.amadan/ci.d/10-gate
+++ b/.amadan/ci.d/10-gate
@@ -37,11 +37,11 @@
# cannot drift apart, and a check added to one is a check added to both.
# That is how the gofmt check gets here at all: `make test` runs vet, a
# repo-wide `gofmt -l .` and the tests (side by side, through
-# scripts/test-gate.sh), and this file no longer restates any of it.
+# .amadan/test-gate.sh), and this file no longer restates any of it.
#
# `go build ./...` stays spelled out because `make test` does not do it.
#
-# -count=1 and -timeout 30m live in scripts/test-gate.sh, on each go test
+# -count=1 and -timeout 30m live in .amadan/test-gate.sh, on each go test
# line, with the Makefile's note on why; they are still in force here,
# just not written down twice.
set -eu
diff --git a/scripts/test-gate.sh b/.amadan/test-gate.sh
similarity index 100%
rename from scripts/test-gate.sh
rename to .amadan/test-gate.sh
diff --git a/scripts/test-weights.sh b/.amadan/test-weights.sh
similarity index 80%
rename from scripts/test-weights.sh
rename to .amadan/test-weights.sh
index 5b237131f..651e4a271 100755
--- a/scripts/test-weights.sh
+++ b/.amadan/test-weights.sh
@@ -1,10 +1,10 @@
#!/bin/sh
-# Rewrites .amadan/test-weights.tsv, the measured weights scripts/test-gate.sh
+# Rewrites .amadan/test-weights.tsv, the measured weights .amadan/test-gate.sh
# deals the split packages' tests by.
#
# go test -count=1 -json ./internal/console/ >console.json
# go test -count=1 -json . >root.json
-# scripts/test-weights.sh console.json root.json
+# .amadan/test-weights.sh console.json root.json
#
# Measure on a quiet machine with the temp root on tmpfs, as CI has it, or
# the fsync-heavy tests weigh several times what they do there. Only
@@ -13,13 +13,13 @@
set -eu
[ $# -gt 0 ] || {
- echo "usage: scripts/test-weights.sh go-test-json-file..." >&2
+ echo "usage: .amadan/test-weights.sh go-test-json-file..." >&2
exit 2
}
out=.amadan/test-weights.tsv
{
- printf '# package\ttest\tseconds (scripts/test-weights.sh, %s)\n' "$(date -u +%Y-%m-%d)"
+ printf '# package\ttest\tseconds (.amadan/test-weights.sh, %s)\n' "$(date -u +%Y-%m-%d)"
cat "$@" | awk '
/"Action":"(pass|fail)"/ && /"Test":"/ {
if (!match($0, /"Test":"[^"]*"/)) next
diff --git a/.amadan/test-weights.tsv b/.amadan/test-weights.tsv
index 0ad59657c..d994e6ff6 100644
--- a/.amadan/test-weights.tsv
+++ b/.amadan/test-weights.tsv
@@ -1,4 +1,4 @@
-# package test seconds (scripts/test-weights.sh, 2026-10-21)
+# package test seconds (.amadan/test-weights.sh, 2026-10-21)
github.com/carlosframework/platform/internal/console TestClaimConsoleMutationInvariant 199.7
github.com/carlosframework/platform/internal/console TestRetiringAnInstancePurgesItsMoveLogRows 9.3
github.com/carlosframework/platform/internal/console TestDeclaredLostIsLoggedByTheConsole 7.2
diff --git a/AGENTS.md b/AGENTS.md
index 948b3f691..c6f9cbe06 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -194,7 +194,7 @@ anything.
`make test`, so CI and what you run locally are one definition rather
than two that can drift.
- **`make test` splits the slowest packages' tests across processes**
- (`scripts/test-gate.sh`, `TEST_SPLIT`). Each shard is its own process,
+ (`.amadan/test-gate.sh`, `TEST_SPLIT`). Each shard is its own process,
so a test must not depend on another top-level test having run first
in the same process. Shards are dealt by `.amadan/test-weights.tsv`;
refresh it when the gate's shard times in the CI log drift far apart
diff --git a/Makefile b/Makefile
index ed614e3b6..fd9a7f63f 100644
--- a/Makefile
+++ b/Makefile
@@ -12,11 +12,11 @@ GOARCH ?=
# The 30m timeout is above Go's 10m default because the root package's e2e
# tests compile the carlos binary many times over.
#
-# scripts/test-gate.sh runs launchctx, vet, gofmt and the tests at once,
+# .amadan/test-gate.sh runs launchctx, vet, gofmt and the tests at once,
# and splits the slowest packages' tests across processes. TEST_SPLIT
# overrides which packages and how many ways (TEST_SPLIT= runs none split).
test:
- scripts/test-gate.sh
+ .amadan/test-gate.sh
build:
CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) go build -ldflags "$(LDFLAGS)" -o carlos .