Repository navigation
Recurring defect class: sibling paths enforce weaker subsets of the same contract #451
Copy link
Copy link
Open
3 / 33 of 3 issues completedOpen
3 / 33 of 3 issues completed
Copy link
Description
Readiness: needs-decision — owner picks a prevention home.
Class
When a second path faces the same contract — a tolerant carry, a new validation entry point, source_edit beside write, CLI beside library, a scoped beside an unscoped query — it reimplements a weaker subset of the established path's checks instead of sharing them. The new path accepts what its sibling rejects, or produces what its sibling cannot consume.
Evidence
Same underlying mistake in 8 independent merged PRs (retrospective window 2026-10-05 → 2026-10-15):
- Refs feat(lookup): answer canonical Workshop name, signature, and settings queries #378 (2026-10-05) — signature rendering spelled enum defaults
Domain.Memberwhile the emitter writesDomain(Member)/bare; fixed by delegating to the sharedenum_member_formhelper. - Refs feat(lookup): scoped child lookup via Catalog::lookup_within #386 (2026-10-06) — scoped lookup ignored the requested locale and let wildcard segments accept arbitrary scope values; fixed in review.
- Refs feat(settings): warn on near-misses of declared settings members (#403) #406 (2026-10-09, Refs Misspelled declared settings values and list keys are accepted without a diagnostic #403) — verbatim carriage silently accepted misspelled declared members the strict path used to reject with a did-you-mean.
- Refs feat(settings): carry blocks under catalogued keys as written #413 (2026-10-09, Refs Settings blocks under catalogued keys are rejected instead of carried #412) — blocks under catalogued keys rejected at parse/check/emit while uncatalogued siblings carried.
- Refs feat(settings): emit pass-through member blocks verbatim at resolved positions #424 (2026-10-11, Refs Emission has no verbatim escape for pass-through members at catalogued paths #417) — emission re-validated pass-through members at catalogued paths that parse/check had carried.
- Refs fix(settings): unify non-leaf occurrence rejection in source_edit and write #435 (2026-10-13, Refs SettingDefinition::source_edit corrupts source when the occurrence is a group #426) —
source_editskippedwrite's non-leaf rejection and produced a corrupting edit range. - Refs fix(settings): reject hero settings members for slots the hero lacks #438 (2026-10-13, Refs Settings: check accepts input that emit mishandles for wrecking ball, mode-inherited keys, and rowless hero ability keys #429) —
checkaccepted hero settings membersemitcannot emit. - Refs test(parser): cover surplus action arguments in canonical arity validation #439 (2026-10-13, Refs CLI parse/emit/convert accept actions with surplus arguments #430) — CLI
program.validate()skipped the canonical-ID validation the corpus path runs, so surplus arguments passed.
Every fix converged on sharing or mirroring the sibling's check.
Ask
Owner chooses the smallest effective prevention home, in preference order:
- executable regression/property tests asserting sibling paths agree on shared inputs;
- a contract rule in this repository's
AGENTS.md; - sharpening an existing organization policy rule.
Recorded in docs/LESSONS.md via the merged-work retrospective.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
e54-bot commentedon Oct 15, 2026
Decision (owner):
writevssource_edit,checkvsemit, CLIprogram.validate()vs corpus validation), asserting both paths agree on the same inputs. Tracked as follow-up work.AGENTS.mdrule: a new sibling path must reuse the established path's checks instead of reimplementing a subset.Rationale: this is the most frequent class (8 PRs) and review alone did not catch it, so an executable check is preferred over a text-only rule.
e54-bot commentedon Oct 17, 2026
Retrospective update (merged-work window 2026-10-13 → 2026-10-17) — two additions to the evidence:
writeandsource_editvalidation gates had diverged; unified behind an agreement matrix driving everywriterejection class throughsource_edit. Ninth instance of this class in the window.inspectrefused provider-backed input every sibling accepted), both merged 2026-10-13. Recorded in wright'sdocs/LESSONS.mdvia docs: update merged-work lessons (2026-10-13 → 2026-10-17) wright#729.Prevention progress since this issue opened: the contract rule landed in
AGENTS.mdvia #457 and the repository principledocs/principles/sibling-paths-share-the-contract.mdvia #472.