Two tests, and one package's run time, fail at random on a busy host. Any of them can turn the build red for a commit that is correct. Seen by the independent reviews of #505, which changes none of these tests:
TestAlpineRunsUnderTheSecurityPolicy (internal/server/alpine_browser_test.go) failed once in make test-browser: a page element was gone while the test read its value. It looks like the test reads before the page has finished loading.
TestRecoveryAndSweepDoNotDoubleDispatch (internal/delivery/inflight_test.go) failed once in an image build, with nothing dispatched, at host load 100 to 200. It looks like the test checks before dispatch has had time to happen.
The internal/handlers package hit the 90-second per-package test timeout (the test phase of the Dockerfile) in 2 of 6 runs at host load 260 to 290. At lower load it took 19 to 50 seconds. Since #505, lint and tests run at the same time in the image build.
Definition of done
The browser test waits for the page to finish loading before reading what it checks, and the delivery test waits for dispatch with a deadline instead of a fixed point in time. Each still fails when the behaviour it guards breaks: show this by breaking it once.
internal/handlers finishes well inside its timeout under load, made faster without weakening any test. Raising the timeout only to hide slowness is not a fix; if a raise is still needed, say why in the PR.
make check and make test-browser each pass five runs in a row on the shared host, through the gate lock.
Model: opus-5-5
Two tests, and one package's run time, fail at random on a busy host. Any of them can turn the build red for a commit that is correct. Seen by the independent reviews of https://git.eeqj.de/sneak/webhooker/pulls/505, which changes none of these tests:
- `TestAlpineRunsUnderTheSecurityPolicy` (`internal/server/alpine_browser_test.go`) failed once in `make test-browser`: a page element was gone while the test read its value. It looks like the test reads before the page has finished loading.
- `TestRecoveryAndSweepDoNotDoubleDispatch` (`internal/delivery/inflight_test.go`) failed once in an image build, with nothing dispatched, at host load 100 to 200. It looks like the test checks before dispatch has had time to happen.
- The `internal/handlers` package hit the 90-second per-package test timeout (the `test` phase of the `Dockerfile`) in 2 of 6 runs at host load 260 to 290. At lower load it took 19 to 50 seconds. Since https://git.eeqj.de/sneak/webhooker/pulls/505, lint and tests run at the same time in the image build.
## Definition of done
- The browser test waits for the page to finish loading before reading what it checks, and the delivery test waits for dispatch with a deadline instead of a fixed point in time. Each still fails when the behaviour it guards breaks: show this by breaking it once.
- `internal/handlers` finishes well inside its timeout under load, made faster without weakening any test. Raising the timeout only to hide slowness is not a fix; if a raise is still needed, say why in the PR.
- `make check` and `make test-browser` each pass five runs in a row on the shared host, through the gate lock.
Model: opus-5-5
clawbot
self-assigned this 2026-10-06 06:06:39 +02:00
The browser test now waits for each page a click opens (Save, Create Webhook, Save Changes, Edit, Open) to load, and for Alpine.js to start on it, before reading that page. When I broke it on purpose (a refused target edit no longer kept the name entered), the test failed on that check.
The delivery tests' drain takes what is already queued instead of racing a 25 ms timer: dispatch finishes before the test reads, and on a busy host the timer could win the pick over a queued task. When I broke it on purpose (recovery and the sweep no longer kept each other off a delivery), the test failed with the delivery dispatched 3 times.
internal/handlers: about 40% of its time on a busy host was SQLite waiting for the disk, so the test phase now keeps the tests' temporary directories on a tmpfs. Most of the rest is CPU spent creating each test's own databases, which keeps the tests apart, so it stays. The cap and the timeout are unchanged.
Run times, every run through the gate lock, one at a time (host load from start to end of each run):
make check: 240 s (22 to 21), 222 s (21 to 45), 379 s (66 to 124), 380 s (124 to 161), 329 s (161 to 123). internal/handlers took 12, 16, 18, 28 and 38 s of its 90 s. After rebasing onto next: 342 s (45 to 93), internal/handlers 37 s.
make test-browser: 117 s (123 to 66), 88 s (66 to 33), 112 s (33 to 73), 81 s (73 to 52), 81 s (52 to 49). The browser test took 11, 12, 25, 11 and 12 s of its 60 s.
Deviation: the delivery test does not wait for dispatch with a deadline, as the definition of done words it, because dispatch is already finished when it reads.
Partially verified: the host load during these runs went up to about 160, not to the 260 to 290 at which internal/handlers timed out.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/webhooker/pulls/510.
- The browser test now waits for each page a click opens (Save, Create Webhook, Save Changes, Edit, Open) to load, and for Alpine.js to start on it, before reading that page. When I broke it on purpose (a refused target edit no longer kept the name entered), the test failed on that check.
- The delivery tests' drain takes what is already queued instead of racing a 25 ms timer: dispatch finishes before the test reads, and on a busy host the timer could win the pick over a queued task. When I broke it on purpose (recovery and the sweep no longer kept each other off a delivery), the test failed with the delivery dispatched 3 times.
- `internal/handlers`: about 40% of its time on a busy host was SQLite waiting for the disk, so the test phase now keeps the tests' temporary directories on a tmpfs. Most of the rest is CPU spent creating each test's own databases, which keeps the tests apart, so it stays. The cap and the timeout are unchanged.
Run times, every run through the gate lock, one at a time (host load from start to end of each run):
- `make check`: 240 s (22 to 21), 222 s (21 to 45), 379 s (66 to 124), 380 s (124 to 161), 329 s (161 to 123). `internal/handlers` took 12, 16, 18, 28 and 38 s of its 90 s. After rebasing onto `next`: 342 s (45 to 93), `internal/handlers` 37 s.
- `make test-browser`: 117 s (123 to 66), 88 s (66 to 33), 112 s (33 to 73), 81 s (73 to 52), 81 s (52 to 49). The browser test took 11, 12, 25, 11 and 12 s of its 60 s.
- Deviation: the delivery test does not wait for dispatch with a deadline, as the definition of done words it, because dispatch is already finished when it reads.
- Partially verified: the host load during these runs went up to about 160, not to the 260 to 290 at which `internal/handlers` timed out.
Model: opus-5-5
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.
Two tests, and one package's run time, fail at random on a busy host. Any of them can turn the build red for a commit that is correct. Seen by the independent reviews of #505, which changes none of these tests:
TestAlpineRunsUnderTheSecurityPolicy(internal/server/alpine_browser_test.go) failed once inmake test-browser: a page element was gone while the test read its value. It looks like the test reads before the page has finished loading.TestRecoveryAndSweepDoNotDoubleDispatch(internal/delivery/inflight_test.go) failed once in an image build, with nothing dispatched, at host load 100 to 200. It looks like the test checks before dispatch has had time to happen.internal/handlerspackage hit the 90-second per-package test timeout (thetestphase of theDockerfile) in 2 of 6 runs at host load 260 to 290. At lower load it took 19 to 50 seconds. Since #505, lint and tests run at the same time in the image build.Definition of done
internal/handlersfinishes well inside its timeout under load, made faster without weakening any test. Raising the timeout only to hide slowness is not a fix; if a raise is still needed, say why in the PR.make checkandmake test-browsereach pass five runs in a row on the shared host, through the gate lock.Model: opus-5-5
Built in #510.
internal/handlers: about 40% of its time on a busy host was SQLite waiting for the disk, so the test phase now keeps the tests' temporary directories on a tmpfs. Most of the rest is CPU spent creating each test's own databases, which keeps the tests apart, so it stays. The cap and the timeout are unchanged.Run times, every run through the gate lock, one at a time (host load from start to end of each run):
make check: 240 s (22 to 21), 222 s (21 to 45), 379 s (66 to 124), 380 s (124 to 161), 329 s (161 to 123).internal/handlerstook 12, 16, 18, 28 and 38 s of its 90 s. After rebasing ontonext: 342 s (45 to 93),internal/handlers37 s.make test-browser: 117 s (123 to 66), 88 s (66 to 33), 112 s (33 to 73), 81 s (73 to 52), 81 s (52 to 49). The browser test took 11, 12, 25, 11 and 12 s of its 60 s.Deviation: the delivery test does not wait for dispatch with a deadline, as the definition of done words it, because dispatch is already finished when it reads.
Partially verified: the host load during these runs went up to about 160, not to the 260 to 290 at which
internal/handlerstimed out.Model: opus-5-5