The Linux numbers describe the head tree again

The rehearsal had been quoted from 8fba844 while the tree had moved three fixes
past it. All three stages were re-run separately at fc90f50, in containers:
source gates in mcr.microsoft.com/dotnet/sdk:10.0 (Ubuntu 24.04.5, SDK 10.0.401
resolving the pinned global.json) - unit 128/128, integration 99/99, smoke
passed 19 failed 0, build 0 warnings 0 errors; compose gate in docker:cli
against the host daemon - 43 passed, 0 failed; console gate in
mcr.microsoft.com/playwright:v1.63.0-noble with chromium-1243 - 44 assertions, 0
failed. The same suite on the macOS host at fc90f50 gives the same counts.

The workflow was also executed by the local Actions-compatible runner at this
commit: nektos/act 0.2.89 on catthehacker/ubuntu:act-latest, 5 jobs succeeded, 0
failed (lint, source, image, console with the screenshot artifact, freshness).
That is still not a GitHub-hosted runner - the repository has no remote - and
the README says so in the same sentence.

The admin API section gains the country-rule paragraph: PUT
/admin-api/countries/{code} checked only the length, so "12" and "U." were
stored, listed to the operator as denied, and obeyed by nobody, with no DELETE
to undo them.

Shape block: 89 -> 99 integration tests, 39 -> 44 console assertions.

