cosmetic: a non-numeric chunk_size or blob_size_limit fails with an error that names neither the setting nor the value #429

Closed
opened 2026-11-11 01:01:48 +01:00 by clawbot · 2 comments
Collaborator

Found by the acceptance test (#418).

Steps to reproduce

  • Put chunk_size: banana in the config and run any command.

What happened

failed to load config: failed to parse config: invalid size format: strconv.ParseFloat: parsing "": invalid syntax. The message names no setting, no line and not even the value; the quoted string is empty. Other bad values do better: compression_level: fast gives line 3: cannot unmarshal !!str "fast" into int, and a bad prune_grace_period names its line.

What should happen

The error names the setting and quotes the value, for example chunk_size: "banana" is not a size; use a number of bytes or a unit such as 10MB.

Model: fable-5-1

Found by the acceptance test (https://git.eeqj.de/sneak/vaultik/issues/418). **Steps to reproduce** - Put `chunk_size: banana` in the config and run any command. **What happened** `failed to load config: failed to parse config: invalid size format: strconv.ParseFloat: parsing "": invalid syntax`. The message names no setting, no line and not even the value; the quoted string is empty. Other bad values do better: `compression_level: fast` gives `line 3: cannot unmarshal !!str "fast" into int`, and a bad `prune_grace_period` names its line. **What should happen** The error names the setting and quotes the value, for example `chunk_size: "banana" is not a size; use a number of bytes or a unit such as 10MB`. Model: fable-5-1
Author
Collaborator

Plan: a size setting that is not a number or a unit fails at load with an error that names the setting and quotes the value, for example chunk_size: "banana" is not a size; use a number of bytes or a unit such as 10MB. This covers every size setting.

Package: internal/config. Starts after #419 merges, which changes the same package.

For every unit from the acceptance test

  • One branch off current next, one PR with base next, labelled needs-review and assigned to clawbot. The title ends (closes #N).
  • Add nothing to docs/TODO.md. sneak ruled on 11 November that it is not a history document (#440).
  • README.md on next: change only a sentence the fix makes false. The rewritten README in #399 is with sneak and is updated after this merges.
  • A test that fails on current next shows the fix. Run make fmt and make check before the final push.

Model: opus-5-5

Plan: a size setting that is not a number or a unit fails at load with an error that names the setting and quotes the value, for example `chunk_size: "banana" is not a size; use a number of bytes or a unit such as 10MB`. This covers every size setting. Package: `internal/config`. Starts after https://git.eeqj.de/sneak/vaultik/issues/419 merges, which changes the same package. **For every unit from the acceptance test** - One branch off current `next`, one PR with base `next`, labelled `needs-review` and assigned to `clawbot`. The title ends `(closes #N)`. - Add nothing to `docs/TODO.md`. sneak ruled on 11 November that it is not a history document (https://git.eeqj.de/sneak/vaultik/issues/440). - `README.md` on `next`: change only a sentence the fix makes false. The rewritten README in https://git.eeqj.de/sneak/vaultik/pulls/399 is with sneak and is updated after this merges. - A test that fails on current `next` shows the fix. Run `make fmt` and `make check` before the final push. Model: opus-5-5
clawbot self-assigned this 2026-11-11 01:21:30 +01:00
Author
Collaborator

Built in #452: a size setting that does not parse now fails with chunk_size: "banana" is not a size; use a number of bytes or a unit such as 10MB. This covers every size setting, values filled in by ${...} references, and config set. The error gives no line number, because values are checked after references are filled in, in a copy of the config without lines.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/vaultik/pulls/452: a size setting that does not parse now fails with `chunk_size: "banana" is not a size; use a number of bytes or a unit such as 10MB`. This covers every size setting, values filled in by `${...}` references, and `config set`. The error gives no line number, because values are checked after references are filled in, in a copy of the config without lines. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#429