Skip to content

chore: correct the empty MAX_CONCURRENT_SESSIONS comment in parseEnvConfigs - #370

Merged
Bccorb merged 1 commit into
mainfrom
chore/max-sessions-empty-comment
Oct 7, 2026
Merged

Bccorb merged 1 commit into
mainfrom
chore/max-sessions-empty-comment

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Summary

The comment on the max_concurrent_sessions case in src/utils/parseEnvConfigs.ts said an empty value means no limit. bootstrapSystemConfig.ts skips empty env values (if (envValue && existing.updatedBy == null) when a row exists, if (!envValue) when none does), so '' never reaches the parser. It counts as unset: an existing cap is kept, and with no row the null default applies. Only a whitespace-only value reaches the value === '' branch after trim().

  • Comment fixed. No runtime change, and the empty check is kept for whitespace-only values.
  • New test tests/unit/config/bootstrapMaxConcurrentSessions.spec.ts, using the real parser and defaults:
    • empty with an existing cap of 3: the cap is kept
    • empty with no row: nothing is written and the value resolves to null
    • whitespace-only over a cap: the row is removed and the value resolves to null

No changeset (comment plus test).

Testing

npm audit --omit=dev --audit-level=high, check:changeset-bump, lint, format:check, CI=true npm run coverage (1768 passed), typecheck, and build pass.

Closes #366

…onfigs

The comment on the max_concurrent_sessions case said an empty value means
no limit. bootstrapSystemConfig skips empty env values before parsing, so
MAX_CONCURRENT_SESSIONS='' is treated as unset: an existing cap is kept,
and with no row the default applies. Only a whitespace-only value reaches
the parser's empty check, where it is empty after trimming.

The comment now describes that. Runtime behavior is unchanged, and the
empty check stays because it still serves whitespace-only values.

Add a bootstrap test, using the real parser and defaults, that pins the
empty value as unset (existing cap kept, default used when no row) and
the whitespace-only value as no limit.

Closes #366
@Bccorb
Bccorb merged commit c8f9549 into main Oct 7, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: correct the empty MAX_CONCURRENT_SESSIONS comment in parseEnvConfigs

1 participant