actionlint exit 0; shellcheck 0.11.0 exit 0; node --check ok.
This commit is contained in:
Pavlo Ratushnyi
2026-10-02 03:25:17 +02:00
parent fc90f50de8
commit 72d37ad3f1
2 changed files with 48 additions and 27 deletions
+8 -7
View File
@@ -24,19 +24,20 @@
# What has been done to narrow the darwin/linux gap without a runner: # What has been done to narrow the darwin/linux gap without a runner:
# scripts/ci-linux-rehearsal.sh runs the gates in containers. Source gates # scripts/ci-linux-rehearsal.sh runs the gates in containers. Source gates
# (restore, build, unit, integration, smoke) in mcr.microsoft.com/dotnet/sdk:10.0 # (restore, build, unit, integration, smoke) in mcr.microsoft.com/dotnet/sdk:10.0
# - Ubuntu 24.04.5, SDK 10.0.401 resolving the pinned global.json: unit 126/126, # - Ubuntu 24.04.5, SDK 10.0.401 resolving the pinned global.json: unit 128/128,
# integration 73/73, smoke 19/19, first try (at 8fba844). Compose gate in docker:cli against # integration 99/99, smoke 19/19, first try (at fc90f50). Compose gate in docker:cli against
# the host daemon: 43/43 on Linux. Console gate in # the host daemon: 43/43 on Linux. Console gate in
# mcr.microsoft.com/playwright:v1.63.0-noble - the stack seeded by docker:cli, # mcr.microsoft.com/playwright:v1.63.0-noble - the stack seeded by docker:cli,
# the same console-check.cjs driving it in a real Linux Chromium: 39/39. The # the same console-check.cjs driving it in a real Linux Chromium: 44/44. The
# only wall clock ever measured for the source job is 1:02.81 cold (first # only wall clock ever measured for the source job is 1:02.81 cold (first
# rehearsal); later rehearsals were not re-timed, so that number is quoted as # rehearsal); later rehearsals were not re-timed, so that number is quoted as
# measured once, not as current. So every gate this file runs has a Linux # measured once, not as current. So every gate this file runs has a Linux
# number. What it does not have is a runner: the repository has no remote, so # number. What it does not have is a runner: the repository has no remote, so
# this file has never executed on GitHub. And the Linux numbers are as of # this file has never executed on GitHub. It has been executed by a local
# 8fba844: the rehearsal has not been re-run since, so a suite count quoted # Actions-compatible runner (nektos/act 0.2.89, catthehacker/ubuntu:act-latest)
# above (126/73/39) is one behind the tree at the head of this file, where the # at fc90f50: 5 jobs succeeded, 0 failed - lint, source (128/128, 99/99, smoke
# host run measured 128 unit, 89 integration and 42 console assertions. # 19/0), image (261 MB, compose smoke 43/0), console (44 assertions, screenshot
# artifact) and freshness (pin 2026-10 = newest 2026-10).
name: ci name: ci
+40 -20
View File
@@ -310,6 +310,21 @@ the same run prints "newest 25 of 42 recorded sources" and "Newest 25 of 274
alerts": the data volume survives `compose down`, which is precisely where a alerts": the data volume survives `compose down`, which is precisely where a
table that looks like a window stops being honest. table that looks like a window stops being honest.
A country rule is matched against the two-letter code the geo database returns,
so the code has to be two letters. `PUT /admin-api/countries/{code}` used to
check only the length, and on the shipped image `PUT /countries/12?allowed=false`
and `PUT /countries/U.?allowed=false` both answered 204: `GET /countries` then
listed `12: denied` and `U.: denied` while a source from the busiest country
still got through with a 404 — the operator's table claimed two countries were
denied and the edge enforced nothing (denying `US` for real turns that same
probe into 451, which is the difference the table was hiding). The code is now
refused by name — `code must be a two-letter ISO country code; got "12"` — and
`DELETE /admin-api/countries/{code}` takes a rule out of the table and out of
the snapshot, answering `no country rule for "ZZ"` when there is nothing to
remove. That second half matters because a rule used to be permanent: the
console gate's own comment read "a country rule cannot be deleted, only
overwritten", and the residue outlived `compose down` in the data volume.
`redirectTo` on a block is the one field that ends up in a response header, and `redirectTo` on a block is the one field that ends up in a response header, and
the shipped image used to accept any string in it — `POST /admin-api/blocks` the shipped image used to accept any string in it — `POST /admin-api/blocks`
answered 204 for all of these, and the next request from that source paid: answered 204 for all of these, and the next request from that source paid:
@@ -345,9 +360,10 @@ It also writes, with the two controls an incident actually reaches for: block
one address with a reason, and allowlist an address or CIDR with a note and an one address with a reason, and allowlist an address or CIDR with a note and an
optional expiry (the "my customer is locked out" control — an allow entry optional expiry (the "my customer is locked out" control — an allow entry
outranks every ban). Each ban row has a delete that removes that row, each allow outranks every ban). Each ban row has a delete that removes that row, each allow
row a remove, and each country row a rule toggle. There is no DELETE for a row a remove, and each country row a rule toggle plus — only when a rule
country rule, so the toggle back is `PUT ?allowed=true`: the row stays behind actually exists — a "remove rule" button. `DELETE /admin-api/countries/{code}`
and means "not denied". takes the rule out of the table and out of the snapshot; flipping it to
`allowed=true` does not, it leaves a row behind that only means "not denied".
The summary line states which geo database this edge is enforcing on, when it was The summary line states which geo database this edge is enforcing on, when it was
built and how old it is (marked past the 90-day runtime alarm), and the snapshot built and how old it is (marked past the 90-day runtime alarm), and the snapshot
age against the TTL it is measured against — because on a single edge the TTL is age against the TTL it is measured against — because on a single edge the TTL is
@@ -384,7 +400,7 @@ deployment.
The console gate starts the stack, seeds a source sitting at 2 of a threshold of The console gate starts the stack, seeds a source sitting at 2 of a threshold of
3 and an operator block with a reason, four 502s from an address chosen for this 3 and an operator block with a reason, four 502s from an address chosen for this
run (`/boom`, see the alerting note above), drives `/admin` in a real Chromium, run (`/boom`, see the alerting note above), drives `/admin` in a real Chromium,
and asserts 42 things. The read side: it authenticated, listed the streak as and asserts 44 things. The read side: it authenticated, listed the streak as
current-over-threshold rather than as a historical maximum, listed the operator current-over-threshold rather than as a historical maximum, listed the operator
block with its reason, listed observations and countries with bars that have block with its reason, listed observations and countries with bars that have
real pixel widths, said how many recorded sources the observation table is only real pixel widths, said how many recorded sources the observation table is only
@@ -399,7 +415,11 @@ then refused (301 with the policy's redirect Location — the probe uses
comes back 200, which is how this assertion first read as a failure while the comes back 200, which is how this assertion first read as a failure while the
edge was refusing the client the whole time), the per-row delete removes that one edge was refusing the client the whole time), the per-row delete removes that one
ban and the address reaches the upstream again, an allow entry appears with an ban and the address reaches the upstream again, an allow entry appears with an
expiry and can be removed, and a country rule can be set and put back. The quiet expiry and can be removed, and a country rule is written from no rule at all,
toggled both ways and then removed (`— → allowed → denied → —`). The gate used to
assume a US rule was already there, so on a fresh volume — where the first click
allows instead of denying — it failed; a gate that only passes on residue from
the previous run is not a gate. The quiet
failure mode is asserted too: typing `not-an-ip` into the block form has to come failure mode is asserted too: typing `not-an-ip` into the block form has to come
back as the API's own error (`not an IP address: not-an-ip`) with no new row, back as the API's own error (`not an IP address: not-an-ip`) with no new row,
because an operator who believes they blocked an address and did not is worse because an operator who believes they blocked an address and did not is worse
@@ -429,22 +449,22 @@ macOS working tree make the next `--no-build` try to exec an ELF file — inside
`mcr.microsoft.com/dotnet/sdk:10.0`. The compose gate runs in `docker:cli` `mcr.microsoft.com/dotnet/sdk:10.0`. The compose gate runs in `docker:cli`
against the host daemon, so the image build and the stack are Linux. against the host daemon, so the image build and the stack are Linux.
Rehearsed 2026-10-02, most recently at `8fba844` — the rehearsal has **not** Rehearsed 2026-10-02, most recently at `fc90f50`, each stage run on its own, so
been re-run past that commit, so every Linux number in this paragraph describes the numbers below describe the tree at the head of this file rather than a
`8fba844`, not the tree at the head of this file. What was measured at the head commit several fixes behind it. The same suite on the macOS host at `fc90f50`
(`0e2aee6`) is the same suite on the macOS host: unit **128/128**, integration gives the same counts: unit **128/128**, integration **99/99**, smoke **passed
**89/89**, smoke **passed 19, failed 0**, compose **43 passed, 0 failed**, 19, failed 0**, compose **43 passed, 0 failed**, console **44 assertions, 0
console **42 assertions, 0 failed**, image 261 MB. Source gates: Ubuntu failed**, image 261 MB. Source gates: Ubuntu
24.04.5, SDK **10.0.401** resolving `dotnet/global.json` (pinned `10.0.100`, 24.04.5, SDK **10.0.401** resolving `dotnet/global.json` (pinned `10.0.100`,
`rollForward: latestFeature` — which is also the answer to whether `rollForward: latestFeature` — which is also the answer to whether
`setup-dotnet` with `10.0.x` satisfies the pin), unit **126/126**, integration `setup-dotnet` with `10.0.x` satisfies the pin), unit **128/128**, integration
**73/73**, smoke **19/19**, first try, nothing to fix. The first **99/99**, smoke **19/19**, first try, nothing to fix. The first
rehearsal of this pipeline timed a cold container and a cold NuGet cache at rehearsal of this pipeline timed a cold container and a cold NuGet cache at
**1:02.81**; the runs after it were not re-timed, so that is the only wall clock **1:02.81**; the runs after it were not re-timed, so that is the only wall clock
measured here, and the source job's 25-minute timeout is not close either way. measured here, and the source job's 25-minute timeout is not close either way.
Compose gate on Linux: **43 passed, 0 failed** (27 before the geo-pin and Compose gate on Linux: **43 passed, 0 failed** (27 before the geo-pin and
alerting assertions, 41 before the alert-edge ones), enforcement lag 0 ms, 12 ms alerting assertions, 41 before the alert-edge ones), enforcement lag 0 ms, 12 ms
and 36 ms in three runs. Console gate on Linux: **39 assertions, 0 failed** — and 36 ms in three runs. Console gate on Linux: **44 assertions, 0 failed** —
described below. `scripts/geo-db-freshness.sh` was run described below. `scripts/geo-db-freshness.sh` was run
in `mcr.microsoft.com/dotnet/sdk:10.0` too: current pin answers 0, and a forced in `mcr.microsoft.com/dotnet/sdk:10.0` too: current pin answers 0, and a forced
`PIN=2026-05` answers 1 with the bump command, so the gate that decides whether `PIN=2026-05` answers 1 with the bump command, so the gate that decides whether
@@ -466,7 +486,7 @@ and the stack is torn down afterwards. That image ships the browsers but not the
npm package, so the script installs `playwright-core` into `/tmp` and points npm package, so the script installs `playwright-core` into `/tmp` and points
`PLAYWRIGHT_CORE` at it, mounting the repository read-only so the install never `PLAYWRIGHT_CORE` at it, mounting the repository read-only so the install never
lands in the working tree. Rehearsed the same day on Linux 7.0.12-linuxkit lands in the working tree. Rehearsed the same day on Linux 7.0.12-linuxkit
aarch64, node v24.20.0, `chromium-1243`: **39 assertions, 0 failed**, including aarch64, node v24.20.0, `chromium-1243`: **44 assertions, 0 failed**, including
the round-trip the page alone cannot fake — a ban drawn on the page answers 301 the round-trip the page alone cannot fake — a ban drawn on the page answers 301
on the next request from that address. All three scenes in one cold run: on the next request from that address. All three scenes in one cold run:
**2:14.33**. **2:14.33**.
@@ -475,11 +495,11 @@ on the next request from that address. All three scenes in one cold run:
Honest status of the workflow itself: it has never executed on a GitHub-hosted Honest status of the workflow itself: it has never executed on a GitHub-hosted
runner, because the repository has no remote. It *has* been executed start to runner, because the repository has no remote. It *has* been executed start to
finish by a local Actions-compatible runner — `nektos/act` 0.2.89 on finish by a local Actions-compatible runner — `nektos/act` 0.2.89 on
`catthehacker/ubuntu:act-latest`, most recently at `8fba844` — and every job `catthehacker/ubuntu:act-latest`, most recently at `fc90f50` — and every job
reported success: `lint` (both pinned tools download, verify their checksums reported success: `lint` (both pinned tools download, verify their checksums
and find nothing), `source` (unit 126/126, integration 73/73, smoke 19/19), and find nothing), `source` (unit 128/128, integration 99/99, smoke 19/19),
`image` (`openwaf:ci` 261 MB, compose smoke 43 passed / 0 failed), `console` `image` (`openwaf:ci` 261 MB, compose smoke 43 passed / 0 failed), `console`
(39 assertions / 0 failed with `playwright@1.63.0` and `chromium-1243`, (44 assertions / 0 failed with `playwright@1.63.0` and `chromium-1243`,
screenshot artifact published) and the `freshness` job (pin 2026-10 = newest screenshot artifact published) and the `freshness` job (pin 2026-10 = newest
2026-10). That is a stronger claim than 2026-10). That is a stronger claim than
"the steps were run by hand", and a weaker one than "CI is green": it proves the "the steps were run by hand", and a weaker one than "CI is green": it proves the
@@ -523,10 +543,10 @@ dotnet/
OpenWaf.Infrastructure/ EF Core (sqlite/postgres), snapshot store, writers, MMDB geo OpenWaf.Infrastructure/ EF Core (sqlite/postgres), snapshot store, writers, MMDB geo
OpenWaf.Edge/ the deployable: guard, observer, admin API, healthcheck mode OpenWaf.Edge/ the deployable: guard, observer, admin API, healthcheck mode
OpenWaf.Tests.Unit/ 128 tests over the decision logic OpenWaf.Tests.Unit/ 128 tests over the decision logic
OpenWaf.Tests.Integration/ 89 tests driving the real pipeline against a fake upstream OpenWaf.Tests.Integration/ 99 tests driving the real pipeline against a fake upstream
scripts/smoke.sh 19 assertions against a running edge + a real upstream scripts/smoke.sh 19 assertions against a running edge + a real upstream
scripts/compose-smoke.sh 43 assertions against the built image (compose + nginx) scripts/compose-smoke.sh 43 assertions against the built image (compose + nginx)
scripts/console-check.cjs 39 assertions against the page, in a real Chromium scripts/console-check.cjs 44 assertions against the page, in a real Chromium
scripts/geo-db-freshness.sh the pinned geo database vs the vendor (0/1/2) scripts/geo-db-freshness.sh the pinned geo database vs the vendor (0/1/2)
.github/workflows/ci.yml runs the gates on every push .github/workflows/ci.yml runs the gates on every push
.github/workflows/geo-freshness.yml the same check on a schedule .github/workflows/geo-freshness.yml the same check on a schedule