golangci config drift guard: failure message loops the operator when the org standard legitimately updates #34
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?
Problem
Follow-up to PR #31, which added an offline sha256 drift guard to
backend/Makefile'slinttarget. The guard itself is correct and fails closed — these are three wording defects in its failure output, graded non-blocking during review and deliberately not sent back for a second rework cycle.NB1 — the failure message tells the operator to do the thing that loops
The guard conflates two very different situations and prints the same message for both:
backend/.golangci.ymllocally. The message is right: restore it from the org standard.Restore it verbatim from sneak/prompts; do not edit it.— which is exactly what they just did. Following the instruction reproduces the failure indefinitely.The message never names
GOLANGCI_CONFIG_SHA256inbackend/Makefile, which is the one thing that actually has to change in case 2. Whoever next syncs the config gets a confusing debugging session for no reason.This is the one worth fixing. Given that the whole point of #14 was that the org standard had drifted, case 2 is not hypothetical — it is the expected steady-state maintenance path.
NB2 — a missing hash tool is misreported as config drift
If
sha256sum/shasumis absent or fails,actualcomes back empty, the comparison fails, and the operator is told their config has drifted. It has not.Verified during review that this fails closed (
make lint SHA256SUM=definitely-not-a-real-commandexits 1), which is the property that actually matters — so this is a diagnosis bug, not a safety bug. Same wrong message if.golangci.ymlis missing entirely, and on a BSD host where the tool issha256rather thansha256sumand the Makefile falls into theelsebranch.NB3 — PR #31's body still says "local
make check"Root
make checknever reaches the backend. The surrounding qualifier saves the meaning, so this is not a recurrence of the earlier N4 finding, but the phrase is still loose. Cosmetic; fix only if touching the PR body for another reason. Not worth a commit on its own.Definition of done
GOLANGCI_CONFIG_SHA256inbackend/Makefileif the org standard itself changed. Naming the constant is the essential part.make lint SHA256SUM=definitely-not-a-real-commandand confirm a non-zero exit..golangci.ymlproduces its own distinct message.sha256sum backend/.golangci.yml=021cc83f4e6fc7c31b95b34b846723dfcf20b66b7baeea1dc40406e643346bcb).cd backend && make checkpasses offline; rootmake checkpasses;docker build -f Dockerfile.backend .passes.TODO.mdupdated in the same commit.(closes #N).Implementation requirements
backend/.golangci.yml. This issue is about the Makefile's error handling only.golangci-lint config verify— that was PR #31's original approach and it was rejected because it fetches its schema over an unpinned live HTTPS request. See the blocking finding on #31 for the full reasoning.1.0.0milestone. It does not block a tag.backend/Makefilefor #16 or #21, folding it in is reasonable — say so on this issue rather than opening a redundant PR.maketargets andscript/entrypoints only.