config: degrade an unknown enum token per field #316
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!316
Loading…
Reference in a new issue
No description provided.
Delete branch "config-enum-fallback"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A closed config enum had no forward-compatible growth rule: one token an older build did not recognize failed the whole merged document and replaced every setting with the built-in defaults, so a file a newer felis wrote lost its font, theme, keymap, and window settings over one presentation option.
An unknown string token now degrades only its own field to that field's documented default and emits a
valuewarning carrying the full key path,client.felis.prefix included when the overlay wrote it. Shape is still checked, so a number or a table where a token belongs stays a structural error, as do syntax errors and structurally unreadable TOML.shader.postdegrades at the smallest typed boundary: an unrecognizedbuiltinname or an unknown outer selector leaves the rest of[shader]alone and reportsshader.post.builtinorshader.post.Because the failure became a warning,
felis config checkreports it at exit 0, startup loads the document instead of falling to defaults, and live reload applies the degraded value rather than keeping the previous state. The generated JSON schema is unchanged apart from a$commentsentence: it keeps enumerating only the tokens this build understands, since editor validation describes the vocabulary in hand while the runtime rule is what carries a file between versions.Docs:
docs/reference/config.md(the additive-schema sentence and two rows in the malformed-value table), a new decision bullet indocs/explanation/architecture/control-surfaces.md"Configuration architecture" recording whole-document rejection as the rejected alternative, and a CHANGELOG entry.Closes #314