Repository navigation
chore: correct the empty MAX_CONCURRENT_SESSIONS comment in parseEnvConfigs - #370
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The comment on the
max_concurrent_sessionscase insrc/utils/parseEnvConfigs.tssaid an empty value means no limit.bootstrapSystemConfig.tsskips 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 thenulldefault applies. Only a whitespace-only value reaches thevalue === ''branch aftertrim().tests/unit/config/bootstrapMaxConcurrentSessions.spec.ts, using the real parser and defaults:nullnullNo 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, andbuildpass.Closes #366