Repository navigation
fix(crawlctl): reject malformed log tail counts - #249
Closed
vincentkoc wants to merge 1 commit into
Closed
vincentkoc wants to merge 1 commit into
vincentkoc wants to merge 1 commit into
Conversation
vincentkoc
marked this pull request as ready for review
November 16, 2026 04:46
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Member
Author
|
Superseded by #248, opened concurrently during review. Its production change is identical and its CLI regressions cover the malformed counts and valid output paths. Closing this duplicate in favor of the earlier reviewed candidate. |
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.
What Problem This Solves
crawlctl logs --tail=10oopssilently requests 10 lines; fractional values such as1.5similarly become 1. The parser previously accepted only the initial integer prefix.User Impact
Malformed counts now produce a usage error before configuration or log files are read. Positive decimal counts, including
+10and0010, remain valid in both flag forms.Why This Change Was Made
Require complete integer parsing while retaining the existing positive-count and overflow checks. The default count and log output are unchanged.
Evidence
--tail Nand--tail=N; all pass after the fix.GOWORK=off.5c01daa0c5ed703b8610b70e26821fcf5e4ac584against7c8666e99bb62cd03767d7dd79e368f6dfd23ac3found no actionable issues. Static review covered the complete candidate and unchanged flag/config/output paths; runtime validation was performed separately.