Byte-size settings: the defaults and the chunk-size minimum are 1024-based while the docs, the parser and the messages are 1000-based #313

Open
opened 2026-10-13 00:47:16 +02:00 by clawbot · 0 comments
Collaborator

Found by the defect hunt in #288 (parts 1, 2, 4 and 5).

What is wrong: defaultChunkSize, defaultBlobSizeLimit and minChunkSize (internal/config/config.go) are 10 MiB, 10 GiB and 1 MiB, while the size parser reads 10MB as 10,000,000 bytes (humanize.ParseBytes) and the docs and info use 1000-based units.

How it was shown: chunk_size: 1MB is rejected with "chunk_size must be at least 1MB". The config init template (internal/cli/config.go) lists 1MB and 64KB as accepted values for chunk_size, and config.example.yml lists 500KB under "Supports:"; all are rejected. blob_size_limit: 40MB, four times the documented 10MB default chunk size (the README's stated minimum), is rejected. With no size settings, info shows "Blob Size Limit: 11 GB", although the documented default is 10GB, and writing that default out (blob_size_limit: 10GB) changes it.

Definition of done

  • The defaults, the minimums, the error messages, the README, config.example.yml and the config init template all use one unit convention, and every example value they list is accepted.
  • Recommended: 1000-based, matching the parser, the docs and the display. If the chunker needs 1024-based sizes, keep those and say MiB/GiB everywhere instead; say which in the PR.
  • Tests cover the documented defaults, the minimum chunk size and each listed example.

Model: opus-5-5

Found by the defect hunt in https://git.eeqj.de/sneak/vaultik/issues/288 (parts 1, 2, 4 and 5). **What is wrong:** `defaultChunkSize`, `defaultBlobSizeLimit` and `minChunkSize` (`internal/config/config.go`) are 10 MiB, 10 GiB and 1 MiB, while the size parser reads `10MB` as 10,000,000 bytes (`humanize.ParseBytes`) and the docs and `info` use 1000-based units. **How it was shown:** `chunk_size: 1MB` is rejected with "chunk_size must be at least 1MB". The `config init` template (`internal/cli/config.go`) lists `1MB` and `64KB` as accepted values for `chunk_size`, and `config.example.yml` lists `500KB` under "Supports:"; all are rejected. `blob_size_limit: 40MB`, four times the documented `10MB` default chunk size (the README's stated minimum), is rejected. With no size settings, `info` shows "Blob Size Limit: 11 GB", although the documented default is `10GB`, and writing that default out (`blob_size_limit: 10GB`) changes it. **Definition of done** - The defaults, the minimums, the error messages, the README, `config.example.yml` and the `config init` template all use one unit convention, and every example value they list is accepted. - Recommended: 1000-based, matching the parser, the docs and the display. If the chunker needs 1024-based sizes, keep those and say MiB/GiB everywhere instead; say which in the PR. - Tests cover the documented defaults, the minimum chunk size and each listed example. Model: opus-5-5
clawbot self-assigned this 2026-10-13 00:47:16 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#313