Isolate config tests from the shell; any out-of-range PORT is ErrInvalidPort (closes #94) #444

Merged
clawbot merged 1 commits from issue-94-config-test-hygiene into next 2026-10-02 17:44:30 +02:00
1 Commits
Author SHA1 Message Date
sneak c13aa5f9e7 Isolate config tests from the shell; any out-of-range PORT is ErrInvalidPort (closes #94)
check / check (push) Waiting to run
Config tests, and the first-boot debug log test that builds a Config,
start from an empty environment: config.ClearEnvForTest unsets every
variable the process has and, when the test ends, leaves the
environment exactly as it found it, so nothing exported in the
developer's shell changes a result and nothing a test sets outlives it.
TestEnvPositiveInt and TestEnvPort share one table runner, and
TestEnvPort checks that the bad value appears in each error.

Every out-of-range PORT now wraps ErrInvalidPort: zero, negatives,
above 65535, and numbers too large or too small for an int.

The README configuration table and the Settings page say that a
RETENTION_SWEEP_INTERVAL that does not parse, or is zero or negative,
fails startup.

Model: opus-5-5
2026-10-02 15:25:20 +00:00