The README carries the pending-ban contract, and the numbers describe that tree

Numbers re-measured at dcf8a73: macOS host unit 128/128, integration 141/141,
smoke 28/0, compose 86/0, console 58/0, image 261 MB, 0 containers left behind.
Linux rehearsal, all three stages in one run: PASS — source (128/128, 141/141,
28/0), compose 86/0 with enforcement lag 13 ms, console 58/0, 0 containers left
behind. act at dcf8a73: 5 jobs succeeded, 0 failed — source (128/128, 141/141,
28/0), image (261 MB, compose 86/0), console (58 assertions, 524,624-byte
screenshot artifact), lint, freshness.

Prose: the cost of "readiness returns on a write, not on a timer" when the only
thing that produces that write is the attacker coming back — the t+30/60/90/120
measurement, the retry loop, and the statement that the readiness gate was not
loosened to get this.
This commit is contained in:
Pavlo Ratushnyi
2026-10-02 11:39:31 +02:00
parent dcf8a733a9
commit b90b647474
2 changed files with 38 additions and 19 deletions
+4 -4
View File
@@ -25,8 +25,8 @@
# 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
# - Ubuntu 24.04.5, SDK 10.0.401 resolving the pinned global.json: unit 128/128,
# integration 138/138, smoke 28/28, first try (at 336c2f7). Compose gate in docker:cli against
# the host daemon: 81/81 on Linux. Console gate in
# integration 141/141, smoke 28/28, first try (at dcf8a73). Compose gate in docker:cli against
# the host daemon: 86/86 on Linux. Console gate in
# 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: 58/58. The
# only wall clock ever measured for the source job is 1:02.81 cold (first
@@ -35,8 +35,8 @@
# number. What it does not have is a runner: the repository has no remote, so
# this file has never executed on GitHub. It has been executed by a local
# Actions-compatible runner (nektos/act 0.2.89, catthehacker/ubuntu:act-latest)
# at 336c2f7: 5 jobs succeeded, 0 failed - lint, source (128/128, 138/138, smoke
# 28/0), image (261 MB, compose smoke 81/0), console (58 assertions, screenshot
# at dcf8a73: 5 jobs succeeded, 0 failed - lint, source (128/128, 141/141, smoke
# 28/0), image (261 MB, compose smoke 86/0), console (58 assertions, screenshot
# artifact) and freshness (pin 2026-10 = newest 2026-10).
name: ci
+34 -15
View File
@@ -434,6 +434,25 @@ counted (`banWriteFailures`, `bansNotWritten`, `banLastWriteError`) and gates
`/readyz`. The ban then lands on the next refusal from that source, which is what
clears readiness: on a write, not on a timer.
That last clause used to have a cost nobody had measured. With the write path
broken and then REPAIRED — triggers dropped, zero triggers left, storage healthy
— and no further request from the banned source, `GET /readyz` answered **503**
at t+30, t+60, t+90 and t+120 s, with `banWriteFailures` and `bansNotWritten`
unmoved. The ban pillar clears only on a successful ban write, and the only
thing that produced one was the source crossing the threshold again. So the
signal an orchestrator uses to keep an edge in rotation was coupled to attack
traffic: the quieter the site, the longer a repaired edge sat out of service,
enforcing everything except one ban nobody had written. A ban the engine decided
and could not write is now kept and re-attempted by a hosted loop on the same
15 s cadence the observation writer uses. The sentence still runs from the moment
the ban was decided, so a retry that lands late cannot quietly lengthen it, and a
pending ban whose sentence expired first is counted (`bansNeverEnforced`) and
logged as never enforced rather than rewritten as a fresh, longer one.
`/admin-api/state` answers `bansPendingRetry` and `bansNeverEnforced`, because
without the first a healed storage failure is indistinguishable from a quiet
site. The readiness gate was not loosened to get this: the enforcement-path
boundary above still holds, what changed is that the failure repairs itself.
Which failures gate is now a stated boundary rather than a habit. The enforcement
path gates — the policy read, the snapshot read, the ban write. The reporting
pillars — observations, alerts, retention — are counted and shown and do not
@@ -687,26 +706,26 @@ 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`
against the host daemon, so the image build and the stack are Linux.
Rehearsed 2026-10-02, most recently at `336c2f7`, each stage run on its own, so
Rehearsed 2026-10-02, most recently at `dcf8a73`, each stage run on its own, so
the numbers below describe the tree at the head of this file rather than a
commit several fixes behind it. The same suite on the macOS host at `336c2f7`
gives the same counts: unit **128/128**, integration **138/138**, smoke **passed
28, failed 0**, compose **81 passed, 0 failed**, console **58 assertions, 0
failed**, image 261 MB. Source gates: Ubuntu
commit several fixes behind it. The same suite on the macOS host at `dcf8a73`
gives the same counts: unit **128/128**, integration **141/141**, smoke **passed
28, failed 0**, compose **86 passed, 0 failed**, console **58 assertions, 0
failed**, image 261 MB, 0 containers left behind. Source gates: Ubuntu
24.04.5, SDK **10.0.401** resolving `dotnet/global.json` (pinned `10.0.100`,
`rollForward: latestFeature` — which is also the answer to whether
`setup-dotnet` with `10.0.x` satisfies the pin), unit **128/128**, integration
**138/138**, smoke **28/28**, first try, nothing to fix. The first
**141/141**, smoke **28/28**, first try, nothing to fix. The first
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
measured here, and the source job's 25-minute timeout is not close either way.
Compose gate on Linux: **81 passed, 0 failed** (27 before the geo-pin and
Compose gate on Linux: **86 passed, 0 failed** (27 before the geo-pin and
alerting assertions, 41 before the alert-edge ones, 47 before the pillar-health
ones, 53 before the write-health ones, 63 before the ban-write ones, 72 before
the scenes were made non-vacuous, 74 before the query surface was refused rather
than dropped), enforcement lag 0 ms, 12 ms and 36 ms in
than dropped, 81 before the retry loop), enforcement lag 0 ms, 12 ms and 36 ms in
three runs, 12 ms at `a77ab53`, 13 ms at `6e6461a`, 11 ms at `c97c7a1`, 12 ms at
`7e081da`, 12 ms at `7b57c56`, 14 ms at `1bcc086`, 12 ms at `336c2f7`. Console gate on Linux: **58
`7e081da`, 12 ms at `7b57c56`, 14 ms at `1bcc086`, 12 ms at `336c2f7`, 13 ms at `dcf8a73`. Console gate on Linux: **58
assertions, 0 failed** — described below, 0 containers left behind. `scripts/geo-db-freshness.sh` was run
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
@@ -746,12 +765,12 @@ the stage re-run after it leaves 0 containers.
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
finish by a local Actions-compatible runner — `nektos/act` 0.2.89 on
`catthehacker/ubuntu:act-latest`, most recently at `336c2f7` — 5 jobs
`catthehacker/ubuntu:act-latest`, most recently at `dcf8a73` — 5 jobs
succeeded, 0 failed: `lint` (both pinned tools download, verify their checksums
and find nothing), `source` (unit 128/128, integration 138/138, smoke 28/28),
`image` (`openwaf:ci` 261 MB, compose smoke 81 passed / 0 failed), `console`
and find nothing), `source` (unit 128/128, integration 141/141, smoke 28/28),
`image` (`openwaf:ci` 261 MB, compose smoke 86 passed / 0 failed), `console`
(58 assertions / 0 failed with `playwright@1.63.0` and `chromium-1243`,
screenshot artifact published, 498,801-byte zip) and the `freshness` job (pin
screenshot artifact published, 524,624-byte zip) and the `freshness` job (pin
2026-10 = newest 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
YAML executes and the pinned tools resolve, not that GitHub's image agrees. The
@@ -794,9 +813,9 @@ dotnet/
OpenWaf.Infrastructure/ EF Core (sqlite/postgres), snapshot store, writers, MMDB geo
OpenWaf.Edge/ the deployable: guard, observer, admin API, healthcheck mode
OpenWaf.Tests.Unit/ 128 tests over the decision logic
OpenWaf.Tests.Integration/ 138 tests driving the real pipeline against a fake upstream
OpenWaf.Tests.Integration/ 141 tests driving the real pipeline against a fake upstream
scripts/smoke.sh 28 assertions against a running edge + a real upstream
scripts/compose-smoke.sh 81 assertions against the built image (compose + nginx)
scripts/compose-smoke.sh 86 assertions against the built image (compose + nginx)
scripts/console-check.cjs 58 assertions against the page, in a real Chromium
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