From 4ab79fc44a9c7e7c9e9258d0ba099b5691b17c04 Mon Sep 17 00:00:00 2001 From: Teakowa Date: Wed, 21 Oct 2026 00:56:37 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20update=20merged-work=20lessons=20(2026-?= =?UTF-8?q?10-20=20=E2=86=92=202026-10-21)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record the shared-authority class from the #534 review finding: statement_from_content re-derived the arity rule validate_call_signature owns. Same class as the sibling-surface divergences tracked in wrightkit/workshop-rs#451. --- docs/LESSONS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/LESSONS.md b/docs/LESSONS.md index 8f79822..1216d5f 100644 --- a/docs/LESSONS.md +++ b/docs/LESSONS.md @@ -25,3 +25,9 @@ Short review queue of reusable failure classes from merged workshop-rs work. Eac - **Why:** `Catalog::lookup` required a folded query of three characters before substring matching, so two-character CJK words that appear inside many display names (阈值, 变量) returned no entries. - **Prevention home:** the two-character CJK regression landed in #508; authoring review of thresholds against multi-script input. - **Incidents:** [#508](https://github.com/wrightkit/workshop-rs/pull/508) (fixes [#497](https://github.com/wrightkit/workshop-rs/issues/497)) — observed 2026-10-19 + +### A second consumer shares the established rule instead of re-deriving it +- **Rule:** When new code must enforce a rule an existing path already defines — argument-count acceptance, input membership, locale resolution — call or extract the shared authority. A copied subset drifts independently and was the recurring class in `wrightkit/workshop-rs#451`. +- **Why:** `statement_from_content`'s arity check copied the rule `validate_call_signature` already enforces (undeclared-signature skip, folded player-variable +1, required..total range, variadic); review caught the reimplementation, and the same class recurred in `opy-rs#623` within days. +- **Prevention home:** existing contract — this repository's `AGENTS.md` "Sibling paths share checks"; the shared `CatalogEntry::rejected_arity` and agreement test landed in #534. +- **Incidents:** [#534](https://github.com/wrightkit/workshop-rs/pull/534) review finding — observed 2026-10-20