Rename discriminator to waf everywhere (closes #312) #319

Merged
clawbot merged 1 commits from issue-312-rename-discriminator-to-waf into next 2026-11-11 02:43:16 +01:00
Collaborator

Renames discriminator to waf everywhere, as sneak ruled on #227. Closes #312.

  • The command is sww waf, and SWW_COMMAND=waf selects it in the image.
  • internal/discriminator is now internal/waf. Its package doc already described the daemon, and still does.
  • Go names use the WAF initialism (RunWAF, WAFLine, startWAF). The log field is waf_line. The compose service and volume are waf and waf-state.
  • No setting changes name: rproxy already finds the waf through SWRP_WAF_BACKEND.
  • The program is still smallwebwaf, and the binary is still sww.

Things the diff does not show:

  • No new name clashed with an existing one. The two test stand-in types named Discriminator became WAF. Nothing else in their packages has that name.
  • The existing SWW_WAF_* settings configure the Core Rule Set, and keep their names. Prose now uses waf for the mode and SWW_WAF_* for those settings, which a reader may confuse.
  • git grep -i discriminator finds nothing. EVALUATION.md never used the word.

Disclosure: one sed -i made the rename, as sneak allowed for this issue (Discriminator and DISCRIMINATOR to WAF, discriminator to waf). It ran only on the files git grep -i discriminator listed. git mv moved the files, and make fmt re-wrapped the markdown. Two lines were changed by hand afterwards:

  • The rproxy test header became X-From-Waf, not X-From-WAF, because the linter requires the canonical header spelling.
  • In the usage text sww prints, waf is padded so that its description starts in the same column as the other commands'.

Model: opus-5-5

Renames `discriminator` to `waf` everywhere, as sneak ruled on https://git.eeqj.de/sneak/smallwebwaf/issues/227. Closes https://git.eeqj.de/sneak/smallwebwaf/issues/312. - The command is `sww waf`, and `SWW_COMMAND=waf` selects it in the image. - `internal/discriminator` is now `internal/waf`. Its package doc already described the daemon, and still does. - Go names use the `WAF` initialism (`RunWAF`, `WAFLine`, `startWAF`). The log field is `waf_line`. The compose service and volume are `waf` and `waf-state`. - No setting changes name: `rproxy` already finds the waf through `SWRP_WAF_BACKEND`. - The program is still smallwebwaf, and the binary is still `sww`. Things the diff does not show: - No new name clashed with an existing one. The two test stand-in types named `Discriminator` became `WAF`. Nothing else in their packages has that name. - The existing `SWW_WAF_*` settings configure the Core Rule Set, and keep their names. Prose now uses `waf` for the mode and `SWW_WAF_*` for those settings, which a reader may confuse. - `git grep -i discriminator` finds nothing. `EVALUATION.md` never used the word. Disclosure: one `sed -i` made the rename, as sneak allowed for this issue (Discriminator and DISCRIMINATOR to WAF, discriminator to waf). It ran only on the files `git grep -i discriminator` listed. `git mv` moved the files, and `make fmt` re-wrapped the markdown. Two lines were changed by hand afterwards: - The `rproxy` test header became `X-From-Waf`, not `X-From-WAF`, because the linter requires the canonical header spelling. - In the usage text `sww` prints, `waf` is padded so that its description starts in the same column as the other commands'. Model: opus-5-5
clawbot self-assigned this 2026-11-11 01:41:38 +01:00
clawbot added the needs-review label 2026-11-11 01:41:43 +01:00
Author
Collaborator

FAIL: needs-rework

  1. internal/sww/sww.go, line 54, the usage text that sww prints with no command or an unknown one: the rename left waf with three spaces after it. Its description now starts at column 9, while the rproxy and healthcheck descriptions start at column 19, so the help output is ragged. Acceptable: pad waf with spaces like the other two rows, so the line reads:

      waf             decides for rproxy, and keeps bans, counters and history
    
  • Rule set aside: the edit used sed -i, which AGENTS.md's "Edit files by hand" forbids. sneak allowed it for this rename on #312, so it is not a finding.
  • Judgement call: sentences whose only change is the renamed word were not held to the prose rules, since the issue allows no other change.

Model: opus-5-5

**FAIL: `needs-rework`** 1. `internal/sww/sww.go`, line 54, the `usage` text that `sww` prints with no command or an unknown one: the rename left `waf` with three spaces after it. Its description now starts at column 9, while the `rproxy` and `healthcheck` descriptions start at column 19, so the help output is ragged. Acceptable: pad `waf` with spaces like the other two rows, so the line reads: ``` waf decides for rproxy, and keeps bans, counters and history ``` - Rule set aside: the edit used `sed -i`, which `AGENTS.md`'s "Edit files by hand" forbids. sneak allowed it for this rename on https://git.eeqj.de/sneak/smallwebwaf/issues/312, so it is not a finding. - Judgement call: sentences whose only change is the renamed word were not held to the prose rules, since the issue allows no other change. Model: opus-5-5
Author
Collaborator

For the reworker. One change: in the usage text of internal/sww/sww.go, pad waf with spaces so its description starts in the same column as the rproxy and healthcheck rows, as #319 (comment) shows. Search for any other column alignment the rename broke (help text, tables in comments, aligned struct fields that make fmt does not fix) and pad those too. Change nothing else. Rebase onto current next. Follow AGENTS.md: checks only through make targets. make fmt, then flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; a flock timeout also exits 1, so read the output. Push, label needs-review, reply in one line.

For the next reviewer: that alignment against the diff from 3fc63a1, and make check on the head. Pass if it is fixed and nothing else changed.

Model: opus-5-5

**For the reworker.** One change: in the `usage` text of `internal/sww/sww.go`, pad `waf` with spaces so its description starts in the same column as the `rproxy` and `healthcheck` rows, as https://git.eeqj.de/sneak/smallwebwaf/pulls/319#issuecomment-176659 shows. Search for any other column alignment the rename broke (help text, tables in comments, aligned struct fields that `make fmt` does not fix) and pad those too. Change nothing else. Rebase onto current `next`. Follow `AGENTS.md`: checks only through `make` targets. `make fmt`, then `flock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check`; a `flock` timeout also exits 1, so read the output. Push, label `needs-review`, reply in one line. **For the next reviewer:** that alignment against the diff from `3fc63a1`, and `make check` on the head. Pass if it is fixed and nothing else changed. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-11-11 01:58:13 +01:00
clawbot added 1 commit 2026-11-11 02:15:15 +01:00
The command is now `sww waf`, and the package is `internal/waf`. Types,
functions, files, tests, comments, docs, the Dockerfile, the runit
script, `script/`, compose examples, the log field `waf_line` and the
`X-From-Waf` test header follow. No behaviour changes, and no setting
changes name: rproxy already finds the waf through `SWRP_WAF_BACKEND`.

Done with one `sed -i` (Discriminator and DISCRIMINATOR to WAF,
discriminator to waf) over the files `git grep -i discriminator`
listed, as sneak allowed for this rename, then `git mv` for the
package and files. By hand afterwards: the header's spelling, which
the linter requires, and the padding after `waf` in `sww`'s usage
text.

Model: opus-5-5
clawbot force-pushed issue-312-rename-discriminator-to-waf from 3fc63a1e40 to d31a052aff 2026-11-11 02:15:15 +01:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-11-11 02:15:35 +01:00
Author
Collaborator
  • Fixed: waf is padded, so all three descriptions in usage start in column 19.
  • No other alignment broke: make fmt re-aligned the Go code and the markdown tables, and no comment, code block, script or Dockerfile line had padding after the old word.
  • next had not moved. The fix is amended into the one rename commit, now d31a052, whose message and the PR body list it among the hand edits.

Model: opus-5-5

- Fixed: `waf` is padded, so all three descriptions in `usage` start in column 19. - No other alignment broke: `make fmt` re-aligned the Go code and the markdown tables, and no comment, code block, script or `Dockerfile` line had padding after the old word. - `next` had not moved. The fix is amended into the one rename commit, now `d31a052`, whose message and the PR body list it among the hand edits. Model: opus-5-5
Author
Collaborator

PASS: the rename is complete and changes nothing else, and waf in the usage text sww prints now lines up with the other commands.

  • Rule set aside: AGENTS.md's "Edit files by hand"; sneak allowed sed -i for this rename on #312.

Model: opus-5-5

**PASS**: the rename is complete and changes nothing else, and `waf` in the usage text `sww` prints now lines up with the other commands. - Rule set aside: `AGENTS.md`'s "Edit files by hand"; sneak allowed `sed -i` for this rename on https://git.eeqj.de/sneak/smallwebwaf/issues/312. Model: opus-5-5
clawbot merged commit f7e3190654 into next 2026-11-11 02:43:16 +01:00
clawbot deleted branch issue-312-rename-discriminator-to-waf 2026-11-11 02:43:17 +01:00
Sign in to join this conversation.