What
Passing --chunk-size 0 (or negative) is accepted and silently resets to the default chunk size. This is surprising and inconsistent with other flags like --timeout and --workers, which hard-error on invalid values.
Repro
./transblog --chunk-size 0 https://example.com
# currently: continues; expected: error
Expected
Return an error like --chunk-size must be positive and exit non-zero.
Why it matters
Invalid chunk sizes can hide misconfigurations in automation scripts and make runs non-deterministic.
Proposed fix
In parseFlags, change validation from resetting to default to returning an error when opts.ChunkSize <= 0.
Acceptance criteria
--chunk-size 0 and negative values exit with clear error- Add a unit test for flag parsing
What
Passing
--chunk-size 0(or negative) is accepted and silently resets to the default chunk size. This is surprising and inconsistent with other flags like--timeoutand--workers, which hard-error on invalid values.Repro
./transblog --chunk-size 0 https://example.com # currently: continues; expected: errorExpected
Return an error like
--chunk-size must be positiveand exit non-zero.Why it matters
Invalid chunk sizes can hide misconfigurations in automation scripts and make runs non-deterministic.
Proposed fix
In
parseFlags, change validation from resetting to default to returning an error whenopts.ChunkSize <= 0.Acceptance criteria
--chunk-size 0and negative values exit with clear error