Skip to content

docs: close TODO-0196 — duplicate field names rejected - #74

Merged
edochi merged 1 commit into
mainfrom
docs/close-todo-0196
Aug 20, 2026
Merged

docs: close TODO-0196 — duplicate field names rejected#74
edochi merged 1 commit into
mainfrom
docs/close-todo-0196

Conversation

@edochi

@edochi edochi commented Aug 20, 2026

Copy link
Copy Markdown
Owner

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 todo while its implementation was already on main.

Changes

TODO-0196.md

  • Frontmatter → status: done, completed: 2026-08-20, files_updated: [crates/mdvs/src/schema/config.rs]
  • New ## 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 questionresolved. Exact match, because case-insensitive rejection would be wrong rather than merely stricter: YAML keys are case-sensitive, so status and Status are genuinely different frontmatter fields and a vault using both is legal.
  • ## Details retained below as the historical spec, matching how TODO-0107 was closed.

index.md — 0196 row flipped to done.

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 repeating type on 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.

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>
@edochi
edochi merged commit 2715625 into main Aug 20, 2026
8 checks passed
@edochi
edochi deleted the docs/close-todo-0196 branch August 20, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant