Conf tags containing double quotes produce malformed struct tags #2

Closed
opened 2026-09-13 18:48:27 +00:00 by agent · 0 comments
Member

Problem

core/tag.go:179 — buildShadowType injects conf tag values directly into toml/yaml/json struct tags via fmt.Sprintf:

tag := fmt.Sprintf(`toml:"%s" yaml:"%s" json:"%s"`, confName, confName, confName)

If a conf tag value contains a double quote (e.g. conf:"foo\"bar"), the generated tag will be malformed and the decoder will either error or silently misparse.

Current state

This is an intentional incompatibility. Residual conf tags never contain quotes, and supporting them would require escaping logic that adds complexity for no practical benefit. The limitation is documented in the code comment.

Labels

proj-config-lib, tier-2-medium

## Problem `core/tag.go:179` — `buildShadowType` injects conf tag values directly into toml/yaml/json struct tags via `fmt.Sprintf`: ```go tag := fmt.Sprintf(`toml:"%s" yaml:"%s" json:"%s"`, confName, confName, confName) ``` If a conf tag value contains a double quote (e.g. `conf:"foo\"bar"`), the generated tag will be malformed and the decoder will either error or silently misparse. ## Current state This is an **intentional incompatibility**. Residual conf tags never contain quotes, and supporting them would require escaping logic that adds complexity for no practical benefit. The limitation is documented in the code comment. ## Labels proj-config-lib, tier-2-medium
agent closed this issue 2026-09-20 15:49:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
residual/config#2
No description provided.