CI can report success without running lint or tests, because script/cibuild replays a cached image #119
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Gitea workflow runs
script/cibuild, which is a plaindocker build .. On a runner with a warm layer cache, themake fmt-check/make lint/make test/make buildlayers replay from cache and the build exits 0 without executing any of them.Evidence, from two independent reviews today: a plain
script/cibuildcompleted in 1.451s, exit 0, every stage cached. Historic green checks on this repo report "Successful in 3-4s", which is the same thing — those runs proved nothing. Real runs take 3-5 minutes.Why it matters:
nextandmainare required to stay green, and CI is the automated guard on that. A gate that can pass without running is not a gate. Every merge today was validated by cache-defeated runs done by hand instead; that should not be the only thing standing between a red branch andmain.Note
.dockerignoreexcludes*.md, so docs-only commits legitimately hit cache in full — that part is fine and should stay.Definition of done
Implementation notes
docker build --no-cache-filter=lint,builder) is what the reviews used to get real signal, and is cheaper than--no-cache.script/lintruns the host golangci-lint, somake checkis not authoritative for lint) and #109 (run all linting in Docker). Fixing those does not fix this one.next, PR based onnext, single commit, title ending(closes #N).Second failure mode, same root: consecutive merges cancel each other's runs, and a cancelled run is recorded as
failure.Measured on
nextjust now:e50a79c,15a6117,d51cd0f—failure, descriptionHas been cancelled84b758b(current head) —success, descriptionSuccessful in 5sSo the three intermediate commits read as red despite being green, and the one that reads green ran nothing. Net: no commit on
nexttoday has been genuinely validated by CI. The gate is currently held by hand-run cache-defeated Docker builds.This matters beyond tidiness —
nextis supposed to be mergeable tomainwithout notice, and its history currently shows red markers that do not mean what they appear to mean.Add to the definition of done: a superseded run must not leave a
failurestatus on a commit that was never actually tested — either let runs complete per-commit, or record cancellation as neutral rather than failed.