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
@@ -78,6 +78,8 @@ repoctl discover --root C:/Users/example/Git --output json
|
||||
|
||||
Обходит указанный каталог, находит все `ops/contract.yaml`, строит `CatalogIndex` — детерминированно отсортированный список репозиториев с их типом, lifecycle и hash контракта. Не следует по symlink, пропускает `.git`, `.venv`, `node_modules` и подобные. Дублирующиеся имена репозиториев — ошибка (`CATALOG_REPOSITORY_DUPLICATE`).
|
||||
|
||||
Репозиторием считается корень git-репозитория. Контракт, лежащий внутри рабочего дерева другого репозитория — fixture, example, vendored copy — это его содержимое, а не равноправный сосед: такой путь в каталог не попадает и сообщается как `CATALOG_NESTED_CONTRACT_SKIPPED` (severity `info`).
|
||||
|
||||
### `describe` — паспорт одного репозитория
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user