docs: close TODO-0196 — duplicate field names rejected - #74
Merged
Conversation
Marks 0196 done. The fix shipped as invariant 10 in PR #73; the TODO was written on a separate branch and never flipped once that merged. Records the decision behind the rule: duplicates are rejected on the name alone, regardless of whether the entries agree on type. The alternative — accepting repeated entries with matching types and merging them — would have turned the config someone writes by instinct into the eventual per-directory-constraint syntax. Ruled out, because scoping a field per directory belongs to TODO-0194's `[[scope]]` design rather than something a repeated entry backs into, and because repeating `type` on every entry suggests it could legitimately differ when it cannot. The likely future syntax is constraint blocks nested inside a single `[[fields.field]]`, keeping "one entry per name" true permanently. Also resolves the open question the TODO left on case sensitivity: exact match, because case-insensitive rejection would forbid a legal vault — YAML keys are case-sensitive, so `status` and `Status` are different fields. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bookkeeping. Specs only, no behaviour change.
The fix shipped as invariant 10 in #73, but TODO-0196 was written on a separate branch (#71) and never flipped once that merged, so it sat at
todowhile its implementation was already onmain.Changes
TODO-0196.mdstatus: done,completed: 2026-08-20,files_updated: [crates/mdvs/src/schema/config.rs]## Resolution— the shipped error message, the fact that rejection happens at config load so every command surfaces it (exit 2), and the placement and exact-match reasoning. Sub-sections cover the type-ignored decision, the invariant 9 docstring fix, and verification.### Open question→ resolved. Exact match, because case-insensitive rejection would be wrong rather than merely stricter: YAML keys are case-sensitive, sostatusandStatusare genuinely different frontmatter fields and a vault using both is legal.## Detailsretained below as the historical spec, matching how TODO-0107 was closed.index.md— 0196 row flipped todone.The decision worth recording
Duplicates are rejected on the name alone, regardless of whether the entries agree on type (decision 2026-08-20).
The alternative was accepting repeated entries when their types match and merging them — which would have made the config someone writes by instinct into the eventual per-directory-constraint syntax. Ruled out on two grounds: scoping a field per directory is a deliberate feature belonging to TODO-0194's
[[scope]]design rather than something a repeated entry backs into, and repeatingtypeon every entry suggests it could legitimately differ when it cannot.So the likely future syntax is constraint blocks nested inside a single
[[fields.field]], keeping "one entry per name" true permanently. A test pins the current rule so it isn't relaxed by accident; relaxing it later would stay backward-compatible either way, since configs that error would start working and none that work would start failing.0194 and 0195 remain
todo— only the duplicate-name bug was fixed.