@echo "ERROR: cmd/server stub was deleted — it never served the UI." >&2
Root cause: docs/ and README.md claimed Go 1.21/1.22 support while go.mod declared go 1.25.0, and the Makefile's build-server/build-ui silently compiled a dead cmd/server stub even though cmd/memoryd was the real UI-serving entrypoint.
Fix (4 moves, per the dispatch):
1. Align docs to go.mod minimum — never lower go.mod blindly. go.mod stays at 1.25.0; docs are rewritten to require 1.25+ and explicitly reject 1.21/1.22:
<!-- README.md -->
Requires **Go 1.25+** (matches the `go.mod` toolchain minimum; never
build with an older toolchain).
Build: make build-memoryd # real server (serves the UI)
make build-ui # alias: builds cmd/memoryd
> `make build-server` was removed: it silently built a deleted stub
> (`cmd/server`) that did not serve the UI. It now fails loudly.
<!-- docs/INSTALL.md -->
1. Install **Go 1.25 or newer** — the minimum declared in `go.mod`
(`go 1.25.0`). Older toolchains (1.21/1.22) are NOT supported.
2. Delete the stub — cmd/server/ removed entirely (real entrypoint is cmd/memoryd, which serves the UI on :8080).
3. Make build-server fail cleanly with an ERROR and non-zero exit:
# Real entrypoint: cmd/memoryd (serves the UI).
build-ui: build-memoryd
build-memoryd:
$(GO) build -o bin/memoryd ./cmd/memoryd
build-server:
@echo "ERROR: cmd/server stub was deleted — it never served the UI." >&2
@echo "ERROR: use 'make build-memoryd' (or 'make build-ui') instead." >&2
@exit 1
4. Retarget build-ui at the real entrypoint (alias → cmd/memoryd), so no build path can silently produce the stub again.
Verified on a reconstructed repo (real Go 1.26.0 toolchain, `GOTOOLCHAIN=auto`): | # | Check | Result | |---|-------|--------| | 1 | `go.mod` still `go 1.25.0` (md5 unchanged — never lowered) | PASS | | 2 | Supportive stale claims (`Requires 1.21+`, `1.22 or newer`, …) in docs = 0; only "NOT supported" warnings remain | PASS | | 3 | `go build ./...` + `go vet ./...` clean | PASS | | 4 | `make build-server` → both ERROR lines to stderr, **exit=2** (also under `make -s`, `PIPESTATUS[0]=2`) | PASS | | 5 | `make build-ui` → `go build -o bin/memoryd ./cmd/memoryd`; binary contains memoryd UI banner, zero stub text | PASS | | 6 | `cmd/server` deleted; zero `.go` references to the stub (README/Makefile mentions are intentional ERROR text) | PASS | Edge cases: pipeline exit-code masking (`$?` vs `PIPESTATUS[0]`), silent-mode make (`-s`), idempotent rebuild of `build-ui`, dry-run (`make -n`) proving `build-ui ≡ build-memoryd ≡ ./cmd/memoryd`.
{"model": "deepseek-v4-flash", "problem_class": "go-docs-toolchain-version-drift", "result": "passed", "tests": 6}