The repo that sets the standard had no CI
`amadan ci status` answered exit 3 for every branch here — "nothing has run" — which AGENTS.md is explicit is not green. So this repo's third merge condition could never be satisfied, and every branch that reached main did so past a gate that did not exist. I only found it looking up why the doctrine branch would not merge. It is worse here than it would be in an app. This repository holds the contract module whose whole purpose is that every sibling app runs its conformance suite in CI (ruling 7). A module that asks four apps to prove themselves on every push and proves nothing about itself on any is not a standard, it is a suggestion with tests attached. The gate is gofmt, vet, build, test, and mutations.py. mutations.py is in it deliberately rather than being a thing somebody ran once, and it is the check that earns its place. Six of those mutations survived the first time they were run: the tests looked thorough and several of them could not fail, the worst being a test written to prove the S2 decoder is total that ranged over its results without a length check, so `return nil` passed it. A suite's own claim to have teeth is the claim least safe to take on trust. Everything else in this gate assumes the tests are meaningful; this is the only line that examines it. Verified locally: gate passes, all 9 mutations caught.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RVcEQ8NgrPCpRTb6JtBz1Q
1 file changed,
+64
−0
.amadan/ci.d/10-gate+64 −0
Intent
Attributed to this commit: 48.5 g CO₂e (6134449 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on worktree-suite-ci-gate, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/.amadan/ci.d/10-gate b/.amadan/ci.d/10-gate| new file mode 100755 |
| index 0000000..dfbe601 |
| --- /dev/null |
| +++ b/.amadan/ci.d/10-gate |
| @@ -0,0 +1,64 @@ |
| +#!/usr/bin/env bash |
| +# The only CI this repo has. Everything a branch must pass before it can |
| +# squash-merge, in one script so CI and what you run locally are one |
| +# definition rather than two that drift. |
| +# |
| +# This repo went without a gate for its whole life so far, which meant |
| +# `amadan ci status` answered exit 3 — "nothing ran" — and AGENTS.md's |
| +# third merge condition could never be satisfied here. Every branch that |
| +# reached main did so past a gate that did not exist. |
| +# |
| +# That is worse here than it would be in an app. This repository holds the |
| +# contract module whose entire purpose is that every sibling app runs its |
| +# conformance suite in CI (ruling 7). A module that asks four apps to prove |
| +# themselves on every push, and proves nothing about itself on any, is not |
| +# a standard — it is a suggestion with tests attached. |
| +set -euo pipefail |
| + |
| +for tool in go gofmt python3; do |
| + command -v "$tool" >/dev/null || { echo "gate: $tool not on PATH" >&2; exit 1; } |
| +done |
| + |
| +export CGO_ENABLED=0 |
| + |
| +# GOCACHE somewhere writable: the runner's HOME is not guaranteed to be, |
| +# and a gate that fails on its own build cache tells you nothing about the |
| +# branch it was asked about. |
| +export GOCACHE="${GOCACHE:-$PWD/.gocache}" |
| +trap 'rm -rf "$PWD/.gocache"' EXIT |
| + |
| +echo "=== gofmt" |
| +# gofmt -l prints the files it would change and exits 0 either way, so the |
| +# emptiness of the output is the test rather than the exit status. The |
| +# .gocache filter is here because the cache lives in the tree above. |
| +unformatted="$(gofmt -l . | grep -v '^\.gocache/' || true)" |
| +if [ -n "$unformatted" ]; then |
| + echo "gate: not gofmt-clean:" >&2 |
| + echo "$unformatted" >&2 |
| + exit 1 |
| +fi |
| + |
| +echo "=== go vet" |
| +go vet ./... |
| + |
| +echo "=== go build" |
| +go build ./... |
| + |
| +echo "=== go test" |
| +go test ./... |
| + |
| +# mutations.py re-runs the regressions this module's tests were written |
| +# against, by breaking the code on purpose and requiring the suite to |
| +# notice. |
| +# |
| +# It is in the gate rather than being a thing somebody ran once because six |
| +# of those mutations SURVIVED the first time they were run. The tests |
| +# looked thorough and several of them could not fail — the worst was a test |
| +# written to prove the S2 decoder is total, which ranged over its results |
| +# without checking the length, so `return nil` passed it. A suite's own |
| +# claim to have teeth is the claim least safe to take on trust, and this is |
| +# the only check here that examines it rather than assuming it. |
| +echo "=== mutations" |
| +python3 mutations.py |
| + |
| +echo "gate: pass" |