main
56
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
|
||
|
|
992a7b795b |
the console job stops owing the runner an artifact it cannot accept, and the snapshot-age test gets a bound start-up cannot blow
actions/upload-artifact@v4 is not a step this runner can run. Run 2370
(head
|
||
|
|
63cc575eb9 | the two volume-fill steps are block scalars, so their comments are comments | ||
|
|
223b8d6100 |
the gateway is read from the kernel table, because this job image has no ip command
Run 2355, image job: `ip: command not found`, exit 127 — the step that names the address died one line in, before the gate ever ran. /proc/net/route carries the same default route; its gateway is hex little-endian, and bash turns it back into a dotted quad with no helper at all (0100110A → 10.17.0.1). |
||
|
|
fb491a4041 |
the compose gates are pointed at the host address, because the job's own loopback is not where the ports are published
Run 2350 (
|
||
|
|
b402ec4cc9 |
the CI stack mounts its nginx config through a volume, because the daemon cannot see the job's workspace
Run 2346 named the cause, and it was not Docker and not the stack:
error mounting "/workspace/para/openwaf/deploy/upstream.conf" to rootfs at
"/etc/nginx/conf.d/default.conf": not a directory: Are you trying to mount a
directory onto a file (or vice-versa)?
The job's workspace lives inside the runner's job container; the docker daemon is
the host's, reached through /var/run/docker.sock. A relative bind mount written in
docker-compose.yml is resolved by the daemon on the host, where that path does not
exist, so Docker turns it into a directory and the mount dies. deploy/upstream.conf
is tracked (
|
||
|
|
1ada35486f |
a stack that will not come up now says what compose said, and the runner gets buildx
Run 2344 on
|
||
|
|
4e303cd0ad |
the two docker jobs install the CLI the runner image never shipped
First real run of this workflow: Gitea Actions run 2316 on |
||
|
|
bd1b8a4e86 |
185 compose assertions now, and the numbers describe the tree that has them
The gate grew by 20 assertions across two commits (19 for the country rule on
the image, 1 for the ban pillar's wait budget) and the file still said 165 in
six places, including the line that names the script's own size. Same failure
as the last two sweeps: the numbers drift away from the tree that runs them.
Swept to
|
||
|
|
75ee8221de |
165 compose assertions now, and the numbers describe the tree that has them
Every gate was re-run on this tree and the README and the ci.yml header were rewritten from what those runs printed, not from the last time someone wrote a number down: host all (unit 132/132, integration 173/173, smoke 28/0, image 261 MB, compose 165/0), host console (70/0), Linux rehearsal (source PASS, compose 165/0 with 44 ms enforcement lag, console 70/0), and act (5 jobs succeeded, 0 failed, console-evidence.zip 685,878 bytes). Two numbers were stale in ways a reader could not see. The console paragraph said the gate "asserts 58 things" while the gate itself printed 70; and the paging paragraph described behaviour that had only recently become an image-level measurement, so it now says which layer proves it and how the scene proves it. The failures found on the way are written down rather than dropped. Two act runs failed before the green one: lint refused three SC2086 findings that a local `shellcheck -S warning` had passed over — the workflow pins 0.11.0 with no severity filter and no local gate runs lint at all, filed as OPEN-44 — and in the run after the fix, image died on a TLS timeout to auth.docker.io while console read an empty observation listing in a run where the same table had shown 11 rows a minute earlier, filed as OPEN-43. A host console run at the previous commit answered 68/2 for the same reason OPEN-41 already describes, and one compose run read banWriteFailures as 0 while the same scene's log and readyz said otherwise, filed as OPEN-42. |
||
|
|
bb9ac0d927 |
132 compose assertions now, and the numbers describe the tree that has them
Re-measured at |
||
|
|
7faf37a246 |
70 console assertions now, and each number says where it was measured
Re-measured at |
||
|
|
5add3be06b |
113 compose assertions now, and the measured numbers describe the tree that has them
Every gate was re-run at |
||
|
|
e5f4ff041d | 107 compose assertions now, and the rehearsal numbers describe the tree that has them | ||
|
|
fe9b09f683 | The numbers follow the tree: 173 integration tests, 100 compose assertions, 69 console assertions, and a contract line for the streak-map filter | ||
|
|
bce6657150 |
The unit count moved because a criterion gained a test, and the numbers follow the tree
|
||
|
|
5280e24a94 |
The rehearsal and act numbers describe the tree that carries the renamed tests
|
||
|
|
5430ed0b6f |
The README carries the write-side query contract, and the numbers describe that tree
The contract section said the unknown-parameter guard refuses on the list
endpoints. It now refuses on every endpoint under /admin-api, and the
interesting part is not the coverage: it is that the guard itself had the
bug. It assumed limit/offset were legal everywhere, so GET
/admin-api/countries?limit=2 was answered with the whole table by the
image that already carried the guard.
Numbers re-measured on
|
||
|
|
b90b647474 |
The README carries the pending-ban contract, and the numbers describe that tree
Numbers re-measured at |
||
|
|
db146271c8 |
The README carries the query-surface contract, and the numbers describe that tree
Numbers re-measured at |
||
|
|
858fd0148c |
The README carries the ban-write contract, and the numbers describe that tree
Numbers re-measured at this head rather than carried forward from the commit the last README sweep was written against: macOS host — unit 128/128, integration 125/125, smoke 28 passed / 0 failed, compose 74 passed / 0 failed, console 58 assertions / 0 failed, image 261 MB. Linux rehearsal — compose 74 passed / 0 failed (enforcement lag 14 ms), console 58 assertions / 0 failed, 0 containers left behind. act (nektos/act 0.2.89, catthehacker/ubuntu:act-latest) — 5 jobs succeeded, 0 failed: lint, source (128/128, 125/125, 28/0), image (261 MB, compose 74/0), console (58 assertions, 480,636-byte screenshot artifact), freshness. Prose changes, not just digits: - The compose write scene no longer asserts `/readyz` 503 for a reporting-path failure, and the README said it did. The sentence is rewritten to the boundary that is actually asserted now, with the measurement that moved it: one lost alert held `/readyz` at 503 for 120 s of idle time over a healthy write path, because an alert pillar writes only when an alert is raised. - Both broken-pillar scenes are now eleven assertions, not ten: each proves the sources it claims were seen are really in the live streak map, so the scene cannot pass by counting one docker bridge address three times. - The honest log line is described as polled and counted (3 lines), because the grep run immediately after the burst answers 0 and the same grep two seconds later answers 3. - The compose history line now says where 74 came from: 63 before the ban-write scene, 72 before the scenes were made non-vacuous. |
||
|
|
68bec5b6be |
The README carries the write-health contract, and the numbers describe the tree that has it
Re-measured at
|
||
|
|
058e68be7e |
The README carries the pillar-health contract, and the numbers describe the tree that has it
Re-measured at
|
||
|
|
ea68b550e2 |
Two CI jobs sharing one compose project: one job's teardown was the other's connection refused
The full local runner pass (act 0.2.89, catthehacker/ubuntu:act-latest) on this
tree went 4 jobs succeeded, 1 failed: the console job died 33 s in, at the
seeding curl of scripts/console-smoke.sh, with curl exit 7 — nothing listening on
127.0.0.1:8080 any more.
Not a product failure and not flakiness. The image job and the console job each
run `docker compose up -d` and each tear the stack down on exit, and both take the
project name from the repository directory and the host port from a literal 8080
in docker-compose.yml. On any machine where two jobs share one docker daemon — a
self-hosted runner, or act — they are the same stack, so the image job's
`compose down` removes the containers the console job is seeding into. Run alone,
the same console job passes (act -j console: 1 job succeeded, 53 assertions). On
GitHub's hosted runners each job gets its own machine, which is exactly why this
has never been seen there and why "the workflow has never run on GitHub" is still
a gap this repository carries rather than a solved problem.
Fix: the published port is ${EDGE_PORT:-8080}, and each job names its own compose
project (openwafci-image on 8080, openwafci-console on 8090). Separate projects
means separate containers, separate volumes and separate ports, so neither job can
see the other's stack. scripts/ci-linux-rehearsal.sh passes COMPOSE_PROJECT_NAME
and EDGE_PORT through to the seeding container so an operator can isolate a
rehearsal the same way.
Measured after: the same full act pass is 5 jobs succeeded, 0 failed — lint,
source (128/128, 117/117, smoke 25/0), image (261 MB, compose smoke 53/0),
console (53 assertions / 0 failed, screenshot artifact), freshness. Locally:
compose gate 53/0 with the default project and port unchanged, and the console
gate 53/0 driven through the CI configuration (COMPOSE_PROJECT_NAME=openwafci-console,
EDGE_PORT=8090).
|
||
|
|
73872ceda1 |
The README carries the exemption contract, and the numbers describe the tree that has it
The Admin API section now says what GET /admin-api/allow answers — live by default, live=false meaning "do not filter", limit 1..2000 and offset, X-Total-Count and X-Truncated, and a live flag on each row computed from the same AllowEntry.IsLive the engine applies — and records the measurement that made it so: the entry written at 03:58:16 for one minute, the address through at 03:58:20 (502) and blocked again at 03:59:38 (301), the row still listed unmarked at 03:59:39 with /state still saying allowEntries:1, and 1,101 rows in 130,386 bytes with every paging parameter ignored. Numbers moved to the tree that has the fix ( |
||
|
|
72d37ad3f1 |
The Linux numbers describe the head tree again
The rehearsal had been quoted from |
||
|
|
53947516b2 |
The README says which run it describes, and which commit that run was on
The listing-completeness fix ( |
||
|
|
e1f7456629 |
The numbers now describe a run of the tree that has the provenance fix
README.md and .github/workflows/ci.yml quoted counts measured at |
||
|
|
870db6b97e |
The numbers now describe a run of the tree that has the redirect guard
Rehearsal and the local Actions runner were both re-run at
|
||
|
|
5e16e7e28c |
The README numbers now describe a run of the tree that has the policy ranges
Rehearsal and the local Actions runner were both re-run at |
||
|
|
0a6520eeba |
Every number that describes a run now describes a run of this tree
The retention tests changed the integration count from 34 to 37, and three places quoted the old count as if it were current: - README, Linux rehearsal paragraph: re-ran the whole rehearsal at |
||
|
|
a9c49236b7 |
Two pushes in a row no longer queue two full gate runs
The workflow triggers on every push with no concurrency group, so pushing twice in a minute runs the whole gate set twice, in series, and the second run's numbers are the ones a reviewer reads while the first is still scrolling. concurrency is now set per workflow+ref with cancel-in-progress: false. The false is the considered half: a finished run is the evidence a merge decision gets read later, so cancelling the run that is already executing throws away proof to save nothing. GitHub still drops the runs that were only queued. Verified by executing the file again rather than trusting the schema: actionlint 1.7.12 exits 0, and act (0.2.89, catthehacker/ubuntu:act-latest) plays all five jobs green on this commit - lint (shellcheck 0.11.0, pinned), source (unit 59/59, integration 34/34, smoke 19/19), image (openwaf:ci 261 MB, compose smoke 43 passed / 0 failed), console (33 assertions, 0 failed), freshness (pin 2026-10 current). 95 assertion lines across the three live gates, same as before the change. |
||
|
|
bef197ec83 |
The honest-status comments now say what actually ran, and at what level
Three files said "this has never run". After executing the workflows with nektos/act 0.2.89 on catthehacker/ubuntu:act-latest, that sentence was too broad, and a status note that is too broad is the same mistake as one that is too narrow. What is true, per file: - ci.yml: all four jobs executed start to finish and reported success — lint (actionlint 1.7.12 and shellcheck 0.11.0 both download, verify their sha256 and find nothing), source (unit 59/59, integration 34/34, smoke 19/19), image (openwaf:ci 261 MB, compose smoke 43 passed / 0 failed), console (33 assertions / 0 failed with playwright@1.63.0 and chromium-1243; the screenshot step published console-evidence.png 335998 B and console-evidence.phone.png 264597 B). - geo-freshness.yml: the job executed ("pin 2026-10 / newest 2026-10 / the pin is current", exit 0). The schedule has still never fired, and that is the part the file is for. - README: the same numbers, plus the point the run bought — ubuntu-latest ships shellcheck 0.9.0-1, developers run 0.11.0, and the two disagree about one line of scripts/geo-db-bump.sh. Fixed in the previous commit. The distinction each file keeps saying out loud: a local Actions-compatible runner proves the YAML plays and the pinned tools resolve. It does not prove a GitHub-hosted run is green, and the repository still has no remote. |
||
|
|
a48ebd650d |
Running the workflow, not just linting it, turned the lint job red
The workflow file had never been executed anywhere. It was linted, and its
steps were run by hand through scripts/ci-gates.sh, but nothing had ever taken
the YAML and played it start to finish. nektos/act (0.2.89, sha256
48ae218af96725f7635a66de2b87e1e346893b02add0f16b92f560296b2151fc) does that in a
Docker container, so the file itself got executed.
It found a defect on the first run. The lint job called `shellcheck` expecting
the copy baked into ubuntu-latest - 0.9.0-1, per the runner image's own package
list. Local shellcheck is 0.11.0 and says nothing about
scripts/geo-db-bump.sh:42; 0.9.0 flags it (SC2015: `A && B || C` is not
if-then-else). So the gate's verdict depended on which tool version the image
happened to ship, and the first push to a real runner would have gone red on a
pattern that is legal, just ambiguous.
Two changes, both version-independent:
- geo-db-bump.sh: the guard is now an explicit `if [ -z "$newest" ] || [
"$newest" = unknown ]`. Verified with the version that found it: shellcheck
0.9.0 in a Linux container now exits 0 over scripts/*.sh, and 0.11.0 on the
host exits 0. The script's behaviour is unchanged: DRY_RUN with a current pin
exits 0 ("nothing to do"), and an edition the vendor does not serve exits 2
("REFUSED - the freshness check could not name a newer release").
- ci.yml: shellcheck is pinned to 0.11.0 with a checksum per architecture, the
same way actionlint already is, and the step prints the version so the log
says which version did the linting.
Executed end to end in act on catthehacker/ubuntu:act-latest, arm64:
lint - Job succeeded (checkout, actionlint 1.7.12 sha256 OK, shellcheck
0.11.0 sha256 OK, 0 findings over scripts/*.sh)
source - Job succeeded (setup-dotnet, restore, build, unit, integration
34/34, smoke 19/19)
image - Job succeeded (docker build -> openwaf:ci 261 MB, compose smoke
43 passed / 0 failed)
This is not GitHub: it is a local Actions-compatible runner, so it proves the
file executes and the pinned tools resolve, not that a GitHub-hosted run is
green. The console job is the remaining one and is reported separately.
|
||
|
|
5722d64529 |
The lint job linted one workflow file while the repo has two
actionlint in ci.yml was invoked on .github/workflows/ci.yml only, so geo-freshness.yml — the scheduled geo gate — was linted by whoever happened to run it locally, not by the pipeline. A workflow added later would have been unlinted by default, which is how a gate quietly stops covering the thing it is for. Fixed by globbing the workflows directory, so the step covers whatever is there instead of a list someone has to remember. Verified on this commit: actionlint 1.7.12 -no-color .github/workflows/*.yml exits 0 with no findings over both files (ci.yml, geo-freshness.yml). |
||
|
|
3f39029c22 |
The rehearsal numbers in the docs were one commit behind the tree
README quoted unit 58/58 and integration 32/32 for the Linux rehearsal, and
ci.yml's header quoted 32/32. Both were true when written; the tree has 59 unit
and 34 integration tests now, so the docs were quoting a run that no longer
matches the code they describe.
Re-ran every gate this head had not been run on, on
|
||
|
|
842b70566f |
The query-string token is kept, but it no longer happens silently
?token= on the admin API is an affordance for an operator typing curl; the console never uses it and none of the gates do (0 occurrences of token= in scripts/). Refusing it is how an operator ends up switching auth off instead of learning the header. What was wrong was the silence. Measured on the shipped image before deciding: a container hit with /admin-api/state?token=<secret> logged 0 lines containing the token at the shipped level (Microsoft.AspNetCore: Warning), and 2 lines at Microsoft.AspNetCore=Information, including the full URL. Raising that level is the ordinary next move while debugging, so the leak is one environment variable away, not a hypothetical. Now a request authenticated by the query string logs a warning naming the path and never the token. Two tests: the query form is served and named; the header form produces no such warning and no token anywhere in the captured logs. Teeth: delete the warning and exactly the query test fails (1 failed, 33 passed). Also refreshed the ci.yml header, whose Linux numbers had gone stale (54/54 + 30/30 + 41/41 -> 59/59 + 32/32 + 43/43 + 33/33), and kept the wall clock quoted as measured once rather than current. Gates: build 0 warnings, unit 59/59, integration 34/34, actionlint 0 problems. |
||
|
|
cbee0e4208 |
The geo endpoint gets asserted as an endpoint, not only as a pill
Last commit covered `/admin-api/geo` behaviourally: the page fetches it and the
summary pill fails if the value is missing. That is coverage of the page, not of
the contract { if a field were renamed, or `loaded` started answering for
something else, the pill could still render and the assertion would still be
satisfied by the shape it happens to look for.
Three direct assertions in `compose-smoke.sh`: the endpoint says a database is
loaded, names what it loaded (`DBIP-Country-Lite`), and reports an age in days as
a number. 38 → **41 assertions**.
The helper that reads scalar fields caught itself: `jval` printed Python's `True`
where the assertion expected JSON's `true`, so the first run failed on spelling
rather than on the product. It emits JSON spellings now.
Numbers: host **41 passed, 0 failed**; the same script in the Linux rehearsal
(`docker:cli`, host daemon) **41 passed, 0 failed**. actionlint 1.7.12 over both
workflow files: 0 problems; shellcheck and `bash -n` clean.
|
||
|
|
208b04290b |
Two endpoints the console read and no gate had ever called
An audit of the admin surface by gate coverage turned up two endpoints with zero
appearances in any gate: `/admin-api/state` and `/admin-api/geo`. The first is
the one the console's entire summary line is built from — the page could have
been reporting a mode the edge is not in, or a ban count that is not the count,
and every assertion in every script would have stayed green.
`/admin-api/state` also lacked one field the summary needs. It reported the age
of the in-memory snapshot and not the TTL that age is measured against, so
"snapshot 0.4s" was half a number. On a single edge the TTL is invisible; behind
a load balancer it *is* the delay a ban has, which is the whole subject of the
multi-instance question. `/healthz` already reported it — the endpoint the page
actually reads did not.
The summary line now says, in one place an operator looks at:
mode Enforce · snapshot 0.1s / ttl 30s · tracked 3 · engine bans 0
operator blocks 0 · allow entries 0 · geo DBIP-Country-Lite · built 2026-10-01 · 0.6d
The geo pill is marked past 90 days, the same rule `/healthz` reports as
`geoStale`, and the assertion checks it is *not* marked while the database is
inside the alarm — an always-green warning is a warning nobody reads.
Gates: `compose-smoke.sh` asserts `/state` at the moment a ban exists, so the
numbers have known values rather than "some number" — mode `Enforce`, TTL `30`,
`engineBans` 1 — 35 → **38 assertions**. `console-check.cjs` asserts the TTL in
the summary, the geo database with its build date and age, and the marking: 30 →
**33** assertions. `SnapshotStalenessTests` got the
fast half for the new field.
That test caught the test, not the product: the first version read `/state` with
a bare client and got a 401, because the admin surface is token-gated while
`/healthz` deliberately is not. The endpoint was right and the test was wrong.
Numbers on this tree. Host: build 0 warnings, unit 54/54, integration **30/30**,
compose-smoke **38/38**. Linux rehearsal, one invocation, EXIT=0: source gates
54/54 + 30/30 + smoke 19/19, compose **38/38**, console **33/33** in a real
Chromium. actionlint 1.7.12 over both workflow files: 0 problems; shellcheck,
`bash -n`, `node --check` clean.
Still the same boundary as every other commit here: none of it has executed on a
runner, because the repository has no remote (OPEN-15).
|
||
|
|
8082e6a598 |
The alerting pillar had an endpoint and nobody reading it
`GET /admin-api/alerts` appeared in **zero** gate scripts. Both alert kinds were proven in-process, against `FakeUpstream`, at the database level — and the half that matters for an alert, the half where a human sees it, had nothing on the other end. The console read six endpoints and this was not one of them. The page now renders them: kind, source, count, last status and path, when. The kind an operator has to act on is marked rather than only printed, and the note above the table says what each kind means in words, because `server_error_streak` and `candidate_ban` are different sentences: your upstream is failing (and the edge will not ban the visitor who saw it) versus the rule would have banned and the mode is Observe. `scripts/console-smoke.sh` seeds four 502s from an address chosen for this run (`/boom`, added last commit), and `scripts/console-check.cjs` asserts the row by **source and count**, the note text, the marking, and that the table survives the phone pass: 26 → **30 assertions**. The wiring was the interesting part. The seeding runs in one container and the browser in another, so the address chosen at seed time cannot be inherited — an empty `SEED_ERROR` on the driver side would have quietly turned "the alert this run wrote" into "some alert exists somewhere". The seed now writes its values to `console-seed.env` (gitignored) and the rehearsal passes them to the browser container. `AdminConsoleTests` got the fast half: the markup contains the alerts table and fetches the endpoint. A static check cannot assert the row is there — that is what the browser gate is for — but it can notice the table disappearing without waiting for Chromium. 28 → **29 integration tests**. Numbers. Host: build 0 warnings, unit 54/54, integration 29/29. Linux rehearsal, one invocation on this tree, EXIT=0: source gates 54/54 + 29/29 + smoke 19/19, compose **35/35**, console **30/30** in a real Chromium. actionlint 1.7.12 over both workflow files: 0 problems; shellcheck, `bash -n` and `node --check` clean. Two things said plainly. The console number above is the Linux one: this laptop's browser cache has chromium-1223/1228/1234 and the pinned Playwright wants 1243, so the darwin console gate was not re-run for this change. And during the run the table's own note read "Newest 25" — the endpoint is capped and residue from earlier runs fills the page. That is OPEN-18's amplification showing up where an operator would see it, and the note states the cap instead of pretending the table is everything. |
||
|
|
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.
|
||
|
|
e02e442ae2 |
The console gate has a Linux number now, in a real Chromium
The rehearsal covered the dotnet suites, smoke.sh and compose-smoke.sh, and then printed "console gate: not covered here (needs a real Chromium)". That was the one honest line in the summary, and it was also the last hole: the console job in `.github/workflows/ci.yml` runs on ubuntu-latest, so its gate was verified only on darwin. `scripts/ci-linux-rehearsal.sh console` closes it. `scripts/console-smoke.sh` grew `SEED_ONLY=1` (start the stack, seed the streaks/bans/allow entries the page must show, then stop before driving the page) and an `EDGE` override, so the seeding half runs in `docker:cli` against the host daemon and the browser half runs in `mcr.microsoft.com/playwright:v1.63.0-noble` — the Playwright version pinned there is the version the CI console job pins, or the rehearsal is rehearsing something else. The stack is torn down either way. Two facts about that image, both now comments in the script: - It ships the browsers (`/ms-playwright`: chromium-1243) but **not** the npm package — there is no playwright-core anywhere in it. So the stage installs `playwright@1.63.0` into `/tmp` and points `PLAYWRIGHT_CORE` at `/tmp/node_modules/playwright-core`. - The repo is mounted read-only for this stage. Writable, the install would have dropped `node_modules` into the working tree of the checkout. The summary line also stopped lying by accident: `verdict()` now separates a stage the caller never asked for ("not run") from a stage that could not run ("skipped (no docker socket)"), and the exit code includes the console stage. Two full rehearsals on this tree, one invocation each, both EXIT=0: source gates (restore/build/unit/integration/smoke): PASS 54/54, 28/28, 19/19 compose gate: PASS 27 passed, 0 failed console gate: PASS 26 assertions, 0 failed wall: 2:14.33 (cold containers, cold NuGet cache) 72 assertions pass from inside Linux, and the console half includes the round-trip a page cannot fake: a ban drawn on the page answers 301 on the next request from that address, and the address passes again once the row is deleted. actionlint 1.7.12 (same pinned checksum as CI): 0 problems. shellcheck and `bash -n` clean. Still true: none of this has executed on a runner, because the repository has no remote. The Linux numbers narrow what a first run can discover; they do not replace one. |
||
|
|
c290aa06f6 |
Every gate this workflow runs now has a Linux number except one
`scripts/ci-linux-rehearsal.sh` (added in `42d4af9`) covered the dotnet suites
and `smoke.sh`. The third thing the objective asks CI to run — `scripts/
compose-smoke.sh` — did not have a Linux number, and "we run it on macOS against
a Linux image" is only half a proof: the script itself is the part that could be
a darwin habit.
It now runs in `docker:cli` against the host daemon, so the image build, the
stack and the asserting shell are all Linux. Full rehearsal, one invocation:
source gates (restore/build/unit/integration/smoke): PASS 54/54, 28/28, 19/19
compose gate: PASS 27 passed, 0 failed
console gate: not covered here (needs a real Chromium)
wall: 47.61 s
Getting it green surfaced two facts about the harness, not the product, and both
are now comments in the script where the next person will hit them:
- `compose-smoke.sh` asserts over JSON with **python3** (`jcount`/`jget`) and
reads the clock with it. A bare container failed **23 of 27** assertions for
nothing else. The runner image has python3; `docker:cli` does not, so the
stage installs bash, curl and python3 itself.
- The stack is created by the host daemon, so its published port lives in the
host's network namespace. Without `EDGE=http://host.docker.internal:8080`,
every HTTP assertion returns curl code `000` **while the image's own
HEALTHCHECK reports healthy** — a green stack with red assertions, the most
confusing failure this gate can produce. The gate already had an `EDGE`
override; this is what it is for.
The compose stage also printed its own instrumentation again: enforcement lag
**12 ms** between writing a ban and the edge refusing the source — the snapshot
invalidation path, measured on Linux this time.
Still true and still said plainly: none of these jobs has executed on a runner,
because the repository has no remote. The Linux numbers narrow what a first run
could still discover; they do not replace one.
|
||
|
|
bf1129a8d8 |
The failure mode on a write form is the one nobody demos
The console now writes, so the question stopped being "does the table show the ban" and became "what happens when the operator types the wrong thing". A form that accepts `not-an-ip`, says nothing, and adds no row leaves an operator believing an address is blocked when it is not — which is worse than giving them no console at all. Two assertions added to the browser gate. The API already rejected the value (`BlockStore.AddOperatorAsync` returns `not an IP address: not-an-ip`, the endpoint answers 400, the page already surfaces `body.error` in its status line); what is new is that a gate now proves that chain instead of assuming it. The run prints the actual string: `not an IP address: not-an-ip`, and no phantom row in the bans table. Console gate: **26/26**. Also measured, because a timeout written at a desk is a guess: the Linux rehearsal (`scripts/ci-linux-rehearsal.sh`, added in `42d4af9`) was re-run with `time`. Cold container, cold NuGet cache, Ubuntu 24.04.5, SDK 10.0.401: **1:02.81** wall for restore + build + unit + integration + smoke. The source job's `timeout-minutes: 25` is not close, even allowing for a runner's slower CPU. Before this, the number in the workflow was folklore from a build that once stalled ~12 minutes on a single apt-get step. No source-tree change in this commit: gate assertions and the numbers written down where the next reader will look for them. Unchanged and still said plainly: no job of this workflow has executed on a runner — the repository has no remote. |