An unknown key in the config file aborts startup, so a typo fails loudly. An environment variable is not held to that: a misspelled PIXA_ name (for example PIXA_TRUSTED_PROXY) or PIXA_PORT (the port is read from PORT) is ignored without a word, and the setting silently keeps its file value or default.
Definition of done
At startup, an environment variable whose name starts with PIXA_ and is neither a setting's variable nor PIXA_CONFIG_PATH aborts startup naming it, the same way an unknown config key does. For PIXA_PORT the message says to use PORT.
Failing tests first, with t.Setenv: a misspelled PIXA_ variable aborts naming it; PIXA_PORT aborts pointing to PORT; PIXA_CONFIG_PATH and every setting's variable are accepted.
Found in review of https://git.eeqj.de/sneak/pixa/pulls/131 (https://git.eeqj.de/sneak/pixa/issues/128).
An unknown key in the config file aborts startup, so a typo fails loudly. An environment variable is not held to that: a misspelled `PIXA_` name (for example `PIXA_TRUSTED_PROXY`) or `PIXA_PORT` (the port is read from `PORT`) is ignored without a word, and the setting silently keeps its file value or default.
## Definition of done
- At startup, an environment variable whose name starts with `PIXA_` and is neither a setting's variable nor `PIXA_CONFIG_PATH` aborts startup naming it, the same way an unknown config key does. For `PIXA_PORT` the message says to use `PORT`.
- Failing tests first, with `t.Setenv`: a misspelled `PIXA_` variable aborts naming it; `PIXA_PORT` aborts pointing to `PORT`; `PIXA_CONFIG_PATH` and every setting's variable are accepted.
- `README.md`'s variable table section says unknown `PIXA_` variables abort startup.
Model: opus-5-5
clawbot
added this to the 1.0.0 milestone 2026-09-28 13:10:15 +02:00
A new check sits next to the one that rejects unknown config file keys. Every environment variable whose name starts with PIXA_ must be in the list pairing each config key with its variable (from #128) or be PIXA_CONFIG_PATH. Any other aborts startup, all of them named in one message, as unknown keys are: unknown environment variables: PIXA_TRUSTED_PROXY. PIXA_PORT is listed as PIXA_PORT (the port is set by PORT).
Judgement call: the check runs after the config file loads, so a PIXA_ name in the file's env: section is held to the same rule. The README already says those names act as environment variables. The existing test for the env: section sets PIXA_TEST_ENV_INJECTION, which smartconfig puts in the whole test process's environment. It moves to a name without the prefix.
Failing tests first, with t.Setenv: a misspelled name aborts naming it; PIXA_PORT aborts pointing to PORT; PIXA_CONFIG_PATH together with every setting's variable loads. The config tests still unset PORT and every PIXA_ variable before they run.
README.md: one sentence in the Configuration section, above the variable table.
Model: opus-5-5
Plan:
- A new check sits next to the one that rejects unknown config file keys. Every environment variable whose name starts with `PIXA_` must be in the list pairing each config key with its variable (from https://git.eeqj.de/sneak/pixa/issues/128) or be `PIXA_CONFIG_PATH`. Any other aborts startup, all of them named in one message, as unknown keys are: `unknown environment variables: PIXA_TRUSTED_PROXY`. `PIXA_PORT` is listed as `PIXA_PORT (the port is set by PORT)`.
- Judgement call: the check runs after the config file loads, so a `PIXA_` name in the file's `env:` section is held to the same rule. The README already says those names act as environment variables. The existing test for the `env:` section sets `PIXA_TEST_ENV_INJECTION`, which smartconfig puts in the whole test process's environment. It moves to a name without the prefix.
- Failing tests first, with `t.Setenv`: a misspelled name aborts naming it; `PIXA_PORT` aborts pointing to `PORT`; `PIXA_CONFIG_PATH` together with every setting's variable loads. The config tests still unset `PORT` and every `PIXA_` variable before they run.
- `README.md`: one sentence in the Configuration section, above the variable table.
Model: opus-5-5
Built in #136, as planned except for one point. The check runs in New right after the config file loads, not next to the unknown-key check, so names set by a file's env: section are checked, and the existing test for that section, which does not go through New, keeps its PIXA_TEST_ENV_INJECTION unchanged, per the repo's rule against editing existing tests without the owner's approval.
Model: opus-5-5
Built in https://git.eeqj.de/sneak/pixa/pulls/136, as planned except for one point. The check runs in `New` right after the config file loads, not next to the unknown-key check, so names set by a file's `env:` section are checked, and the existing test for that section, which does not go through `New`, keeps its `PIXA_TEST_ENV_INJECTION` unchanged, per the repo's rule against editing existing tests without the owner's approval.
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.
Found in review of #131 (#128).
An unknown key in the config file aborts startup, so a typo fails loudly. An environment variable is not held to that: a misspelled
PIXA_name (for examplePIXA_TRUSTED_PROXY) orPIXA_PORT(the port is read fromPORT) is ignored without a word, and the setting silently keeps its file value or default.Definition of done
PIXA_and is neither a setting's variable norPIXA_CONFIG_PATHaborts startup naming it, the same way an unknown config key does. ForPIXA_PORTthe message says to usePORT.t.Setenv: a misspelledPIXA_variable aborts naming it;PIXA_PORTaborts pointing toPORT;PIXA_CONFIG_PATHand every setting's variable are accepted.README.md's variable table section says unknownPIXA_variables abort startup.Model: opus-5-5
Plan:
PIXA_must be in the list pairing each config key with its variable (from #128) or bePIXA_CONFIG_PATH. Any other aborts startup, all of them named in one message, as unknown keys are:unknown environment variables: PIXA_TRUSTED_PROXY.PIXA_PORTis listed asPIXA_PORT (the port is set by PORT).PIXA_name in the file'senv:section is held to the same rule. The README already says those names act as environment variables. The existing test for theenv:section setsPIXA_TEST_ENV_INJECTION, which smartconfig puts in the whole test process's environment. It moves to a name without the prefix.t.Setenv: a misspelled name aborts naming it;PIXA_PORTaborts pointing toPORT;PIXA_CONFIG_PATHtogether with every setting's variable loads. The config tests still unsetPORTand everyPIXA_variable before they run.README.md: one sentence in the Configuration section, above the variable table.Model: opus-5-5
Built in #136, as planned except for one point. The check runs in
Newright after the config file loads, not next to the unknown-key check, so names set by a file'senv:section are checked, and the existing test for that section, which does not go throughNew, keeps itsPIXA_TEST_ENV_INJECTIONunchanged, per the repo's rule against editing existing tests without the owner's approval.Model: opus-5-5