fix(discover): a contract inside another repository is not a repository
`tests/fixtures/positive/` holds four valid contracts. Running `discover` over the machine's Git directory returned six repositories: two real ones and those four, with nothing in the output to tell them apart. Any catalog-wide question -- which repositories lack an owner, which are behind the template version -- was answered over a set that included this project's own test material. A repository is the root of a git repository. A directory holding ops/contract.yaml somewhere inside another repository's working tree is that repository's content: a fixture, an example, a vendored copy. Skip it, and say so with CATALOG_NESTED_CONTRACT_SKIPPED rather than silently, so a genuinely misplaced contract is still visible. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
d7a506a5d9
commit
c21ffceef3
+1
-1
@@ -53,7 +53,7 @@ repoctl adopt --repo PATH --mode assess|plan|apply|verify
|
||||
## Поведение инструментов
|
||||
|
||||
- `validate` проверяет schemas, IDs, ссылки, content roots, path/symlink confinement, freshness, provenance, secret-shaped поля, operations без shell strings, Markdown links/frontmatter/YAML fences, сбалансированные code fences и статический синтаксис Mermaid.
|
||||
- `discover` ищет `ops/contract.yaml`, не следует по symlink/junction, пропускает `.git`, virtual environments и dependency caches, строит детерминированный `CatalogIndex`, capability/requirement/binding relations и выявляет дубликаты repository ID.
|
||||
- `discover` ищет `ops/contract.yaml`, не следует по symlink/junction, пропускает `.git`, virtual environments и dependency caches, не считает репозиторием контракт, лежащий внутри рабочего дерева другого репозитория (fixture, example, vendored copy — это его содержимое, а не равноправный сосед; такой путь сообщается как `CATALOG_NESTED_CONTRACT_SKIPPED`), строит детерминированный `CatalogIndex`, capability/requirement/binding relations и выявляет дубликаты repository ID.
|
||||
- `describe` читает только contract и никогда не загружает KDB.
|
||||
- `context` по умолчанию возвращает компактный bundle: topic data, document metadata, selectors/headings, operations и content roots. `--materialize` извлекает только явно выбранные Markdown-разделы или ограниченные YAML key paths; сеть не используется.
|
||||
- Budget считается в UTF-8 bytes только для materialized content. Элементы сортируются детерминированно; усечение всегда отражается warning и при `--strict` даёт exit `4`.
|
||||
|
||||
Reference in New Issue
Block a user