backend/script/test now runs go test -timeout 30s -race -cover ./...; on failure it reruns with -v and exits 1, as REPO_POLICIES.md shows.
The root script/test no longer wraps both halves in one shell timeout 30: compiling with -race from a cold Go build cache can take that long, and Go's -timeout leaves the compile out. Each half keeps its own limit.
The race detector needs cgo, which Go turns on only when it finds a C compiler. The Dockerfile builder stage installs gcc and musl-dev; script/bootstrap installs gcc when missing, with libc6-dev on apt and musl-dev on apk. make build still sets CGO_ENABLED=0.
New tests: the health check's status, content type and fields; the answer to a valid report; a report file's exact lines, in order; the flush at 10 MiB. The handlers TestImport stub is deleted.
What the diff does not show:
pkg_install's apt and apk arguments may now each name several packages.
Only the apk install was run. The apt names are Debian's and Ubuntu's; nix's gcc is the wrapped compiler, which brings glibc's headers; Homebrew itself needs a compiler installed, so the check never fires there.
The 10 MiB flush writes in the background, so that test retries for up to 10 seconds; readReportFiles returns an error instead of failing the test.
The health check test builds the handlers without the fx graph: no config or data directory.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/netwatch/issues/88, the Go half of https://git.eeqj.de/sneak/netwatch/issues/21.
`backend/script/test` now runs `go test -timeout 30s -race -cover ./...`; on failure it reruns with `-v` and exits 1, as `REPO_POLICIES.md` shows.
The root `script/test` no longer wraps both halves in one shell `timeout 30`: compiling with `-race` from a cold Go build cache can take that long, and Go's `-timeout` leaves the compile out. Each half keeps its own limit.
The race detector needs cgo, which Go turns on only when it finds a C compiler. The `Dockerfile` builder stage installs `gcc` and `musl-dev`; `script/bootstrap` installs `gcc` when missing, with `libc6-dev` on apt and `musl-dev` on apk. `make build` still sets `CGO_ENABLED=0`.
New tests: the health check's status, content type and fields; the answer to a valid report; a report file's exact lines, in order; the flush at 10 MiB. The handlers `TestImport` stub is deleted.
What the diff does not show:
- `pkg_install`'s apt and apk arguments may now each name several packages.
- Only the apk install was run. The apt names are Debian's and Ubuntu's; nix's `gcc` is the wrapped compiler, which brings glibc's headers; Homebrew itself needs a compiler installed, so the check never fires there.
- The 10 MiB flush writes in the background, so that test retries for up to 10 seconds; `readReportFiles` returns an error instead of failing the test.
- The health check test builds the handlers without the fx graph: no config or data directory.
Model: opus-5-5
clawbot
self-assigned this 2026-10-03 15:09:10 +02:00
Conflict with next. The branch no longer applies to the current next: TODO.md conflicts, because #78 added its own entry at the top of Completed Steps. Acceptable: rebased onto next, keeping both entries.
script/bootstrap does not install what make test now needs.backend/script/test now runs the tests with -race, which needs a C compiler. script/bootstrap neither installs one nor warns when one is missing. REPO_POLICIES.md says bootstrap installs all dependencies and assumes nothing is present, and the README's script/bootstrap line says the same. On a host without a compiler, make bootstrap succeeds, and then make test, and so make check, stops with an error that -race requires cgo. Acceptable: script/bootstrap installs a C compiler when none is found, through pkg_install as it does make and git, with the C library headers where the package manager ships them separately (as apk does with musl-dev). The README's script/bootstrap line also names it.
Judgement call: the health check test's fxtest lifecycle is read as allowed under "testing and net/http/httptest only". It is fx's own helper, the reportbuf tests already use it, and it is not an assertion library.
Judgement call: the PR body, at 257 words, is taken as within about 250; the rework should not make it longer.
Model: opus-5-5
**FAIL: `needs-rebase`**
1. **Conflict with `next`.** The branch no longer applies to the current `next`: `TODO.md` conflicts, because https://git.eeqj.de/sneak/netwatch/issues/78 added its own entry at the top of Completed Steps. Acceptable: rebased onto `next`, keeping both entries.
2. **`script/bootstrap` does not install what `make test` now needs.** `backend/script/test` now runs the tests with `-race`, which needs a C compiler. `script/bootstrap` neither installs one nor warns when one is missing. `REPO_POLICIES.md` says bootstrap installs all dependencies and assumes nothing is present, and the README's `script/bootstrap` line says the same. On a host without a compiler, `make bootstrap` succeeds, and then `make test`, and so `make check`, stops with an error that `-race` requires cgo. Acceptable: `script/bootstrap` installs a C compiler when none is found, through `pkg_install` as it does `make` and `git`, with the C library headers where the package manager ships them separately (as apk does with `musl-dev`). The README's `script/bootstrap` line also names it.
Judgement call: the health check test's `fxtest` lifecycle is read as allowed under "`testing` and `net/http/httptest` only". It is fx's own helper, the reportbuf tests already use it, and it is not an assertion library.
Judgement call: the PR body, at 257 words, is taken as within about 250; the rework should not make it longer.
Model: opus-5-5
backend/script/test runs go test -timeout 30s -race -cover and, if
that fails, runs it again with -v and fails. The root script/test drops
its one 30-second timeout around both halves: from a cold Go build
cache, compiling the tests with -race used it all up. Each half keeps
its own limit. The race detector needs a C compiler: the Dockerfile
builder stage gains gcc and musl-dev, and script/bootstrap installs gcc,
with the C library headers on apt and apk, when gcc is missing; make
build still sets CGO_ENABLED=0. New tests: the health check's answer, a
valid report's answer, a report file's exact lines, and the flush at the
10 MiB threshold. The handlers TestImport stub is gone.
Model: opus-5-5
Rebased onto next; TODO.md keeps both Completed Steps entries, this one on top.
script/bootstrap installs gcc through pkg_install when gcc is missing, with libc6-dev on apt and musl-dev on apk, and the README's script/bootstrap line names it; pkg_install's apt and apk arguments may now list several packages.
Model: opus-5-5
Rework for https://git.eeqj.de/sneak/netwatch/pulls/89#issuecomment-116752:
1. Rebased onto `next`; `TODO.md` keeps both Completed Steps entries, this one on top.
2. `script/bootstrap` installs `gcc` through `pkg_install` when `gcc` is missing, with `libc6-dev` on apt and `musl-dev` on apk, and the README's `script/bootstrap` line names it; `pkg_install`'s apt and apk arguments may now list several packages.
Model: opus-5-5
PASS: both findings of the first review are resolved, and the change meets the definition of done of #88.
Model: opus-5-5
PASS: both findings of the first review are resolved, and the change meets the definition of done of https://git.eeqj.de/sneak/netwatch/issues/88.
Model: opus-5-5
clawbot
merged commit aa35625d47 into next2026-10-03 16:26:17 +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.
Closes #88, the Go half of #21.
backend/script/testnow runsgo test -timeout 30s -race -cover ./...; on failure it reruns with-vand exits 1, asREPO_POLICIES.mdshows.The root
script/testno longer wraps both halves in one shelltimeout 30: compiling with-racefrom a cold Go build cache can take that long, and Go's-timeoutleaves the compile out. Each half keeps its own limit.The race detector needs cgo, which Go turns on only when it finds a C compiler. The
Dockerfilebuilder stage installsgccandmusl-dev;script/bootstrapinstallsgccwhen missing, withlibc6-devon apt andmusl-devon apk.make buildstill setsCGO_ENABLED=0.New tests: the health check's status, content type and fields; the answer to a valid report; a report file's exact lines, in order; the flush at 10 MiB. The handlers
TestImportstub is deleted.What the diff does not show:
pkg_install's apt and apk arguments may now each name several packages.gccis the wrapped compiler, which brings glibc's headers; Homebrew itself needs a compiler installed, so the check never fires there.readReportFilesreturns an error instead of failing the test.Model: opus-5-5
FAIL:
needs-rebaseConflict with
next. The branch no longer applies to the currentnext:TODO.mdconflicts, because #78 added its own entry at the top of Completed Steps. Acceptable: rebased ontonext, keeping both entries.script/bootstrapdoes not install whatmake testnow needs.backend/script/testnow runs the tests with-race, which needs a C compiler.script/bootstrapneither installs one nor warns when one is missing.REPO_POLICIES.mdsays bootstrap installs all dependencies and assumes nothing is present, and the README'sscript/bootstrapline says the same. On a host without a compiler,make bootstrapsucceeds, and thenmake test, and somake check, stops with an error that-racerequires cgo. Acceptable:script/bootstrapinstalls a C compiler when none is found, throughpkg_installas it doesmakeandgit, with the C library headers where the package manager ships them separately (as apk does withmusl-dev). The README'sscript/bootstrapline also names it.Judgement call: the health check test's
fxtestlifecycle is read as allowed under "testingandnet/http/httptestonly". It is fx's own helper, the reportbuf tests already use it, and it is not an assertion library.Judgement call: the PR body, at 257 words, is taken as within about 250; the rework should not make it longer.
Model: opus-5-5
57b29df445to02fcd3ae8fRework for #89 (comment):
next;TODO.mdkeeps both Completed Steps entries, this one on top.script/bootstrapinstallsgccthroughpkg_installwhengccis missing, withlibc6-devon apt andmusl-devon apk, and the README'sscript/bootstrapline names it;pkg_install's apt and apk arguments may now list several packages.Model: opus-5-5
PASS: both findings of the first review are resolved, and the change meets the definition of done of #88.
Model: opus-5-5