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.
This commit is contained in:
@@ -78,6 +78,10 @@ env:
|
||||
# The compose smoke test needs a token to exercise the admin API. It is not a
|
||||
# secret: it is a throwaway value for a stack that exists only inside the job.
|
||||
OPENWAF_ADMIN_TOKEN: ci-only-throwaway
|
||||
# Where each gate writes the number of assertions it actually ran, so the step
|
||||
# after it can compare that with the number the README claims (OPEN-46). Per
|
||||
# job, not shared: each job runs its own gate and verifies its own number.
|
||||
GATE_TOTALS_DIR: /tmp/openwaf-gate-totals
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -135,6 +139,12 @@ jobs:
|
||||
- name: Smoke — a running edge and a real upstream, curl assertions
|
||||
run: ./scripts/ci-gates.sh smoke
|
||||
|
||||
# The README quotes an assertion count per gate. It used to be copied by
|
||||
# hand out of a log and it drifted (OPEN-46: 229 claimed against 356
|
||||
# printed). This step makes the README pay for the number it prints.
|
||||
- name: README assertion counts match what the gate ran
|
||||
run: ./scripts/ci-gates.sh readme-counts scripts/smoke.sh
|
||||
|
||||
image:
|
||||
name: build the image and smoke it
|
||||
runs-on: ubuntu-latest
|
||||
@@ -247,6 +257,9 @@ jobs:
|
||||
EDGE: http://${{ env.OPENWAF_EDGE_HOST }}:8080
|
||||
run: ./scripts/ci-gates.sh compose-smoke
|
||||
|
||||
- name: README assertion counts match what the gate ran
|
||||
run: ./scripts/ci-gates.sh readme-counts scripts/compose-smoke.sh
|
||||
|
||||
# The console is a page, and a page fails in ways curl cannot see: a typo in
|
||||
# the inline script, a fetch that 401s, a table that renders nothing while the
|
||||
# summary looks fine. This drives it in a real Chromium.
|
||||
@@ -384,6 +397,9 @@ jobs:
|
||||
EDGE: http://${{ env.OPENWAF_EDGE_HOST }}:8090
|
||||
run: ./scripts/ci-gates.sh console
|
||||
|
||||
- name: README assertion counts match what the gate ran
|
||||
run: ./scripts/ci-gates.sh readme-counts scripts/console-check.cjs
|
||||
|
||||
# Not an artifact upload, and that is a measurement rather than a
|
||||
# preference. Run 2370 (head 36d9338) drove the page through every
|
||||
# assertion — `console check: all assertions passed` — and the job still
|
||||
|
||||
Reference in New Issue
Block a user