Development record
Two private duplicate-key walkers survive beside the canonical jsonstrict check: layered.refuseDuplicateKeys (internal/core/layered/layered.go) and reading.refuseDuplicateKeys (internal/core/reading/scope.go). Neither folds key case the way encoding/json binds struct fields, and the reading-preset walker checks only the keys directly under the presets/positions container, so a key repeated inside one entry (a second kinds or window block under a reviewed position) is read last-wins by the strict decoder: the review-evasion vector the walker's own comment names. One primitive, rerouted, closes both.
Two private duplicate-key walkers survive beside the canonical jsonstrict check: layered.refuseDuplicateKeys (internal/core/layered/layered.go) and reading.refuseDuplicateKeys (internal/core/reading/scope.go). Neither folds key case the way encoding/json binds struct fields, and the reading-preset walker checks only the keys directly under the presets/positions container, so a key repeated inside one entry (a second kinds or window block under a reviewed position) is read last-wins by the strict decoder: the review-evasion vector the walker's own comment names. One primitive, rerouted, closes both.
Grounds
- pursued: one duplicate-key primitive serves all four JSON trust boundaries, so a key repeated at any depth or in any case spelling of a preset or layered config file is refused; a key repeated inside a preset entry loading (TestKeysRepeatedInsideAPositionEntryAreRefused) would show it wrong
Frontmatter
| id | iss-2609252251317108 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609252251317108-two-private-duplicate-key-walkers.md
open on GitHub ↗ · commit history ↗