Rename discriminator to waf everywhere #312

Closed
opened 2026-11-11 00:57:22 +01:00 by clawbot · 3 comments
Collaborator

sneak, on #227:

'discriminator' is now 'waf' everywhere. 'rproxy' and 'waf' are the two modes. the binary is now 'sww', so 'sww rproxy' and 'sww waf'.

Definition of done, one PR into next:

  • Every occurrence of discriminator, in any case and as part of any name, becomes waf: the command (sww waf), the package (internal/discriminator becomes internal/waf), types, functions, files, tests, comments, SPEC.md, README.md, AGENTS.md, docs/, the Dockerfile, deploy/, script/, the runit service, compose examples, log fields, metric names and labels, alert texts, and setting names that contain it, such as the one that tells rproxy where to find it.
  • Nothing else changes: no behaviour, and no other renames. A setting renamed this way keeps its default.
  • git grep -i discriminator finds nothing afterwards, except in EVALUATION.md if it speaks of other tools; say so in the PR body.
  • Where a new name would clash with one that exists (for example a type already called WAF), take the plainest free name and list each such case in the PR body.
  • Package docs stay true: internal/waf's doc says what the daemon does.

Start after #305 and #310 land, from current next. Edit by hand or through Go's own rename tooling run inside the build container; no sed -i or other scripted text replacement. 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 over SSH and post with tea, since GITEA_TOKEN is refused. Label the PR needs-review.

Model: opus-5-5

sneak, on https://git.eeqj.de/sneak/smallwebwaf/issues/227: > 'discriminator' is now 'waf' everywhere. 'rproxy' and 'waf' are the two modes. the binary is now 'sww', so 'sww rproxy' and 'sww waf'. **Definition of done**, one PR into `next`: - Every occurrence of `discriminator`, in any case and as part of any name, becomes `waf`: the command (`sww waf`), the package (`internal/discriminator` becomes `internal/waf`), types, functions, files, tests, comments, `SPEC.md`, `README.md`, `AGENTS.md`, `docs/`, the `Dockerfile`, `deploy/`, `script/`, the runit service, compose examples, log fields, metric names and labels, alert texts, and setting names that contain it, such as the one that tells `rproxy` where to find it. - Nothing else changes: no behaviour, and no other renames. A setting renamed this way keeps its default. - `git grep -i discriminator` finds nothing afterwards, except in `EVALUATION.md` if it speaks of other tools; say so in the PR body. - Where a new name would clash with one that exists (for example a type already called `WAF`), take the plainest free name and list each such case in the PR body. - Package docs stay true: `internal/waf`'s doc says what the daemon does. Start after https://git.eeqj.de/sneak/smallwebwaf/pulls/305 and https://git.eeqj.de/sneak/smallwebwaf/pulls/310 land, from current `next`. Edit by hand or through Go's own rename tooling run inside the build container; no `sed -i` or other scripted text replacement. 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 over SSH and post with `tea`, since `GITEA_TOKEN` is refused. Label the PR `needs-review`. Model: opus-5-5
clawbot self-assigned this 2026-11-11 00:57:22 +01:00
Owner

there is a new GITEA_TOKEN, talk to the sdlc top manager to learn about it. you can use 'sed -i' in big bulk atomic renames like this but make sure you grep first to know what you're changing. 'sww' is the binary name, the program is still called 'smallwebwaf', and the modes are 'waf' and 'rproxy'.

there is a new GITEA_TOKEN, talk to the sdlc top manager to learn about it. you can use 'sed -i' in big bulk atomic renames like this but make sure you grep first to know what you're changing. 'sww' is the binary name, the program is still called 'smallwebwaf', and the modes are 'waf' and 'rproxy'.
Author
Collaborator

Reading of sneak's comment above:

  • The program is still called "smallwebwaf". The binary is sww. Its two modes are waf and rproxy. So only discriminator is renamed; the name smallwebwaf stays wherever it names the program.
  • For a big bulk rename like this one, sed -i is allowed, once a grep has shown exactly what it will change. That replaces this issue's "no scripted text replacement" for this rename only.

For the worker: run the grep first and keep its output, apply sed -i to exactly those lines, then read the diff by hand for names that the rename breaks (a clash with an existing waf, a sentence that no longer reads). The PR body says that sed -i was used, and lists any line it changed by hand afterwards. Nothing else in the definition of done changes.

Model: opus-5-5

**Reading of sneak's comment above:** - The program is still called "smallwebwaf". The binary is `sww`. Its two modes are `waf` and `rproxy`. So only `discriminator` is renamed; the name smallwebwaf stays wherever it names the program. - For a big bulk rename like this one, `sed -i` is allowed, once a `grep` has shown exactly what it will change. That replaces this issue's "no scripted text replacement" for this rename only. **For the worker:** run the `grep` first and keep its output, apply `sed -i` to exactly those lines, then read the diff by hand for names that the rename breaks (a clash with an existing `waf`, a sentence that no longer reads). The PR body says that `sed -i` was used, and lists any line it changed by hand afterwards. Nothing else in the definition of done changes. Model: opus-5-5
Author
Collaborator

Built in #319: every discriminator is now waf, with internal/waf, sww waf and SWW_COMMAND=waf. No name clashed. The one change made by hand after sed -i: the rproxy test header is X-From-Waf, because the linter requires the canonical header spelling.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/smallwebwaf/pulls/319: every `discriminator` is now `waf`, with `internal/waf`, `sww waf` and `SWW_COMMAND=waf`. No name clashed. The one change made by hand after `sed -i`: the `rproxy` test header is `X-From-Waf`, because the linter requires the canonical header spelling. Model: opus-5-5
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/smallwebwaf#312