DEBUG now follows prompts/CODE_STYLEGUIDE.md item 7, as decided on #159: unset or empty leaves debug logging off, and any other value, false and 0 included, turns it on. No value of DEBUG stops the start any more; before, strconv.ParseBool accepted only 1, t, T, TRUE, true, True, 0, f, F, FALSE, false and False.
internal/config/config.go: DEBUG defaults to empty and is on when its value is not empty; the "must be true or false" error is gone.
internal/config/config_test.go: TestDebugMustBeTrueOrFalse is replaced by a test that unset and empty leave it off and false, 0 and yes turn it on, none of them stopping the start.
README.md: the DEBUG row of Settings and its entry under "Running under upaas" give the default as empty and say any non-empty value turns it on; the example of a value that stops the start no longer names DEBUG.
TODO.md: Completed Steps entry.
Not shown by the diff: bin/entrypoint.sh and the Dockerfile do not read or set DEBUG, so neither changes.
Judgement call: the same rule applies to a config file, so debug: false in /etc/netwatch-server/netwatch-server.yaml also turns debug logging on.
Model: opus-5-5
`DEBUG` now follows `prompts/CODE_STYLEGUIDE.md` item 7, as decided on https://git.eeqj.de/sneak/netwatch/issues/159: unset or empty leaves debug logging off, and any other value, `false` and `0` included, turns it on. No value of `DEBUG` stops the start any more; before, `strconv.ParseBool` accepted only `1`, `t`, `T`, `TRUE`, `true`, `True`, `0`, `f`, `F`, `FALSE`, `false` and `False`.
- `internal/config/config.go`: `DEBUG` defaults to empty and is on when its value is not empty; the "must be true or false" error is gone.
- `internal/config/config_test.go`: `TestDebugMustBeTrueOrFalse` is replaced by a test that unset and empty leave it off and `false`, `0` and `yes` turn it on, none of them stopping the start.
- `README.md`: the `DEBUG` row of Settings and its entry under "Running under upaas" give the default as empty and say any non-empty value turns it on; the example of a value that stops the start no longer names `DEBUG`.
- `TODO.md`: Completed Steps entry.
Not shown by the diff: `bin/entrypoint.sh` and the `Dockerfile` do not read or set `DEBUG`, so neither changes.
Judgement call: the same rule applies to a config file, so `debug: false` in `/etc/netwatch-server/netwatch-server.yaml` also turns debug logging on.
Model: opus-5-5
PR body, "Judgement call" line: /etc/netwatch/netwatch.yaml is not a file the server reads. config.New names the config file after the app name, which cmd/netwatch-server/main.go sets to netwatch-server, so the files are /etc/netwatch-server/netwatch-server.yaml and $HOME/.config/netwatch-server/netwatch-server.yaml. Acceptable: name one of those, or say "a config file" with no path.
TODO.md Completed Steps entry for this change (lines 24 to 28), and the first paragraph of the PR body: "only true, false, 1, 0 and their short forms were accepted before" is not what strconv.ParseBool did. It also accepted TRUE, True, FALSE and False, which are not short forms. Acceptable: add "and their upper-case forms", list the accepted values in full, or drop the clause.
Judgement call: a value of only spaces is a non-empty string in the code style guide's words, so the code is right to turn debug logging on for it.
Model: opus-5-5
1. PR body, "Judgement call" line: `/etc/netwatch/netwatch.yaml` is not a file the server reads. `config.New` names the config file after the app name, which `cmd/netwatch-server/main.go` sets to `netwatch-server`, so the files are `/etc/netwatch-server/netwatch-server.yaml` and `$HOME/.config/netwatch-server/netwatch-server.yaml`. Acceptable: name one of those, or say "a config file" with no path.
2. `TODO.md` Completed Steps entry for this change (lines 24 to 28), and the first paragraph of the PR body: "only `true`, `false`, `1`, `0` and their short forms were accepted before" is not what `strconv.ParseBool` did. It also accepted `TRUE`, `True`, `FALSE` and `False`, which are not short forms. Acceptable: add "and their upper-case forms", list the accepted values in full, or drop the clause.
Judgement call: a value of only spaces is a non-empty string in the code style guide's words, so the code is right to turn debug logging on for it.
Model: opus-5-5
The PR body now names /etc/netwatch-server/netwatch-server.yaml.
The TODO.md entry and the PR body now list every value strconv.ParseBool accepted; the commit message never made that claim, so it is unchanged.
Also fixed: the PR body called the DEBUG entry under "Running under upaas" a row; it is a list entry.
Model: opus-5-5
1. The PR body now names `/etc/netwatch-server/netwatch-server.yaml`.
2. The `TODO.md` entry and the PR body now list every value `strconv.ParseBool` accepted; the commit message never made that claim, so it is unchanged.
Also fixed: the PR body called the `DEBUG` entry under "Running under upaas" a row; it is a list entry.
Model: opus-5-5
DEBUG was read with strconv.ParseBool, so a value such as "yes" stopped
the start. It now follows the code style guide: unset or empty is off,
and any other value, "false" and "0" included, turns debug logging on.
No value of DEBUG stops the start. The test that "yes" fails is replaced
by one covering unset, empty, "false", "0" and "yes". README.md no
longer gives false as the default, and says which values turn it on.
Model: opus-5-5
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.
DEBUGnow followsprompts/CODE_STYLEGUIDE.mditem 7, as decided on #159: unset or empty leaves debug logging off, and any other value,falseand0included, turns it on. No value ofDEBUGstops the start any more; before,strconv.ParseBoolaccepted only1,t,T,TRUE,true,True,0,f,F,FALSE,falseandFalse.internal/config/config.go:DEBUGdefaults to empty and is on when its value is not empty; the "must be true or false" error is gone.internal/config/config_test.go:TestDebugMustBeTrueOrFalseis replaced by a test that unset and empty leave it off andfalse,0andyesturn it on, none of them stopping the start.README.md: theDEBUGrow of Settings and its entry under "Running under upaas" give the default as empty and say any non-empty value turns it on; the example of a value that stops the start no longer namesDEBUG.TODO.md: Completed Steps entry.Not shown by the diff:
bin/entrypoint.shand theDockerfiledo not read or setDEBUG, so neither changes.Judgement call: the same rule applies to a config file, so
debug: falsein/etc/netwatch-server/netwatch-server.yamlalso turns debug logging on.Model: opus-5-5
/etc/netwatch/netwatch.yamlis not a file the server reads.config.Newnames the config file after the app name, whichcmd/netwatch-server/main.gosets tonetwatch-server, so the files are/etc/netwatch-server/netwatch-server.yamland$HOME/.config/netwatch-server/netwatch-server.yaml. Acceptable: name one of those, or say "a config file" with no path.TODO.mdCompleted Steps entry for this change (lines 24 to 28), and the first paragraph of the PR body: "onlytrue,false,1,0and their short forms were accepted before" is not whatstrconv.ParseBooldid. It also acceptedTRUE,True,FALSEandFalse, which are not short forms. Acceptable: add "and their upper-case forms", list the accepted values in full, or drop the clause.Judgement call: a value of only spaces is a non-empty string in the code style guide's words, so the code is right to turn debug logging on for it.
Model: opus-5-5
4e660530cbto415f2f41ac/etc/netwatch-server/netwatch-server.yaml.TODO.mdentry and the PR body now list every valuestrconv.ParseBoolaccepted; the commit message never made that claim, so it is unchanged.Also fixed: the PR body called the
DEBUGentry under "Running under upaas" a row; it is a list entry.Model: opus-5-5
Review passed.
Model: opus-5-5
415f2f41acto71f9032041