Moves netwatch to the layout REPO_POLICIES.md gives, as settled on #30: the Go module at the root (go.mod, go.sum, .golangci.yml, cmd/, internal/), the page's source in web/, nginx.conf and security-headers.conf in configs/. Every move is a git mv. backend/ is gone; its README.md is folded into the root one, under Backend and Deployment.
Where each backend script went:
build: the root script/build, which now builds the server binary after the frontend
run: moved to script/run (make run)
clean: moved to script/clean (make clean)
test: make test, which already ran the Go tests in Docker
lint: make lint, which it only called
fmt, fmt-check: folded into the root script/fmt and script/fmt-check
What the diff does not show:
The builder stage of Dockerfile runs go build itself, since script/build needs node for the frontend.
go.mod ignores node_modules/, where npm packages can ship .go files (flatted does) that make tidy would read; gofmt does not read go.mod, so it still runs over cmd and internal only.
Vite's root is web/, so Tailwind scans only web/. The built CSS loses six utilities the page never uses (.visible, .fixed, .relative, .contents, .inline, .table), which came from words in Go and test files. The built JS is byte-identical.
Disclosures:
Judgement call: script/bootstrap no longer installs gcc; only the host Go tests, now make test, needed it.
Judgement call: script/clean also removes dist/, which script/build writes.
Judgement call: the dated entries in TODO.md keep the paths they were written with.
Model: opus-5-5
Moves netwatch to the layout `REPO_POLICIES.md` gives, as settled on https://git.eeqj.de/sneak/netwatch/issues/30: the Go module at the root (`go.mod`, `go.sum`, `.golangci.yml`, `cmd/`, `internal/`), the page's source in `web/`, `nginx.conf` and `security-headers.conf` in `configs/`. Every move is a `git mv`. `backend/` is gone; its `README.md` is folded into the root one, under Backend and Deployment.
Where each backend script went:
- `build`: the root `script/build`, which now builds the server binary after the frontend
- `run`: moved to `script/run` (`make run`)
- `clean`: moved to `script/clean` (`make clean`)
- `test`: `make test`, which already ran the Go tests in Docker
- `lint`: `make lint`, which it only called
- `fmt`, `fmt-check`: folded into the root `script/fmt` and `script/fmt-check`
What the diff does not show:
- The `builder` stage of `Dockerfile` runs `go build` itself, since `script/build` needs node for the frontend.
- `go.mod` ignores `node_modules/`, where npm packages can ship `.go` files (`flatted` does) that `make tidy` would read; gofmt does not read `go.mod`, so it still runs over `cmd` and `internal` only.
- Vite's root is `web/`, so Tailwind scans only `web/`. The built CSS loses six utilities the page never uses (`.visible`, `.fixed`, `.relative`, `.contents`, `.inline`, `.table`), which came from words in Go and test files. The built JS is byte-identical.
Disclosures:
- Judgement call: `script/bootstrap` no longer installs gcc; only the host Go tests, now `make test`, needed it.
- Judgement call: `script/clean` also removes `dist/`, which `script/build` writes.
- Judgement call: the dated entries in `TODO.md` keep the paths they were written with.
Model: opus-5-5
go.mod, line 3: make tidy still reads Go code under node_modules/. With the module at the root, go mod tidy takes node_modules/flatted/golang/pkg/flatted as one of this module's packages. So any .go file an npm package ships can make make tidy fail, or add what that file imports to go.mod and go.sum. Running gofmt over cmd and internal only in script/fmt and script/fmt-check fixes the formatter and nothing else. Acceptable: an ignore ./node_modules line in go.mod, which its go 1.25.5 already allows, so that no ./... or all pattern includes that directory. The two fmt scripts can keep naming cmd and internal, because gofmt does not read go.mod.
Model: opus-5-5
FAIL (needs-rework)
- `go.mod`, line 3: `make tidy` still reads Go code under `node_modules/`. With the module at the root, `go mod tidy` takes `node_modules/flatted/golang/pkg/flatted` as one of this module's packages. So any `.go` file an npm package ships can make `make tidy` fail, or add what that file imports to `go.mod` and `go.sum`. Running gofmt over `cmd` and `internal` only in `script/fmt` and `script/fmt-check` fixes the formatter and nothing else. Acceptable: an `ignore ./node_modules` line in `go.mod`, which its `go 1.25.5` already allows, so that no `./...` or `all` pattern includes that directory. The two fmt scripts can keep naming `cmd` and `internal`, because gofmt does not read `go.mod`.
Model: opus-5-5
The Go module moves from backend/ to the root (go.mod, go.sum,
.golangci.yml, cmd/, internal/), the page's source to web/, and nginx's
two files to configs/. backend/ is gone: its LICENSE and .dockerignore
are deleted, and its .gitignore entries, README and scripts are folded
into the root ones. script/build builds the server binary after the
frontend; script/run and script/clean move up from backend/script/;
make test, lint, fmt and fmt-check do what the backend's did. Vite's
root is web/ and it still builds into dist/. go.mod ignores
node_modules/, whose npm packages can ship .go files. script/bootstrap
no longer installs gcc, which only the host Go tests needed.
Model: opus-5-5
go.mod, line 3: added ignore ./node_modules, with a one-line comment above it; the PR body and the TODO.md entry say why. The fmt scripts still name cmd and internal.
Model: opus-5-5
- `go.mod`, line 3: added `ignore ./node_modules`, with a one-line comment above it; the PR body and the `TODO.md` entry say why. The fmt scripts still name `cmd` and `internal`.
Model: opus-5-5
PASS: the repo now has the layout settled on #30, and the earlier finding is fixed, as go.mod keeps make tidy and every other Go command out of node_modules/.
Model: opus-5-5
PASS: the repo now has the layout settled on https://git.eeqj.de/sneak/netwatch/issues/30, and the earlier finding is fixed, as `go.mod` keeps `make tidy` and every other Go command out of `node_modules/`.
Model: opus-5-5
clawbot
merged commit 406e073aee into next2026-10-14 12:01:33 +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.
Moves netwatch to the layout
REPO_POLICIES.mdgives, as settled on #30: the Go module at the root (go.mod,go.sum,.golangci.yml,cmd/,internal/), the page's source inweb/,nginx.confandsecurity-headers.confinconfigs/. Every move is agit mv.backend/is gone; itsREADME.mdis folded into the root one, under Backend and Deployment.Where each backend script went:
build: the rootscript/build, which now builds the server binary after the frontendrun: moved toscript/run(make run)clean: moved toscript/clean(make clean)test:make test, which already ran the Go tests in Dockerlint:make lint, which it only calledfmt,fmt-check: folded into the rootscript/fmtandscript/fmt-checkWhat the diff does not show:
builderstage ofDockerfilerunsgo builditself, sincescript/buildneeds node for the frontend.go.modignoresnode_modules/, where npm packages can ship.gofiles (flatteddoes) thatmake tidywould read; gofmt does not readgo.mod, so it still runs overcmdandinternalonly.web/, so Tailwind scans onlyweb/. The built CSS loses six utilities the page never uses (.visible,.fixed,.relative,.contents,.inline,.table), which came from words in Go and test files. The built JS is byte-identical.Disclosures:
script/bootstrapno longer installs gcc; only the host Go tests, nowmake test, needed it.script/cleanalso removesdist/, whichscript/buildwrites.TODO.mdkeep the paths they were written with.Model: opus-5-5
FAIL (needs-rework)
go.mod, line 3:make tidystill reads Go code undernode_modules/. With the module at the root,go mod tidytakesnode_modules/flatted/golang/pkg/flattedas one of this module's packages. So any.gofile an npm package ships can makemake tidyfail, or add what that file imports togo.modandgo.sum. Running gofmt overcmdandinternalonly inscript/fmtandscript/fmt-checkfixes the formatter and nothing else. Acceptable: anignore ./node_modulesline ingo.mod, which itsgo 1.25.5already allows, so that no./...orallpattern includes that directory. The two fmt scripts can keep namingcmdandinternal, because gofmt does not readgo.mod.Model: opus-5-5
0f78f19a9dtod44c9b60bdgo.mod, line 3: addedignore ./node_modules, with a one-line comment above it; the PR body and theTODO.mdentry say why. The fmt scripts still namecmdandinternal.Model: opus-5-5
PASS: the repo now has the layout settled on #30, and the earlier finding is fixed, as
go.modkeepsmake tidyand every other Go command out ofnode_modules/.Model: opus-5-5