make tidy writes go.mod and go.sum as go mod tidy does, and make check fails when they differ from that, for #99.
script/tidy builds the new tidy-files stage of the Dockerfile: the tidy stage before it runs go mod tidy on the test phase's Go image, and tidy-files holds the two files alone, which docker build --output writes into the working tree, owned by whoever ran it. No other build depends on either stage.
The test phase runs go mod tidy -diff before the tests and fails with go.mod or go.sum is not tidy: run make tidy. It comes before the tests because a missing go.sum line otherwise fails them with Go's own message, which names go mod download instead.
The check and make tidy use the same Go image, so they cannot disagree; the lint phase's Go is an older patch release.
README.md lists script/tidy and says what script/test now checks; the Makefile gains tidy.
Worth knowing: make test also fails on an untidy tree, since the check is part of the test phase.
Judgement call: the check is a step of the test phase, not a build of its own, so script/check still builds no image of its own.
Judgement call: script/tidy's build has no tag, unlike the other builds in script/: it makes no image.
Model: opus-5-5
`make tidy` writes `go.mod` and `go.sum` as `go mod tidy` does, and `make check` fails when they differ from that, for https://git.eeqj.de/sneak/smallwebwaf/issues/99.
- `script/tidy` builds the new `tidy-files` stage of the `Dockerfile`: the `tidy` stage before it runs `go mod tidy` on the test phase's Go image, and `tidy-files` holds the two files alone, which `docker build --output` writes into the working tree, owned by whoever ran it. No other build depends on either stage.
- The test phase runs `go mod tidy -diff` before the tests and fails with `go.mod or go.sum is not tidy: run make tidy`. It comes before the tests because a missing `go.sum` line otherwise fails them with Go's own message, which names `go mod download` instead.
- The check and `make tidy` use the same Go image, so they cannot disagree; the lint phase's Go is an older patch release.
- `README.md` lists `script/tidy` and says what `script/test` now checks; the `Makefile` gains `tidy`.
Worth knowing: `make test` also fails on an untidy tree, since the check is part of the test phase.
Judgement call: the check is a step of the test phase, not a build of its own, so `script/check` still builds no image of its own.
Judgement call: `script/tidy`'s build has no tag, unlike the other builds in `script/`: it makes no image.
Model: opus-5-5
script/tidy runs `go mod tidy` in a new tidy stage of the Dockerfile,
on the test phase's Go image, and writes go.mod and go.sum back into the
working tree with `docker build --output`. The test phase now runs
`go mod tidy -diff` before the tests and fails naming `make tidy`; it
comes first because a missing go.sum line otherwise fails the tests with
Go's own message.
Judgement call: script/tidy's build has no tag, unlike the other builds
in script/: it makes no image.
Model: opus-5-5
Judgement call accepted: the check is a step of the test phase, so make test also fails on an untidy go.mod or go.sum.
Judgement call accepted: script/tidy's build has no tag, although the repo policy says every build in script/ is tagged, because it makes no image.
Judgement call accepted: go mod tidy -diff fetches from the module proxy a few modules that the test phase's go mod download leaves out; the phase already downloads modules.
Model: opus-5-5
Review passed.
- Judgement call accepted: the check is a step of the test phase, so `make test` also fails on an untidy `go.mod` or `go.sum`.
- Judgement call accepted: `script/tidy`'s build has no tag, although the repo policy says every build in `script/` is tagged, because it makes no image.
- Judgement call accepted: `go mod tidy -diff` fetches from the module proxy a few modules that the test phase's `go mod download` leaves out; the phase already downloads modules.
Model: opus-5-5
clawbot
merged commit 0dc26041dc into next2026-10-07 10:30:47 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
make tidywritesgo.modandgo.sumasgo mod tidydoes, andmake checkfails when they differ from that, for #99.script/tidybuilds the newtidy-filesstage of theDockerfile: thetidystage before it runsgo mod tidyon the test phase's Go image, andtidy-filesholds the two files alone, whichdocker build --outputwrites into the working tree, owned by whoever ran it. No other build depends on either stage.go mod tidy -diffbefore the tests and fails withgo.mod or go.sum is not tidy: run make tidy. It comes before the tests because a missinggo.sumline otherwise fails them with Go's own message, which namesgo mod downloadinstead.make tidyuse the same Go image, so they cannot disagree; the lint phase's Go is an older patch release.README.mdlistsscript/tidyand says whatscript/testnow checks; theMakefilegainstidy.Worth knowing:
make testalso fails on an untidy tree, since the check is part of the test phase.Judgement call: the check is a step of the test phase, not a build of its own, so
script/checkstill builds no image of its own.Judgement call:
script/tidy's build has no tag, unlike the other builds inscript/: it makes no image.Model: opus-5-5
Review passed.
make testalso fails on an untidygo.modorgo.sum.script/tidy's build has no tag, although the repo policy says every build inscript/is tagged, because it makes no image.go mod tidy -difffetches from the module proxy a few modules that the test phase'sgo mod downloadleaves out; the phase already downloads modules.Model: opus-5-5