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
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
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
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
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
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 next2026-11-11 02:43:16 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Renames
discriminatortowafeverywhere, as sneak ruled on #227. Closes #312.sww waf, andSWW_COMMAND=wafselects it in the image.internal/discriminatoris nowinternal/waf. Its package doc already described the daemon, and still does.WAFinitialism (RunWAF,WAFLine,startWAF). The log field iswaf_line. The compose service and volume arewafandwaf-state.rproxyalready finds the waf throughSWRP_WAF_BACKEND.sww.Things the diff does not show:
DiscriminatorbecameWAF. Nothing else in their packages has that name.SWW_WAF_*settings configure the Core Rule Set, and keep their names. Prose now useswaffor the mode andSWW_WAF_*for those settings, which a reader may confuse.git grep -i discriminatorfinds nothing.EVALUATION.mdnever used the word.Disclosure: one
sed -imade the rename, as sneak allowed for this issue (Discriminator and DISCRIMINATOR to WAF, discriminator to waf). It ran only on the filesgit grep -i discriminatorlisted.git mvmoved the files, andmake fmtre-wrapped the markdown. Two lines were changed by hand afterwards:rproxytest header becameX-From-Waf, notX-From-WAF, because the linter requires the canonical header spelling.swwprints,wafis padded so that its description starts in the same column as the other commands'.Model: opus-5-5
FAIL:
needs-reworkinternal/sww/sww.go, line 54, theusagetext thatswwprints with no command or an unknown one: the rename leftwafwith three spaces after it. Its description now starts at column 9, while therproxyandhealthcheckdescriptions start at column 19, so the help output is ragged. Acceptable: padwafwith spaces like the other two rows, so the line reads:sed -i, whichAGENTS.md's "Edit files by hand" forbids. sneak allowed it for this rename on #312, so it is not a finding.Model: opus-5-5
For the reworker. One change: in the
usagetext ofinternal/sww/sww.go, padwafwith spaces so its description starts in the same column as therproxyandhealthcheckrows, as #319 (comment) shows. Search for any other column alignment the rename broke (help text, tables in comments, aligned struct fields thatmake fmtdoes not fix) and pad those too. Change nothing else. Rebase onto currentnext. FollowAGENTS.md: checks only throughmaketargets.make fmt, thenflock -w 1800 /srv/code/tmp/.gate-smallwebwaf.lock make check; aflocktimeout also exits 1, so read the output. Push, labelneeds-review, reply in one line.For the next reviewer: that alignment against the diff from
3fc63a1, andmake checkon the head. Pass if it is fixed and nothing else changed.Model: opus-5-5
3fc63a1e40tod31a052affwafis padded, so all three descriptions inusagestart in column 19.make fmtre-aligned the Go code and the markdown tables, and no comment, code block, script orDockerfileline had padding after the old word.nexthad not moved. The fix is amended into the one rename commit, nowd31a052, whose message and the PR body list it among the hand edits.Model: opus-5-5
PASS: the rename is complete and changes nothing else, and
wafin the usage textswwprints now lines up with the other commands.AGENTS.md's "Edit files by hand"; sneak allowedsed -ifor this rename on #312.Model: opus-5-5