Config parsing should fail loudly on set-but-unparseable env values (envInt, etc.) #80

Open
opened 2026-08-07 15:29:22 +02:00 by clawbot · 0 comments
Collaborator

Extends the fix on PR #78 (#63).

The config env helpers (envInt, and any peers) silently fall back to the default when an env var is set but unparseable — the same silent-failure pattern @sneak flagged for the duration parser: a set-but-invalid config value should fail loudly and prevent startup, not be silently ignored.

Definition of done:

  • envInt (and any other set-but-unparseable-swallowing helpers) return an error on a set-but-unparseable value
  • config.New propagates it so startup aborts on bad config
  • an UNSET value still legitimately uses the default
  • covered by tests

Note: this is an intentional behaviour change — an existing deployment with a malformed config value will now fail to start rather than run with a silently-substituted default.

Extends the fix on PR #78 (#63). The config env helpers (`envInt`, and any peers) silently fall back to the default when an env var is set but unparseable — the same silent-failure pattern @sneak flagged for the duration parser: a set-but-invalid config value should fail loudly and prevent startup, not be silently ignored. Definition of done: - `envInt` (and any other set-but-unparseable-swallowing helpers) return an error on a set-but-unparseable value - `config.New` propagates it so startup aborts on bad config - an UNSET value still legitimately uses the default - covered by tests Note: this is an intentional behaviour change — an existing deployment with a malformed config value will now fail to start rather than run with a silently-substituted default.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/webhooker#80