закрыты известные остатки

- документ самоуправления объявляется ключом governance, а не угадывается
  по «он один и без ключей оси»: конвенция, потерявшая topic, была от него
  неотличима и тихо теряла все проверки об отъезде к потребителю
- проверка путей канона больше не ловит README.md и READING.md — эти два
  имени значат что-то и на стороне потребителя
- lang.Recognize требует совпадения и слов, и номера версии; директории
  компонентов сверяются на вложенность, а не только на равенство
- у обеих проверок появился --json, а convy sync называет ссылки на темы,
  которых компонент не взял
This commit is contained in:
av
2026-07-28 10:16:27 +03:00
parent 29d29740f5
commit 600aba5ee3
16 changed files with 413 additions and 70 deletions
+6 -9
View File
@@ -298,22 +298,19 @@ func Lookup(version int, code string) (Vocabulary, error) {
// and by nothing else: no manifest travels with it, and no path back to the
// suite is written anywhere in it. So a check run outside a suite learns which
// words are normative the same way a reader does — off the line the document
// carries. The version number decides between vocabularies naming the same
// words, which is what two versions of one natural language would do.
// carries. Both halves have to agree: the words say which natural language,
// the number says which version of the language, and two versions of one
// natural language would otherwise be told apart by nothing at all.
func Recognize(text string) (Vocabulary, bool) {
var best Vocabulary
for _, version := range sortedVersions() {
for _, code := range sortedCodes(version) {
v := registry[version][code]
if !namesAll(text, v.Words()) {
continue
}
if best.Version == 0 || matchesVersion(text, v.Version) {
best = v
if namesAll(text, v.Words()) && matchesVersion(text, v.Version) {
return v, true
}
}
}
return best, best.Version != 0
return Vocabulary{}, false
}
func namesAll(text string, words []string) bool {