main
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
925fc62d4b |
the gate's claim about its own writes was false, and the gate now counts it
ci / lint the workflow and the shell (push) Successful in 8s
ci / build, test, smoke (push) Successful in 1m45s
ci / the operator page in a real browser (push) Successful in 2m12s
ci / the same smoke on an image with no base (push) Successful in 4m20s
ci / build the image and smoke it (push) Successful in 4m20s
|
||
|
|
a8f440b933 |
a write that never reached the edge stops taking four assertions down with it
ci / lint the workflow and the shell (push) Successful in 10s
ci / build, test, smoke (push) Successful in 2m17s
ci / the operator page in a real browser (push) Successful in 2m41s
ci / build the image and smoke it (push) Successful in 4m48s
ci / the same smoke on an image with no base (push) Successful in 4m43s
Measured 2026-10-06 (/tmp/compose-diag.log, recorded in the README's Gates section): one POST of a /29 answered 000 while the edge container reported running/healthy — the gate could not reach a live edge, with another project's dotnet suite running on the same daemon — and four assertions about a range went red about a row that was never written. One of those four was worse than red: a bare `next()` over the block listing raised StopIteration into the log, the OPEN-48 shape again in a third place. OPEN-77 asked which rule the gate should have here. The rule it has now: a write whose request got no answer at all is retried, three times, and each retry prints the container's own state; a refusal is an answer, so 400 and 403 come back after one attempt untouched; and the retry is bounded, so a surface that is really closed still goes red rather than spinning. Retrying a write that got no response is safe on this surface because every write it takes is keyed and idempotent — the six-parallel-POSTs scene asserts that one address lands as one row, the transfer scene asserts that importing the same document twice adds nothing — and both of those are assertions, not assumptions. All 33 admin writes in the gate now go through admin_write; the three bare next() reads answer no-pillar / no-record / no-such-row instead of tracebacks; and the dead-edge scene asserts the retry against a container that is really stopped: the write still answers 000, and it says so three times. Two assertions, 373 -> 375. Measured here: compose-smoke 375 passed / 0 failed against the chiseled image and 375 / 0 against the scratch image, same arm64 host; readme-counts agrees (375=375); shellcheck 0.11.0 clean over scripts/*.sh. Against a stubbed `code` that answers 000 twice and then 204, admin_write returns 204 after three attempts with two retry lines; a 400 comes back after one attempt with none. Neither green run printed a retry line — the host was quiet — which is why the rule is asserted by a scene that stops the edge rather than by waiting to catch another flake. |
||
|
|
179e0f51a0 |
two compose-gate assertions reported a pass about an edge that had never started
ci / build, test, smoke (push) Successful in 3m54s
ci / the same smoke on an image with no base (push) Successful in 4m2s
ci / lint the workflow and the shell (push) Successful in 7s
ci / the operator page in a real browser (push) Successful in 2m23s
ci / build the image and smoke it (push) Successful in 4m1s
The NativeAOT measurement run of 2026-10-06 (/tmp/aot-smoke.log, the tree that
became
|
||
|
|
be6c608ada |
the edge ships on an image with no base, and the 368 assertions agree it behaves
ci / the operator page in a real browser (push) Successful in 2m38s
ci / lint the workflow and the shell (push) Successful in 13s
geo-freshness / the pinned geo database vs the vendor (push) Successful in 4s
ci / build, test, smoke (push) Successful in 2m48s
ci / build the image and smoke it (push) Successful in 4m23s
ci / the same smoke on an image with no base (push) Successful in 5m3s
Dockerfile.scratch builds the same program self-contained and puts it on scratch: 12 shared objects and the CA bundle — 18.7 MB — carried at their absolute paths, because a scratch layer has nothing to borrow them from, and the dynamic loader has to land at the path recorded inside the binary or the kernel refuses to start the process. Measured on one arm64 host: chiseled 262 MB, scratch 222 MB. scripts/compose-smoke.sh runs against it unchanged through docker-compose.scratch.yml: 368 passed, 0 failed, and 368/0 again when the same gate is called as scripts/ci-gates.sh scratch-smoke. The first scratch image built here is why that second run matters. It started, its own HEALTHCHECK reported healthy, and it still failed 7 of the 368. A self-contained apphost takes its content root from the process's working directory, a scratch image has no WORKDIR, so the process began in /, never found the appsettings.json next to it, the reverse proxy had no routes, and every request that should have reached the upstream answered the edge's own 404 — including /boom's 502, which turned the "server errors alert, they never ban" scene into a streak ban. The edge said it in its own log: "Request reached the end of the middleware pipeline without being handled by application code." The schema-script gate was red on the runner at |
||
|
|
7c5e1ef230 |
the edge gains a schema step a compiled binary can run, and NativeAOT gets a measured verdict
ci / lint the workflow and the shell (push) Successful in 10s
geo-freshness / the pinned geo database vs the vendor (push) Successful in 5s
ci / the operator page in a real browser (push) Successful in 3m42s
ci / build, test, smoke (push) Failing after 2m6s
ci / build the image and smoke it (push) Successful in 5m7s
The Dockerfile said "why not NativeAOT" on the authority of another repo's
Dockerfile. That claim is now this repo's own, and it is a measurement.
What was built to find out:
* Persistence/Schema/schema.sqlite.sql — the model's DDL, generated by
`dotnet ef dbcontext script`, embedded in the binary and read by
Persistence/EmbeddedSchema.cs. A NativeAOT build cannot ask EF to build a
model at run time, and EnsureCreated and GenerateCreateScript both go through
the design-time model, so the schema step has nowhere to get its SQL from.
OPENWAF_SCHEMA=script is the fourth strategy: same provider-shaped
statements, produced at build time instead of at start-up. The schema-script
CI step regenerates the file and fails the run when the committed copy is not
what the current model produces (5652 bytes today).
* SchemaUpgrader.ModelTables asks the runtime model, per entity type. The
design-time one is refused outright under NativeAOT, and GetRelationalModel()
on the runtime model of a compiled model throws
"The annotation 'Relational:DefaultMappings' cannot be added because an
annotation with the same name already exists on the object EntityType:
CountryRule" — building a compiled model's relational model a second time
collides with itself.
* The persistence layer's queries were rewritten into the shape EF's query
precompiler accepts: captured parameters copied to locals, conditional
IQueryable composition written as literal chains, aggregates that take a
predicate given their own Where. 40 of them were refused before that.
* dotnet-ef and EF Core moved 10.0.0 -> 10.0.12, because 10.0.0's design package
ships no build host and `--precompile-queries` cannot load a project without it.
What the measurement says, from scripts/aot-probe.sh on osx-arm64: the AOT build
compiles (48,797,072-byte native binary, 10 IL warnings, 0 errors), starts, and
creates all 12 tables from the DDL it carries. Then it never serves. EF refuses
every query at run time ("Query wasn't precompiled and dynamic code isn't
supported with NativeAOT"), and the precompiler that would fix that is not
usable on this model: after all 40 refusals were cleared it emitted 14
declarations with dots in the identifier
(`var openWaf.Domain.Security.BlockEntryPrimaryKeyProperties = …`) — 28 CS1002
and CS1003 errors, one per entity materialisation — with or without --nativeaot.
The refusals themselves trace to dotnet/efcore#35887, #38030 and #35494; the fix
landed in the 12.0-preview1 milestone, not in any 10.0.x.
Two things were not kept, and why:
* The atomic alert-queue claim and the claim release were rewritten as raw SQL
to dodge the precompiler's ExecuteUpdate failures. Reverted: with the
statement written as SQL, DateTimeOffset reaches sqlite as a provider
parameter instead of through the property's own mapping, the reclaim
comparison stops matching, and
AlertPushQueueTests.A_delivery_owed_by_a_process_that_stopped_is_owed_by_the_next_one
fails with the row still owed. A correctness risk here buys nothing when the
AOT build is blocked further along anyway.
* --nativeaot on the compiled model: its unsafe accessors do not compile
(CS1503 in BlockEntryEntityType.cs). The plain compiled model is what is
committed.
The compose gate's two escalation-count scenes also stopped being a coin toss.
They slept a fixed 2 s and then counted; on a loaded host the same tree read 3
rows once and 1 the next, and the assertion is about a settled number either
way. They now wait for three equal reads, bounded. The scene count is unchanged
at 368.
Gates at this commit: build 0 warnings / 0 errors, unit 378/378, integration
405/405, schema-script ok, smoke 256/0, compose-smoke 368/0, README counts
match (256, 368), lint clean (actionlint 1.7.12, shellcheck 0.11.0).
Not verified: the AOT image on linux-x64 — the probe ran on osx-arm64, and the
ILC failure mode that ends the attempt is a codegen bug in EF, not a
platform-specific one, but that is an inference rather than a measurement.
|
||
|
|
cd5935b28e |
the gates gain the proof their own claims were missing, and the README has to pay for its numbers
compose-smoke.sh: the read-side redirect guard is proven on the shipped image at last — a good target is written through the API, the stored column is rewritten underneath a running edge through the sidecar, and the edge is asked what it sends once the snapshot rebuilds. javascript:alert(1) answers 301 to the policy default and never to the stored value; a CRLF-bearing row answers 301 rather than the 500 Kestrel used to produce, and injects nothing. A curl 000 now samples the container it was aimed at and prints what it reports, and the gate ends by making the dead case happen on purpose: compose stop, 000 beside exited/unhealthy, compose start, running/healthy again. console-check.cjs: the observation table is waited for rather than read at one instant (an act run saw X-Total-Count: 0 where the same head a minute earlier had 11 rows), and the page's own request paths are pinned — the 14 admin-api calls it issues, their query strings, no others, none answered 404. A wrong URL on a page never looks like a wrong URL; it looks like an empty table. ci-gates.sh gains readme-counts: each gate records the total it actually ran into GATE_TOTALS_DIR and the README's claimed number is compared with it. Its first verdict was that the README claimed 229 assertions for a gate printing 368 — a 139-assertion gap nothing could see. The README now says 368 and 168, both measured in this run, and the run-by-run table gains 2405. Verified locally: compose smoke 368/0, console 168/0, smoke 256/0, lint green at actionlint 1.7.12 and shellcheck 0.11.0. |
||
|
|
249e3f93b5 |
the gates gain the assertions they were missing, and lint gains a local caller
Four gaps named on the board, each closed by making the shipped image answer the
question instead of an in-process test:
OPEN-45 - three pagination bounds were proven only in-process. On the image now:
the block listing's ceiling at its UPPER end (limit=2001 -> 400 naming
"limit must be 1..2000; got 2001" - only the lower end was on the image), a
negative offset on the streak map (checked on observations, blocks and alerts,
never here), and that an offset on the alert listing moves to a different row -
the scene used to assert only the truncation arithmetic.
OPEN-49 - DELETE /admin-api/countries/{code} validates the code the same way the
write does, and nothing on the image had ever asked. Three checks added: "12" and
"USA" are refused with the write's own sentence, not answered as if a row existed.
OPEN-48 - jval piped the body straight into json.load, so a request that produced
no body printed a Python traceback into the middle of an assertion and the
assertion compared an empty string. "the counter is 0", "the field is missing"
and "there was no answer at all" were the same word in the log. Three states,
three answers now: NO_JSON_BODY, empty, the value.
OPEN-41 - the markup-path assertion read the observation table once. That row is
written by the coalesced observation writer, so its arrival is on a timer: two
runs of one head at
|
||
|
|
7afa7541a2 |
The geo pin has a shelf life now, and a gate that checks it
The Dockerfile pins `ARG DBIP_VERSION=YYYY-MM`, and moving that pin was a habit
someone kept by hand: 2026-10 on 2026-10-01, 2026-09 the month before that. The
runtime answer was not better. `/healthz`'s `geoStale` is a 90-day alarm, and a
month behind is not 90 days. Measured on this tree: a container whose named
volume held `dbip-country-lite-2026-09` while the Dockerfile asked for `2026-10`
reported `geoBuiltAt: 2026-09-01T01:32:45+00:00` and `geoStale: false` — and
every geo assertion in `compose-smoke.sh` stayed green, the country deny list
still refusing 8.8.8.8 with 451. The policy was being enforced on a database
nobody chose, reported as healthy.
Three pieces:
- `scripts/geo-db-freshness.sh` compares the pin with the newest release the
vendor actually serves (14 HEAD probes, newest first). Three exit codes, not
two: 0 current, 1 the vendor has something newer, 2 could not tell — no
network, or a pin the vendor has never served, which would make the image
build fail on a 404. `MACHINE=1` prints one line for the bump script.
- `scripts/geo-db-bump.sh` rewrites the ARG and prints the two commands that
make the new database actually land. It refuses to write anything when the
check could not run: a pin moved on the strength of a check that did not run
is worse than a pin left alone.
- `.github/workflows/geo-freshness.yml` runs the check on the 1st and the 8th
(dbip publishes on the 1st; the second date catches a late publish or one
failed run). It deliberately does not open a PR — a bot that cannot run the
geo assertions bumping a data dependency is a worse default than a red job.
`scripts/compose-smoke.sh` grew the assertion that ties the pin to the running
container: `the loaded geo database is the pinned one`. Its teeth were checked,
not assumed — the stale volume above produced exactly one failure:
FAIL the loaded geo database is the pinned one Dockerfile pins 2026-10, the container loaded 2026-09
a named volume is seeded once: docker volume rm openwaf_openwaf-geoip
compose smoke: 27 passed, 1 failed
and after `docker volume rm`, **28 passed, 0 failed**.
Numbers on this tree. Host, `scripts/ci-gates.sh all`, EXIT=0: build 0 warnings,
unit 54/54, integration 28/28, smoke 19/19, image 261 MB, compose-smoke 28/28.
Linux rehearsal (third run today), EXIT=0: source PASS (54/54, 28/28, 19/19),
compose 28/28 with enforcement lag 36 ms, console 26/26. The freshness script
itself in `mcr.microsoft.com/dotnet/sdk:10.0`: current pin exits 0, a forced
`PIN=2026-05` exits 1 with the bump command. actionlint 1.7.12 over both
workflow files: 0 problems; shellcheck and `bash -n` clean.
Honest edges. The scheduled job has never run, because the repository has no
remote; and GitHub disables schedules on a repository with no push for 60 days,
so a cron is a nudge with a failure mode. A red freshness job can mean "no
network" rather than "stale" — the message names which, and exit 2 is not exit 0.
|
||
|
|
66df999cdf |
The country table got a shape, and the page caught me colliding with itself
The console's country view was a column of numbers. "Where is this traffic
coming from" is a comparison, so each row now carries a bar sized against the
busiest country, and the table says what it counted. No tiles, no CDN, no asset
file: the runtime image is distroless and the page has to work at the moment the
site in front of it is being attacked. A geographic map is still not here and
the README now says why plainly — the admin API exposes counts per ISO code, not
coordinates, and an outline drawn from memory would be decoration that misleads.
The first run after the change failed, for a real reason: the class I added was
`.bar`, and the page already had a `.bar` — the toolbar. The toolbar collapsed
to 0.55em tall, `div#summary` started intercepting pointer events, and every
assertion after the token click died on a click timeout. Renamed to
`.sharebar`.
The gate itself got the same treatment as the page. It used to leave a reviewer
with nothing but a stack trace; now it writes a screenshot both when the page
cannot be driven at all and when it is driven and wrong. That path was checked
by making it red on purpose: with seeds that do not match the stack it exits 1
naming 3 failed assertions and writes a 105078-byte picture.
Measured, not assumed, in the same pass:
- `ci-gates.sh` gained a `console` gate and the workflow calls it by that name
instead of retyping the script: one definition, two callers. It is
deliberately NOT in `all` — without a Chromium the gate exits 2 ("cannot
run"), which is a different answer from 1 ("the page is wrong"), and folding
it in would make the one-command entry point unrunnable off a CI runner.
- `ci-gates.sh all` no longer stops at the last gate for want of an admin
token: it was dying at compose-smoke with `OPENWAF_ADMIN_TOKEN: set …` before
it could print a verdict. The throwaway for the stack the gate starts and
tears down itself is defaulted there; the standalone scripts still refuse to
invent one, because run by hand they can be pointed at a real deployment.
- The console job publishes the desktop and phone screenshots as artifacts,
with `if: always()` so the failure case is the one you can look at. The
relative SCREENSHOT path and the `console-evidence*.png` glob were verified
locally: 107935 and 86179 bytes written.
- DBIP_VERSION 2026-09 -> 2026-10. Not a cache hit: 8348509 bytes fetched,
image 261 MB, compose smoke 27/27 afterwards.
- The trap that bump exposes, measured rather than reasoned about: the same
rebuilt image reported `geoBuiltAt: 2026-09-01T01:32:45Z` against the
existing `openwaf_openwaf-geoip` volume and `2026-10-01T01:36:12Z` after
removing it. Docker seeds a named volume from the image only when the volume
is first created, so a rebuild alone never replaces the geo database.
Gates on this commit: build 0 warnings / 0 errors, unit 54/54, integration
27/27, smoke 19/19, image 261 MB, compose-smoke 27/27, console 16/16 (desktop
bar 513 px inside a 529 px cell; phone pass at 375 px in dark mode: scrollWidth
375, status contrast 11.85:1, bars 67 px), actionlint 0, shellcheck 0. Still
true, and unchanged by any of the above: not one of these jobs has run on a
runner, because the repository has no remote.
|
||
|
|
b9a6c7e532 |
One definition of a gate, and a gate for the page itself
OPEN-10's honest caveat has always been the same sentence: the workflow has never executed on a runner, so it proves what CI will run rather than being green. That gap cannot be closed from this machine — the repository has no remote — but the gap behind it can. Until now ci.yml retyped every command, so "an agent ran these commands on a laptop" and "CI runs these commands" were two claims that could drift apart without anyone noticing. scripts/ci-gates.sh is now the single definition: restore, build, unit, integration, smoke, image, compose-smoke, or all. The workflow calls one gate per step, so the job log still names the gate that failed, and an operator running scripts/ci-gates.sh all before pushing is running the same file. The console had no gate at all. Its evidence was an agent driving Chromium from a script in /tmp. scripts/console-smoke.sh starts the stack, seeds a source sitting at 2 of a threshold of 3 and an operator block with a reason, drives /admin in a real Chromium and asserts seven things: the page authenticated, the standing streak is shown as current/threshold rather than as a historical maximum, the block shows its reason, observations and the country summary rendered, the token is nowhere in the markup, and the page threw no javascript. It needs playwright-core and exits non-zero when that is missing — a gate that reports success having asserted nothing is worse than no gate. The negative control was run: with a wrong token it exits 1. Verified on this commit: scripts/ci-gates.sh all end to end — build 0 errors, unit 54/54, integration 27/27, smoke 19/19, image built, compose-smoke 27/27; console-smoke 7/7 assertions against the running stack (playwright-core 1.61.1); actionlint 0; shellcheck over scripts/*.sh 0. The new console job pins playwright@1.63.0, a version checked against the registry rather than guessed, and it has never run on a runner — the README says so in the same breath as the rest of the workflow. README gains a Gates section and the per-process cost bullet now quotes the measurement instead of the worry. |