From 43559188f1630615f9c90ea2c64270bcc6de8c61 Mon Sep 17 00:00:00 2001 From: Amperstrand Date: Sat, 17 Oct 2026 22:09:28 +0200 Subject: [PATCH] docs+contract: module-count claims 16->18, and fence the backticked form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main has 18 go.mod files; four claim sites still said 16 (two of them backticked and thus invisible to check-docs-facts' pattern — an unfenced drift class that had rotted while the check passed). Claims updated to 18 everywhere and the pattern now matches the backticked form; planted a backticked 19 and confirmed the check fails by name. (cherry picked from commit 022be748cb4d9d246bbc6ffb58bd06e6ca480508) --- AGENTS.md | 2 +- CONTRIBUTING.md | 3 ++- tests/contract/check-docs-facts.py | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 94d48dcfa..032a0ba61 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -408,7 +408,7 @@ get wrong: It runs `gofmt` (must print nothing), `go vet`, `go build` and `go test -race -count=1 -tags testenv` in **every** Go module — - [src/](src/) is a multi-module tree (16 nested `go.mod` files), so + [src/](src/) is a multi-module tree (18 nested `go.mod` files), so running those commands from `src/` alone covers only the root module and silently skips all subpackages. One implementation: [scripts/go-battery.sh](scripts/go-battery.sh). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff8a6f9e5..760961909 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,6 +55,7 @@ battery, package artifact), follow `make manual-check`. `make go-battery` is the full gate across all modules; the bare +`make go-battery` is the full gate across all 18 modules; the bare `cd src && go build ./...` form covers only the root module. Go tooling that targets one module still runs from [src/](src/), not the repo root. The Go version is pinned in [src/go.mod](src/go.mod); CI installs @@ -141,7 +142,7 @@ make go-battery That is the same gate CI runs: `gofmt -l .` (must print nothing), `go vet ./...`, `go build ./...` and `go test -race -count=1 -tags testenv ./...` — executed in **every** Go module. src/ is a multi-module -tree (16 nested `go.mod` files): running the commands from `src/` alone +tree (18 nested `go.mod` files): running the commands from `src/` alone covers only the root module and silently skips the subpackages. The one implementation is [scripts/go-battery.sh](scripts/go-battery.sh). diff --git a/tests/contract/check-docs-facts.py b/tests/contract/check-docs-facts.py index 1adf267af..71d680201 100644 --- a/tests/contract/check-docs-facts.py +++ b/tests/contract/check-docs-facts.py @@ -70,7 +70,10 @@ def main() -> int: ROOT / "scripts" / "go-battery.sh", ROOT / "scripts" / "release-check.sh", ] - pattern = re.compile(r"(\d+)(?: nested)? (?:go\.mod files|modules)", re.IGNORECASE) + # backticked claims ("16 nested `go.mod` files") are the same claim and + # must be fenced too — they were invisible to the first pattern and had + # drifted on main while the check passed + pattern = re.compile(r"(\d+)(?: nested)? ?(?:`?go\.?mod`? ?)?(?:files|modules)", re.IGNORECASE) claims = 0 for cf in claim_files: if not cf.exists():