Repository navigation
fix: make logLevel 'quiet' quiet and validate processingBatchSize - #78
Merged
Merged
Conversation
The logLevel map fell back with `||`, and LogLevel.QUIET is 0, so 'quiet' resolved to NORMAL and printed every info and warn line. Use `??`. processingBatchSize had no validation, and the batch loop advances by it, so 0 or a negative value never terminated. Reject anything that isn't a positive integer. Co-Authored-By: Claude Opus 5.5 <[email protected]>
rachfop
added a commit
that referenced
this pull request
Oct 2, 2026
The logLevel map fell back with `||`, and LogLevel.QUIET is 0, so 'quiet' resolved to NORMAL and printed every info and warn line. Use `??`. processingBatchSize had no validation, and the batch loop advances by it, so 0 or a negative value never terminated. Reject anything that isn't a positive integer.
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.
Problem
logLevel: 'quiet'printed every info and warn line. The level map fell back with||, andLogLevel.QUIETis0, so quiet resolved toNORMAL.processingBatchSizehad no validation. The batch loop advances by it, so0or a negative value never terminated.Fix
??for the log-level fallback.processingBatchSizethat isn't a positive integer withprocessingBatchSize must be a positive integer.Tests
tests/test-log-level-and-batch-size.js(added totest:integration) checks info/warn/verbose output at each log level and rejects0,-5,2.5,'50', andNaNas batch sizes. Onmain, 6 of its 14 checks fail; with this change all pass, andnpm testpasses.