main side of 414: cheaper test hashing, and failing tests visible in the build log (closes #414) #416

Open
clawbot wants to merge 2 commits from issue-414-main into main
Collaborator

The main side of #414: the two changes that make next green, and nothing else from next. Each is its own commit, so it can be compared with its next counterpart.

  • #404, as merged to next: a test binary hashes passwords at a 1 MB Argon2id cost instead of 64 MB, TestHashPassword_ShippedParameters keeps the shipped cost covered, and script/test runs at most four packages and eight parallel tests at once. Every test that starts a database hashed the admin password at 64 MB, which on a busy host made internal/handlers overrun its application start and its 90-second timeout. That is what turned main red.
  • #415: script/test runs without -v, so the build log, which the Docker build cuts off at 2 MiB, carries one result line per package and, for a package that fails, everything its tests wrote, application log lines included, instead of only passing packages.

What the diff does not show: script/test differs from next by one line. main has no script/assets yet, so it is not called. Several packages failing at once can still reach the 2 MiB limit.

  • Judgement call: both commits keep their subjects from next, including their closes references.
  • Deviation and not fixed here: the same two as on #415 (no -v rerun on failure, #315; remaining sensitivity to extreme CPU load, #225).

Model: opus-5-5

The `main` side of https://git.eeqj.de/sneak/webhooker/issues/414: the two changes that make `next` green, and nothing else from `next`. Each is its own commit, so it can be compared with its `next` counterpart. - https://git.eeqj.de/sneak/webhooker/pulls/404, as merged to `next`: a test binary hashes passwords at a 1 MB Argon2id cost instead of 64 MB, `TestHashPassword_ShippedParameters` keeps the shipped cost covered, and `script/test` runs at most four packages and eight parallel tests at once. Every test that starts a database hashed the admin password at 64 MB, which on a busy host made `internal/handlers` overrun its application start and its 90-second timeout. That is what turned `main` red. - https://git.eeqj.de/sneak/webhooker/pulls/415: `script/test` runs without `-v`, so the build log, which the Docker build cuts off at 2 MiB, carries one result line per package and, for a package that fails, everything its tests wrote, application log lines included, instead of only passing packages. What the diff does not show: `script/test` differs from `next` by one line. `main` has no `script/assets` yet, so it is not called. Several packages failing at once can still reach the 2 MiB limit. - Judgement call: both commits keep their subjects from `next`, including their `closes` references. - Deviation and not fixed here: the same two as on https://git.eeqj.de/sneak/webhooker/pulls/415 (no `-v` rerun on failure, https://git.eeqj.de/sneak/webhooker/issues/315; remaining sensitivity to extreme CPU load, https://git.eeqj.de/sneak/webhooker/issues/225). Model: opus-5-5
clawbot added the needs-review label 2026-10-02 05:12:33 +02:00
clawbot self-assigned this 2026-10-02 05:12:33 +02:00
clawbot added 1 commit 2026-10-02 05:12:33 +02:00
Every test that starts a database seeds the admin account, hashing its password with Argon2id at 64 MB, about 150 MB under -race, and internal/handlers and internal/database ran dozens of those at once. That was the memory, and most of internal/handlers' run time; the product code does not leak.

HashPassword now hashes at a 1 MB cost only when testing.Testing() reports a test binary, so every test package gets it with nothing to add and a binary built by go build always hashes at the shipped parameters. TestHashPassword_ShippedParameters still hashes and verifies through HashPassword at the shipped cost. script/test adds -p 4 -parallel 8.

Model: opus-5-5
Author
Collaborator

Review of #416 for #414: needs-rework.

  1. The new script/test comment says something the tree does not do. In script/test, the last sentence of the "No -v" paragraph ("Without it, go test prints only the output of failing tests and one result line per package") is wrong, and so is the same sentence in the second commit's message. A failing package prints everything its tests wrote to standard output, including the application's log lines from every passing test in that package, not only the output of the failing tests. That sentence is the stated reason the build log now stays under the 2 MiB limit. A reader who trusts it will not expect a red build with several failing packages to reach the limit again, which #415 itself says can happen. Acceptable: the comment and the commit message say what actually happens, for example "Without it, go test prints one result line for each passing package, and for a failing package everything its tests wrote, the application's log lines included." Use the same wording on #415 so the two stay identical.

Model: opus-5-5

Review of https://git.eeqj.de/sneak/webhooker/pulls/416 for https://git.eeqj.de/sneak/webhooker/issues/414: **needs-rework**. 1. **The new `script/test` comment says something the tree does not do.** In `script/test`, the last sentence of the "No -v" paragraph ("Without it, go test prints only the output of failing tests and one result line per package") is wrong, and so is the same sentence in the second commit's message. A failing package prints everything its tests wrote to standard output, including the application's log lines from every passing test in that package, not only the output of the failing tests. That sentence is the stated reason the build log now stays under the 2 MiB limit. A reader who trusts it will not expect a red build with several failing packages to reach the limit again, which https://git.eeqj.de/sneak/webhooker/pulls/415 itself says can happen. Acceptable: the comment and the commit message say what actually happens, for example "Without it, go test prints one result line for each passing package, and for a failing package everything its tests wrote, the application's log lines included." Use the same wording on https://git.eeqj.de/sneak/webhooker/pulls/415 so the two stay identical. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-02 06:03:48 +02:00
clawbot added 1 commit 2026-10-02 06:24:21 +02:00
The Docker build cuts each step's log off at 2 MiB. script/test ran
go test -v, whose output for the whole suite passed that limit before
any failure was printed, so a red build showed no failing test. Without
-v, go test prints one result line per package and, for a package that
fails, everything its tests wrote, application log lines included.
-race and the 90s per-package timeout are unchanged.

Model: opus-5-5
clawbot force-pushed issue-414-main from f539318411 to d871bf2d6c 2026-10-02 06:24:21 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-10-02 06:24:24 +02:00
Author
Collaborator

Finding 1: the script/test comment and the commit message now say that without -v, go test prints one result line per package and, for a package that fails, everything its tests wrote, application log lines included. The PR body says the same, as does #415, which has the identical change.

Model: opus-5-5

Finding 1: the `script/test` comment and the commit message now say that without `-v`, `go test` prints one result line per package and, for a package that fails, everything its tests wrote, application log lines included. The PR body says the same, as does https://git.eeqj.de/sneak/webhooker/pulls/415, which has the identical change. Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot added merge-ready and removed needs-review labels 2026-10-02 06:35:49 +02:00
clawbot removed their assignment 2026-10-02 06:35:49 +02:00
sneak was assigned by clawbot 2026-10-02 06:35:49 +02:00
Some checks are pending
check / check (push) Waiting to run
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-414-main:issue-414-main
git checkout issue-414-main
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#416