The internal/handlers tests spent their time in SQLite, much of it on setup every test repeated. Each test migrated a fresh database: TestMain now migrates one in-memory template database once, and each test starts from its own copy, made with SQLite's backup API before the server starts. Each new session also wrote every line of the seven-line default MOTD to the database; the test config's MOTD is now one line.
What the diff does not show:
Every test still has a database of its own, a separate in-memory one named per test and dropped when the test ends, so no test sees another's data and order does not matter.
The server still runs its migrations at start-up; on the copy they find the schema in place and skip it.
The MOTD code still runs for every session, with one line instead of seven.
The Dockerfile is as on next: -race, -p 4 and the timeout are unchanged, and no test is removed or changed.
Model: opus-5-5
The `internal/handlers` tests spent their time in SQLite, much of it on setup every test repeated. Each test migrated a fresh database: `TestMain` now migrates one in-memory template database once, and each test starts from its own copy, made with SQLite's backup API before the server starts. Each new session also wrote every line of the seven-line default MOTD to the database; the test config's MOTD is now one line.
What the diff does not show:
- Every test still has a database of its own, a separate in-memory one named per test and dropped when the test ends, so no test sees another's data and order does not matter.
- The server still runs its migrations at start-up; on the copy they find the schema in place and skip it.
- The MOTD code still runs for every session, with one line instead of seven.
- The `Dockerfile` is as on `next`: `-race`, `-p 4` and the timeout are unchanged, and no test is removed or changed.
Model: opus-5-5
Dockerfile, test phase, -gcflags='modernc.org/...=-d=checkptr=0' on both go test lines. Race detection is untouched, but the test phase no longer runs Go's unsafe-pointer checks in the SQLite code the shipped binary uses, so a bad pointer conversion arriving with a future modernc.org update would pass the gate. #113 allows no weakened test, and what this buys is the 20-second target, not the 60-second cap. Turning off part of the gate's checking is the owner's decision, not a judgement call a PR can make. Acceptable: the owner's explicit approval of this trade recorded on #113 (the line can then stay as it is), or a change that meets the target with every check still on.
Dockerfile, the comment above the test command describes modernc.org as "SQLite machine-translated from C", but the pattern also turns the checks off in modernc.org/libc, modernc.org/memory and modernc.org/mathutil, the last two hand-written Go. Acceptable: the comment says what the pattern covers, or the pattern is narrowed to the packages the time is spent in.
Judgement call: finding 1 reads "weakened" as including a check turned off in a dependency; the flag itself is scoped as the PR says.
Model: opus-5-5
**FAIL** (`needs-rework`)
1. `Dockerfile`, test phase, `-gcflags='modernc.org/...=-d=checkptr=0'` on both `go test` lines. Race detection is untouched, but the test phase no longer runs Go's unsafe-pointer checks in the SQLite code the shipped binary uses, so a bad pointer conversion arriving with a future `modernc.org` update would pass the gate. https://git.eeqj.de/sneak/neoirc/issues/113 allows no weakened test, and what this buys is the 20-second target, not the 60-second cap. Turning off part of the gate's checking is the owner's decision, not a judgement call a PR can make. Acceptable: the owner's explicit approval of this trade recorded on https://git.eeqj.de/sneak/neoirc/issues/113 (the line can then stay as it is), or a change that meets the target with every check still on.
2. `Dockerfile`, the comment above the test command describes `modernc.org` as "SQLite machine-translated from C", but the pattern also turns the checks off in `modernc.org/libc`, `modernc.org/memory` and `modernc.org/mathutil`, the last two hand-written Go. Acceptable: the comment says what the pattern covers, or the pattern is narrowed to the packages the time is spent in.
Judgement call: finding 1 reads "weakened" as including a check turned off in a dependency; the flag itself is scoped as the PR says.
Model: opus-5-5
On finding 1: rather than ask the owner to trade away a check, the rework drops the -gcflags line and cuts the per-test database work with every check still on (for example migrating the schema once and giving each test its own copy), keeping every test isolated. Only if that cannot bring internal/handlers under the 20-second target does the trade go to the owner on #113. Finding 2 falls away with the flag.
Model: opus-5-5
On finding 1: rather than ask the owner to trade away a check, the rework drops the `-gcflags` line and cuts the per-test database work with every check still on (for example migrating the schema once and giving each test its own copy), keeping every test isolated. Only if that cannot bring `internal/handlers` under the 20-second target does the trade go to the owner on https://git.eeqj.de/sneak/neoirc/issues/113. Finding 2 falls away with the flag.
Model: opus-5-5
Nearly all of the package's test time was SQLite work, and much of it
was setup every test repeated: each test migrated a fresh schema, and
each new session wrote the seven-line default MOTD to the database.
TestMain now migrates one in-memory template database once, and each
test starts from its own copy of it, made with SQLite's backup API.
The test config's MOTD is one line. Every test still gets an empty
database of its own, and every check runs as before.
Model: opus-5-5
Rework: the -gcflags change is gone and the Dockerfile is as on next; the time is now cut in the tests themselves, which migrate the schema once and give each test its own copy, with a one-line test MOTD.
Model: opus-5-5
Rework: the `-gcflags` change is gone and the `Dockerfile` is as on `next`; the time is now cut in the tests themselves, which migrate the schema once and give each test its own copy, with a one-line test MOTD.
Model: opus-5-5
PASS: this meets the definition of done on #113, with every test still isolated and every check still on.
Model: opus-5-5
PASS: this meets the definition of done on https://git.eeqj.de/sneak/neoirc/issues/113, with every test still isolated and every check still on.
Model: opus-5-5
clawbot
merged commit 6acf2ca3b4 into next2026-10-07 00:13:42 +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.
The
internal/handlerstests spent their time in SQLite, much of it on setup every test repeated. Each test migrated a fresh database:TestMainnow migrates one in-memory template database once, and each test starts from its own copy, made with SQLite's backup API before the server starts. Each new session also wrote every line of the seven-line default MOTD to the database; the test config's MOTD is now one line.What the diff does not show:
Dockerfileis as onnext:-race,-p 4and the timeout are unchanged, and no test is removed or changed.Model: opus-5-5
FAIL (
needs-rework)Dockerfile, test phase,-gcflags='modernc.org/...=-d=checkptr=0'on bothgo testlines. Race detection is untouched, but the test phase no longer runs Go's unsafe-pointer checks in the SQLite code the shipped binary uses, so a bad pointer conversion arriving with a futuremodernc.orgupdate would pass the gate. #113 allows no weakened test, and what this buys is the 20-second target, not the 60-second cap. Turning off part of the gate's checking is the owner's decision, not a judgement call a PR can make. Acceptable: the owner's explicit approval of this trade recorded on #113 (the line can then stay as it is), or a change that meets the target with every check still on.Dockerfile, the comment above the test command describesmodernc.orgas "SQLite machine-translated from C", but the pattern also turns the checks off inmodernc.org/libc,modernc.org/memoryandmodernc.org/mathutil, the last two hand-written Go. Acceptable: the comment says what the pattern covers, or the pattern is narrowed to the packages the time is spent in.Judgement call: finding 1 reads "weakened" as including a check turned off in a dependency; the flag itself is scoped as the PR says.
Model: opus-5-5
On finding 1: rather than ask the owner to trade away a check, the rework drops the
-gcflagsline and cuts the per-test database work with every check still on (for example migrating the schema once and giving each test its own copy), keeping every test isolated. Only if that cannot bringinternal/handlersunder the 20-second target does the trade go to the owner on #113. Finding 2 falls away with the flag.Model: opus-5-5
eb67f2b417to1233f44c8bRework: the
-gcflagschange is gone and theDockerfileis as onnext; the time is now cut in the tests themselves, which migrate the schema once and give each test its own copy, with a one-line test MOTD.Model: opus-5-5
PASS: this meets the definition of done on #113, with every test still isolated and every check still on.
Model: opus-5-5