make test: over the 60-second cap at this host's usual load #292

Closed
opened 2026-11-10 14:26:53 +01:00 by clawbot · 2 comments
Collaborator

REPO_POLICIES.md caps make test at 60 seconds, with 20 as the target, and says an overage is filed as an improvement bug against the repo. The Dockerfile's test step took between 49 and 124 seconds on recent next commits, on a shared host whose load average was often above its 48 cores.

Known so far:

  • The time follows the host's load: internal/coreruleset used about 12 CPU-minutes under -race (#281 (comment)), so it takes far longer when other sessions hold the cores.
  • #290 moves the recorded-request tests out of the race pass. That protects the 90-second go test limit per test binary. By the review at #291 (comment), it does not shorten make test overall, since the second pass compiles again.

Definition of done:

  • make test measured on a quiet moment of this host and at its usual load, once #290 has landed, with where the time goes: image steps, the race build's compile, each pass's tests.
  • make test under 60 seconds at a quiet moment. Where that needs a change the policy's authors should decide, such as fewer packages under -race, the issue says so and is assigned to sneak with options and a recommendation, instead of the change being made.
  • No test, request or value is removed.

Model: opus-5-5

`REPO_POLICIES.md` caps `make test` at 60 seconds, with 20 as the target, and says an overage is filed as an improvement bug against the repo. The `Dockerfile`'s test step took between 49 and 124 seconds on recent `next` commits, on a shared host whose load average was often above its 48 cores. **Known so far:** - The time follows the host's load: `internal/coreruleset` used about 12 CPU-minutes under `-race` (https://git.eeqj.de/sneak/smallwebwaf/issues/281#issuecomment-173664), so it takes far longer when other sessions hold the cores. - https://git.eeqj.de/sneak/smallwebwaf/issues/290 moves the recorded-request tests out of the race pass. That protects the 90-second `go test` limit per test binary. By the review at https://git.eeqj.de/sneak/smallwebwaf/pulls/291#issuecomment-174218, it does not shorten `make test` overall, since the second pass compiles again. **Definition of done:** - `make test` measured on a quiet moment of this host and at its usual load, once https://git.eeqj.de/sneak/smallwebwaf/issues/290 has landed, with where the time goes: image steps, the race build's compile, each pass's tests. - `make test` under 60 seconds at a quiet moment. Where that needs a change the policy's authors should decide, such as fewer packages under `-race`, the issue says so and is assigned to sneak with options and a recommendation, instead of the change being made. - No test, request or value is removed. Model: opus-5-5
clawbot self-assigned this 2026-11-10 14:26:53 +01:00
Author
Collaborator

Plan. #291 has landed, so this starts from current next.

  • Measure first: run make test under the gate lock at least three times, and record the host's load average with each. Break the time down from the docker build output: image steps, the race pass (compile against tests), the second pass. This host is rarely quiet, so also state the package's total CPU seconds, and what make test would take with the cores free.
  • Cheap wins only, in test files and the Dockerfile's test phase: for example both go test commands sharing one RUN, so the build cache is shared. No test, request or value is removed.
  • Then: if make test is under 60 seconds with the cores free, post that on the issue with the breakdown and close it through the PR, or with no PR if nothing changed. If it is not, or if meeting it needs a choice about the policy (such as which packages run under -race), post the question as the issue's definition of done says: options in plain words, the recommendation, and assign the issue to sneak, then stop.

Follow AGENTS.md: checks only through make targets. flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check before any push; a flock timeout also exits 1, so read the output. Numbers go on the issue, not in the PR body. Start no subagent on another model.

Model: opus-5-5

**Plan.** https://git.eeqj.de/sneak/smallwebwaf/pulls/291 has landed, so this starts from current `next`. - **Measure first:** run `make test` under the gate lock at least three times, and record the host's load average with each. Break the time down from the `docker build` output: image steps, the race pass (compile against tests), the second pass. This host is rarely quiet, so also state the package's total CPU seconds, and what `make test` would take with the cores free. - **Cheap wins only, in test files and the `Dockerfile`'s test phase:** for example both `go test` commands sharing one `RUN`, so the build cache is shared. No test, request or value is removed. - **Then:** if `make test` is under 60 seconds with the cores free, post that on the issue with the breakdown and close it through the PR, or with no PR if nothing changed. If it is not, or if meeting it needs a choice about the policy (such as which packages run under `-race`), post the question as the issue's definition of done says: options in plain words, the recommendation, and assign the issue to sneak, then stop. Follow `AGENTS.md`: checks only through `make` targets. `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check` before any push; a `flock` timeout also exits 1, so read the output. Numbers go on the issue, not in the PR body. Start no subagent on another model. Model: opus-5-5
Author
Collaborator

Built in #296: the two test passes run at the same time, and the test stage's image is nearly empty.

make test, whole, measured 2026-11-10 between 15:09 and 15:54 UTC:

  • next at 3268ec9: 87, 83 and 99 seconds, load average 24 to 58.
  • This branch: 54, 63, 49, 68, 62 and 58 seconds, load average 18 to 64.

Where the time goes on this branch:

  • Image steps before the passes: 7 to 10 seconds. Of that, go mod tidy -diff is 4 to 6.
  • Race pass: 44 to 62 seconds, 8.7 CPU-minutes.
    • Compile: 30 to 44 seconds, to the first package's result.
    • Tests: internal/coreruleset takes 18 to 29 seconds and sets the rest.
  • Recorded-request pass, alongside the race pass: 19 to 28 seconds, 2.5 CPU-minutes.
    • Compile: 17 to 26 seconds.
    • Tests: 1 to 4 seconds.
  • Final copies and writing the image: under 3 seconds, from 5 to 12.

Definition of done:

  • Not shown: under 60 seconds at a quiet moment. In 15 minutes of waiting, the load average never fell below 18. The run that started at 18 took 62 seconds, as load rose to 41 during it. Three of the six runs were under 60 seconds, all at load 40 or above. With the cores free, I expect under 60, but that is an estimate.
  • The race pass alone now decides the time. If this is judged not met, what is left is fewer packages under -race, which is sneak's choice; I made no such change.
  • No test, request or value is removed.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/296: the two test passes run at the same time, and the `test` stage's image is nearly empty. **`make test`, whole, measured 2026-11-10 between 15:09 and 15:54 UTC:** - `next` at `3268ec9`: 87, 83 and 99 seconds, load average 24 to 58. - This branch: 54, 63, 49, 68, 62 and 58 seconds, load average 18 to 64. **Where the time goes on this branch:** - Image steps before the passes: 7 to 10 seconds. Of that, `go mod tidy -diff` is 4 to 6. - Race pass: 44 to 62 seconds, 8.7 CPU-minutes. - Compile: 30 to 44 seconds, to the first package's result. - Tests: `internal/coreruleset` takes 18 to 29 seconds and sets the rest. - Recorded-request pass, alongside the race pass: 19 to 28 seconds, 2.5 CPU-minutes. - Compile: 17 to 26 seconds. - Tests: 1 to 4 seconds. - Final copies and writing the image: under 3 seconds, from 5 to 12. **Definition of done:** - Not shown: under 60 seconds at a quiet moment. In 15 minutes of waiting, the load average never fell below 18. The run that started at 18 took 62 seconds, as load rose to 41 during it. Three of the six runs were under 60 seconds, all at load 40 or above. With the cores free, I expect under 60, but that is an estimate. - The race pass alone now decides the time. If this is judged not met, what is left is fewer packages under `-race`, which is sneak's choice; I made no such change. - No test, request or value is removed. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#292