From e63ebfc3238366b8b86b6da5e4a44dd5b800087e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Sat, 23 May 2026 14:13:02 +0300 Subject: [PATCH] fix(registry): schema tightening per code review (I-1/I-2/I-3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I-1: weight range 0-1 added to classification + file_pattern trigger variants (раньше было только на keyword) — иначе weight=50 silent ranking-bug в Task 3 indexByTrigger. I-2: additionalProperties:false на 3 trigger-variant объекты — ясная ajv-ошибка при mixed-key (keyword+classification одновременно). I-3: additionalProperties:false на definitions.node и definitions.chain — typo ("categori" / "keywrod") теперь reject'ится, не silently accepted. Smoke-проверка: 3 теста — weight=50 reject, typo categori reject, valid accept. ajv compile OK. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/observer/STATUS.md | 8 ++++---- docs/registry/schema.json | 12 +++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/docs/observer/STATUS.md b/docs/observer/STATUS.md index 7b4ee94f..c8f63bbb 100644 --- a/docs/observer/STATUS.md +++ b/docs/observer/STATUS.md @@ -1,6 +1,6 @@ # Brain Status (auto-generated) -Last updated: 2026-05-23T11:03:19.578Z +Last updated: 2026-05-23T11:06:03.368Z | Контролёр | Состояние | Детали | |---|---|---| @@ -8,13 +8,13 @@ Last updated: 2026-05-23T11:03:19.578Z | C2 Cross-ref consistency | ✅ | [cross-ref-checker] OK — 0 drift in 4 files | | C3 Observer-of-observer | ✅ | [observer-of-observer] OK — last read 0 week(s) ago | | C4 Сигнальный статус | ✅ | This file (self-reference) | -| C5 Observer-coverage | ⚠️ | 152 episode(s) this month · Stop-hook + post-commit OK · 21 missed activation(s) — see /brain-retro | +| C5 Observer-coverage | ⚠️ | 153 episode(s) this month · Stop-hook + post-commit OK · 21 missed activation(s) — see /brain-retro | | C6 Chain map sync | ✅ | [chain-map-checker] OK — 16 chains in sync | ## Метрики (информационные, не алерты) -- Observer evidence: 152 episodes this month, 0 observer_error markers, 74 PII matches before filter -- Legacy v1 episodes (not in factor analysis): 13 +- Observer evidence: 153 episodes this month, 0 observer_error markers, 74 PII matches before filter +- Legacy v1 episodes (not in factor analysis): 14 - Last /brain-retro: 0 day(s) ago - Использование узлов: см. `/brain-retro` (раз в спринт). missed_activations: 21. **Неиспользованные узлы — не алерт, если профильной задачи не было** (Pravila §16.4 v1.36; capability-readiness; см. memory `feedback_brain_unused_tools_not_problem` — outside-repo memory store). diff --git a/docs/registry/schema.json b/docs/registry/schema.json index 1b39e81a..547424f5 100644 --- a/docs/registry/schema.json +++ b/docs/registry/schema.json @@ -33,9 +33,9 @@ "type": "array", "items": { "oneOf": [ - { "type": "object", "required": ["keyword"], "properties": { "keyword": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } } }, - { "type": "object", "required": ["classification"], "properties": { "classification": { "type": "string" }, "weight": { "type": "number" } } }, - { "type": "object", "required": ["file_pattern"], "properties": { "file_pattern": { "type": "string" }, "weight": { "type": "number" } } } + { "type": "object", "required": ["keyword"], "properties": { "keyword": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false }, + { "type": "object", "required": ["classification"], "properties": { "classification": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false }, + { "type": "object", "required": ["file_pattern"], "properties": { "file_pattern": { "type": "string" }, "weight": { "type": "number", "minimum": 0, "maximum": 1 } }, "additionalProperties": false } ] } }, @@ -56,7 +56,8 @@ "items": { "type": "string", "pattern": "^L\\d+$" } }, "attributes": { "type": "object" } - } + }, + "additionalProperties": false }, "chain": { "type": "object", @@ -65,7 +66,8 @@ "name": { "type": "string" }, "sequence": { "type": "array", "items": { "type": "string" }, "minItems": 2 }, "triggers": { "type": "array" } - } + }, + "additionalProperties": false } } }