multica-ai/multica · error
%s must be 'true' or 'false' (got %q)
Error message
%s must be 'true' or 'false' (got %q)
What it means
assignBool, shared by the disable_* toggles (disable_auto_update, disable_auto_reload), parses the value with strconv.ParseBool. It accepts true/false (and 1/0/t/f), but the error message advertises the strict 'true'/'false' contract. Empty string is handled before parsing as 'clear (false)'.
Source
Thrown at server/cmd/multica/cmd_config.go:266
if err := assignBool(&cfg.DisableAutoReload, key, value); err != nil {
return err
}
default:
return fmt.Errorf("unknown config key %q (supported: %s)", key, joinKeys(configSetSupportedKeys))
}
return nil
}
// assignBool parses value as a strict bool into dst. Shared by the
// disable_* toggles. Empty string clears the field (false).
func assignBool(dst *bool, key, value string) error {
if value == "" {
*dst = false
return nil
}
b, err := strconv.ParseBool(value)
if err != nil {
return fmt.Errorf("%s must be 'true' or 'false' (got %q)", key, value)
}
*dst = b
return nil
}
// assignPositiveDuration parses value as a strictly-positive Go duration
// and writes the raw string into dst. Shared by every persisted daemon
// duration knob except agent_timeout, whose zero value is meaningful.
// Empty string clears the field.
func assignPositiveDuration(dst *string, key, value string) error {
if value == "" {
*dst = ""
return nil
}
normalized := strings.TrimSpace(value)
d, err := time.ParseDuration(normalized)
if err != nil {
return fmt.Errorf("%s must be a Go duration (e.g. 10s, 500ms): %w", key, err)View on GitHub (pinned to 2c0912b6ec)
Solutions
- Use literal true or false: `multica config set disable_auto_update true`.
- Quote the value and strip spaces in scripts: `-- ... "$(echo "$VAL" | tr -d ' ')"`.
- To clear the toggle back to false: pass an empty string.
Example fix
# before multica config set disable_auto_update yes # after multica config set disable_auto_update true
Defensive patterns
Strategy: validation
Validate before calling
# normalize booleans before config set
case "${VAL,,}" in true|1) VAL=true ;; false|0) VAL=false ;; *) echo "bool must be true/false" >&2; exit 2 ;; esac
multica config set disable_auto_update "$VAL" Prevention
- Always pass literal true/false to disable_* toggles.
- If values come from YAML/Ansible, map yes/no/on/off to true/false in a preflight step.
When it happens
Trigger: `multica config set disable_auto_update yes`, `... on`, `... True ` with whitespace, or `... enable`.
Common situations: YAML/JSON muscle memory ('enable: true'); shells passing unquoted values with spaces; Ansible-style 'yes/no' booleans.
Related errors
- max_concurrent_tasks must be an integer: %w
- max_concurrent_tasks must be >= 0 (got %d)
- poll_interval must be a Go duration (e.g. 10s, 500ms): %w
- poll_interval must be positive (got %s); use `config set pol
- agent_timeout must be a Go duration (e.g. 10m, 0s to disable
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/316ff3bf15884ed6.
Report an issue: GitHub.