Files
openwaf/scripts
Pavlo Ratushnyi 925fc62d4b
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
the gate's claim about its own writes was false, and the gate now counts it
a8f440b wrote that the gate's admin writes go through `admin_write`. Measured
against the same file an hour later: of its 60 writes that do not go through
`admin`, 34 did — 25 still answered through the un-retried `code` and one went
straight to `curl`. The other 91 writes and 157 reads went through `admin`, which
carried no part of OPEN-39's rule at all: a read that reached nothing answered
NO_JSON_BODY and the log said nothing about why, because the sentinel names the
missing body, not the missing request. The dead-edge scene asserted the opposite
of the fix — that those dead reads write no line to stderr — so the gate was not
only un-instrumented there, it was guarding the missing instrument.

Call sites, counted on this file with comment lines excluded: 261 `admin` (91
writes, 157 reads, 8 carrying -D/-o/-w), 59 `admin_write`, 139 `code`.

What changed:

  * `curl_retry` puts OPEN-39's rule under the body-returning helpers. A transport
    failure is retried three times and each retry prints the container it sampled;
    an HTTP answer — 400, 403, 500 — is an answer and comes back after one attempt.
    `admin` and a new `body`, for the scenes that carry their own token, sit on it.
  * the body comes back byte for byte. `$(curl ...)` strips trailing newlines and
    the six-parallel-POSTs scene writes six `%{http_code}` lines into one shared
    file; a wrapper that re-printed carelessly would have turned that assertion
    into "204204204204204204". The exit status rides in on a marker suffix instead
    of riding on the output.
  * the 25 and the 1 joined `admin_write`.
  * the dead-edge assertion asks for the nine diagnosis lines and for the absence
    of a traceback instead of for silence. It also carried the bug that hid the gap
    for one run: `a | b 2>f` captures only b's stderr, so the first version read
    back an empty file while the nine lines went to the terminal.
  * the claim is now a gate: the file greps its own source and goes red, printing
    the count, if any write answers through the un-retried status helper or goes
    straight to curl — and fails closed when it cannot read itself.

Three assertions added, one removed: 375 -> 379.

Measured. compose-smoke 379 passed / 0 failed at load average 12 (21:07,
/tmp/compose-retry2.log); that run is one comment rewrap away from this text, and
the two self-audit greps were re-run against the committed file and answer 0 and 0.
readme-counts agrees against that run's totals (379=379, exit 0). shellcheck 0.11.0
and bash -n clean. The retry was again proved against a stub rather than a caught
flake: unreachable twice then a body -> two diagnosis lines and the body's trailing
newline intact (xxd: 610a 620a); always unreachable -> three lines and an empty
body; a 400 -> none; a body ending in `x` -> returned unchanged.

Not measured green: this text against the scratch image. The shared host has held
load average 26-72 since 21:10 and four runs of this tree went red on it — 375/4
at load 31, 377/2 at load 39, 378/1 at load 48 — with every failure in a scene that
reads a projection right after a write that was answered: the two alert-escalation
scenes, and once "the shipped story names the block, the covering range and the
exemption, oldest first" in a run where both alert scenes were green. No `000` near
any of them, and the same tree at load 10-12 was 379/0. That is OPEN-78, filed
today; the README's Gates section now carries those red numbers instead of a green
one it does not have.
2026-10-06 21:49:08 +02:00
..