Skip to content

Bug: --chunk-size <= 0 silently resets to default (should error) #1

Description

@Congregalis

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions