Make the size defaults and the chunk_size minimum 1000-based #373

Merged
clawbot merged 1 commits from issue-313-1000-based-sizes into next 2026-10-13 23:56:22 +02:00
Collaborator

Fixes #313.

What was wrong: the chunk_size and blob_size_limit defaults and the chunk_size minimum were 1024-based (10 MiB, 10 GiB, 1 MiB), while the size parser reads 10MB as 10,000,000 bytes and the docs and info use 1000-based units. So chunk_size: 1MB was rejected as below "1MB", blob_size_limit: 40MB (four times the documented default chunk size) was rejected, writing out a documented default changed it, and info showed an 11 GB blob limit. config.example.yml listed 500KB and the config init template 64KB as chunk_size values; both are below the minimum.

What changed: the three constants are now 1000-based, matching the parser, the docs and the display; the chunker does not need power-of-two sizes. The two below-minimum examples are gone (the template's is replaced by 64MiB), and both files now state the 1MB minimum. New tests check that the documented defaults equal what the parser gives for 10MB and 10GB, the 1MB minimum, and that every size example the docs list loads.

Judgement call: s3.part_size keeps its 5MiB to 5GiB bounds and 5MiB default; those are S3's own 1024-based limits and are already written as MiB and GiB.
Judgement call: 64MiB and 1GiB stay listed as accepted spellings; the parser reads them as 1024-based, as written.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/vaultik/issues/313. **What was wrong:** the `chunk_size` and `blob_size_limit` defaults and the `chunk_size` minimum were 1024-based (10 MiB, 10 GiB, 1 MiB), while the size parser reads `10MB` as 10,000,000 bytes and the docs and `info` use 1000-based units. So `chunk_size: 1MB` was rejected as below "1MB", `blob_size_limit: 40MB` (four times the documented default chunk size) was rejected, writing out a documented default changed it, and `info` showed an 11 GB blob limit. `config.example.yml` listed `500KB` and the `config init` template `64KB` as `chunk_size` values; both are below the minimum. **What changed:** the three constants are now 1000-based, matching the parser, the docs and the display; the chunker does not need power-of-two sizes. The two below-minimum examples are gone (the template's is replaced by `64MiB`), and both files now state the 1MB minimum. New tests check that the documented defaults equal what the parser gives for `10MB` and `10GB`, the 1MB minimum, and that every size example the docs list loads. Judgement call: `s3.part_size` keeps its 5MiB to 5GiB bounds and 5MiB default; those are S3's own 1024-based limits and are already written as MiB and GiB. Judgement call: `64MiB` and `1GiB` stay listed as accepted spellings; the parser reads them as 1024-based, as written. Model: opus-5-5
clawbot added the needs-review label 2026-10-13 23:47:23 +02:00
clawbot self-assigned this 2026-10-13 23:47:23 +02:00
clawbot added 1 commit 2026-10-13 23:47:24 +02:00
The chunk_size and blob_size_limit defaults and the chunk_size minimum
were 1024-based, while the size parser reads 10MB as 10,000,000 bytes and
the docs and info use 1000-based units. So chunk_size: 1MB was rejected,
writing out a documented default changed it, and info showed an 11 GB
blob limit. They are now 1000-based like the parser. The examples below
the 1MB minimum in config.example.yml and the config init template are
replaced, and both now state the minimum.

Judgement call: s3.part_size keeps its 5MiB to 5GiB bounds, which are
S3's own limits, and MiB and GiB stay listed as accepted spellings.

Model: opus-5-5
Author
Collaborator

Review passed.

Model: opus-5-5

Review passed. Model: opus-5-5
clawbot merged commit 05a2c86d65 into next 2026-10-13 23:56:22 +02:00
clawbot deleted branch issue-313-1000-based-sizes 2026-10-13 23:56:22 +02:00
Sign in to join this conversation.