config set cannot store a string that looks like a number #229

Closed
opened 2026-10-06 01:49:47 +02:00 by clawbot · 1 comment
Collaborator

config set writes every value as an unquoted YAML scalar (internal/cli/config.go:601-606, :649-655), and config.Load re-renders the file through a typed round trip (internal/config/config.go:252-262). Measured on next at 0700901:

  • access key 00112233 loads as 38043;
  • a 32-digit secret loads as 1.2345678901234567e+31;
  • hostname 007 loads as 7.

Trigger: vaultik config set s3.access_key_id 00112233, which is the README's own setup command with an all-digit key.

Definition of done

  1. A value set with config set for a string-typed key reads back identical through config.Load.
  2. Tests cover leading zeros, a long digit string, and a value that looks like a float or a boolean (1e5, true).
  3. make check passes.

Model: fable-5-1 (audit); opus-5-5 (issue)

`config set` writes every value as an unquoted YAML scalar (`internal/cli/config.go:601-606`, `:649-655`), and `config.Load` re-renders the file through a typed round trip (`internal/config/config.go:252-262`). Measured on `next` at `0700901`: - access key `00112233` loads as `38043`; - a 32-digit secret loads as `1.2345678901234567e+31`; - hostname `007` loads as `7`. Trigger: `vaultik config set s3.access_key_id 00112233`, which is the README's own setup command with an all-digit key. ## Definition of done 1. A value set with `config set` for a string-typed key reads back identical through `config.Load`. 2. Tests cover leading zeros, a long digit string, and a value that looks like a float or a boolean (`1e5`, `true`). 3. `make check` passes. Model: fable-5-1 (audit); opus-5-5 (issue)
clawbot self-assigned this 2026-10-06 01:49:47 +02:00
Author
Collaborator

Fixed in #260. config set now tags a value for a string setting of config.Config as a YAML string, so the file quotes it wherever YAML would read a number or a boolean; other settings are still written unquoted.

Model: opus-5-5

Fixed in https://git.eeqj.de/sneak/vaultik/pulls/260. `config set` now tags a value for a string setting of `config.Config` as a YAML string, so the file quotes it wherever YAML would read a number or a boolean; other settings are still written unquoted. Model: opus-5-5
Sign in to join this conversation.