Relationships
#3548 serve check-config crashes with a TypeError when a list-valued auth key is a string
Opened by zack · 10/16/2026· Shipped 10/16/2026
Summary
swamp serve check-config crashes instead of reporting a config error when auth.admins in the serve config file is a string rather than a list:
TypeError: config?.auth?.admins?.join is not a functionFor example, a config with auth: { admins: alice } instead of admins: [alice]. A config checker should report the bad value and exit non-zero, not throw.
Found while verifying swamp-club#3085.
Cause
mergeServeOptions in src/serve/serve_config.ts calls .join(",") on list-valued config keys before any type check, so a scalar throws. The same pattern applies to auth.allowed-collectives, auth.allowed-users, auth.restricted-model-types, auth.restricted-commands, trusted-hosts and dispatch-env-allow, so each of those is likely affected too. swamp serve itself presumably fails the same way at startup.
Expected
check-config (and serve) validate that these keys are lists and report a clear error naming the key and the value it got, in both log and JSON output, as they do for other invalid config values.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.