Lint's .golangci.yml check says which fix applies (closes #34) #93

Merged
clawbot merged 1 commits from issue-34-golangci-drift-message into next 2026-10-03 17:14:27 +02:00
Collaborator

Closes #34, following the plan in #34 (comment).

backend/script/lint checks backend/.golangci.yml against the sha256 in GOLANGCI_CONFIG_SHA256. Whatever went wrong, it said to restore the file from sneak/prompts. When the org standard itself has changed, that advice loops: the copied file is right and the pinned hash is out of date.

Now:

  • On a mismatch it still prints both hashes, then says to compare the file with the org standard (full URL given). If they differ, the file was edited here and must be restored. If they are the same, the org standard changed and GOLANGCI_CONFIG_SHA256 in backend/script/lint needs the new hash.
  • A missing .golangci.yml gets its own message.
  • A sha256sum that is missing or prints no hash gets its own message. Before, that was reported as a mismatch.

Every one of these still exits 1. .golangci.yml is unchanged, and so is backend/README.md, since its line for script/lint is still true.

Judgement call: the earlier comment on the issue asked for the order of the two fixes to be chosen deliberately. The message ranks neither one first. It gives the one comparison that decides between them.

Deviation: the issue's own checks name the SHA256SUM= make variable, Dockerfile.backend and an older hash. None of those exist any more, so the plan's replacement checks were used instead.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/netwatch/issues/34, following the plan in https://git.eeqj.de/sneak/netwatch/issues/34#issuecomment-116077. `backend/script/lint` checks `backend/.golangci.yml` against the sha256 in `GOLANGCI_CONFIG_SHA256`. Whatever went wrong, it said to restore the file from `sneak/prompts`. When the org standard itself has changed, that advice loops: the copied file is right and the pinned hash is out of date. Now: - On a mismatch it still prints both hashes, then says to compare the file with the org standard (full URL given). If they differ, the file was edited here and must be restored. If they are the same, the org standard changed and `GOLANGCI_CONFIG_SHA256` in `backend/script/lint` needs the new hash. - A missing `.golangci.yml` gets its own message. - A `sha256sum` that is missing or prints no hash gets its own message. Before, that was reported as a mismatch. Every one of these still exits 1. `.golangci.yml` is unchanged, and so is `backend/README.md`, since its line for `script/lint` is still true. Judgement call: the earlier comment on the issue asked for the order of the two fixes to be chosen deliberately. The message ranks neither one first. It gives the one comparison that decides between them. Deviation: the issue's own checks name the `SHA256SUM=` make variable, `Dockerfile.backend` and an older hash. None of those exist any more, so the plan's replacement checks were used instead. Model: opus-5-5
clawbot added the needs-review label 2026-10-03 16:47:00 +02:00
clawbot added 1 commit 2026-10-03 16:47:00 +02:00
backend/script/lint compared .golangci.yml with its pinned sha256 and,
on any failure, said to restore the file from sneak/prompts. Once the
org standard has legitimately changed, that advice loops: the copied
file is right and GOLANGCI_CONFIG_SHA256 is stale. On a mismatch the
script now says to compare the file with the org standard, restore it
if they differ, and update GOLANGCI_CONFIG_SHA256 if they are the same;
it still prints both hashes. A missing .golangci.yml, and a sha256sum
that is missing or prints no hash, get their own messages instead of
being reported as a mismatch. Each failure still exits 1. .golangci.yml
is unchanged.

Model: opus-5-5
clawbot self-assigned this 2026-10-03 16:47:09 +02:00
Author
Collaborator

PASS: every way the .golangci.yml check in backend/script/lint can fail now gets its own accurate message and still stops the lint, and #34 is done as planned.

Model: opus-5-5

PASS: every way the `.golangci.yml` check in `backend/script/lint` can fail now gets its own accurate message and still stops the lint, and https://git.eeqj.de/sneak/netwatch/issues/34 is done as planned. Model: opus-5-5
clawbot merged commit 9e4d3fdb54 into next 2026-10-03 17:14:27 +02:00
clawbot deleted branch issue-34-golangci-drift-message 2026-10-03 17:14:27 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/netwatch#93