Add repo-family metadata to Fabric registry
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 3s

This commit is contained in:
codex 2026-07-25 18:08:57 +02:00
parent 3240b78185
commit 0ea99a73d8
15 changed files with 189 additions and 32 deletions

View file

@ -35,6 +35,7 @@ def test_registry_accepts_snapshot_and_queries_graph(tmp_path: Path) -> None:
"slug": "railiance-fabric",
"name": "Railiance Fabric",
"remote_url": "https://example.invalid/railiance-fabric.git",
"repo_family": "ownership",
}
)
@ -78,6 +79,7 @@ def test_registry_accepts_snapshot_and_queries_graph(tmp_path: Path) -> None:
libraries = store.ingest_cyclonedx("railiance-fabric", _cyclonedx_bom())
assert snapshot["repo_slug"] == "railiance-fabric"
assert store.get_repository("railiance-fabric")["repo_family"] == "ownership"
assert changed_snapshot["commit"] == "test-commit-2"
assert artifact["artifact_type"] == "openapi"
assert libraries["component_count"] == 2
@ -469,6 +471,7 @@ def test_registry_sync_manifest_registers_multiple_repos(tmp_path: Path) -> None
" name: Railiance Fabric",
f" path: {Path('.').resolve()}",
" commit: manifest-commit",
" repo_family: ownership",
f" sbom: {sbom_path.name}",
" - slug: missing-repo",
" name: Missing Repo",
@ -491,6 +494,7 @@ def test_registry_sync_manifest_registers_multiple_repos(tmp_path: Path) -> None
repositories = {repo["slug"]: repo for repo in store.list_repositories()}
assert set(repositories) == {"missing-repo", "railiance-fabric"}
assert repositories["railiance-fabric"]["repo_family"] == "ownership"
assert store.latest_snapshot("railiance-fabric")["commit"] == "manifest-commit"
assert store.list_snapshots("missing-repo") == []
assert store.list_libraries(repo_slug="railiance-fabric")[0]["name"] == "jsonschema"