Project repo-family relations from local declarations
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 2s

This commit is contained in:
codex 2026-07-26 08:51:29 +02:00
parent 1d8f59f1de
commit 9af9ee3e72
13 changed files with 671 additions and 28 deletions

View file

@ -61,12 +61,14 @@ _LAYER_COLORS = {
_EDGE_STRENGTH = {
"built_from": "medium",
"binds_rapp": "strong",
"depends_on": "medium",
"deploys": "strong",
"evidenced_by": "medium",
"exposes": "strong",
"flows_to": "medium",
"governed_by": "medium",
"hosts_rail": "strong",
"implements": "medium",
"observed_by": "medium",
"part_of": "weak",
@ -86,6 +88,7 @@ _EDGE_STRENGTH = {
"resolves_to": "medium",
"runs_on": "strong",
"owns_deployment": "weak",
"supports_rail": "medium",
}
@ -325,6 +328,7 @@ def fabric_graph_explorer_payload(
source_repo_slugs = {
str(node.get("repo", "")).strip()
for node in source_nodes
if str(node.get("kind", "")) != "Repository"
if str(node.get("repo", "")).strip()
}
registered_repo_slugs = {
@ -347,6 +351,12 @@ def fabric_graph_explorer_payload(
and str(node.get("id", ""))
and str(node.get("repo", "")).strip()
}
repository_source_references = {
str(node.get("repo", "")).strip(): _source_references(node)
for node in source_nodes
if str(node.get("kind", "")) == "Repository"
and str(node.get("repo", "")).strip()
}
for slug in sorted(repo_slugs):
repo = repository_index.get(slug, {})
has_snapshot = slug in snapshot_repo_slugs or slug in source_repo_slugs
@ -383,7 +393,7 @@ def fabric_graph_explorer_payload(
"displayState": "show",
"visibilitySource": "default",
"visibilityReason": "default",
"sourceReferences": [],
"sourceReferences": repository_source_references.get(slug, []),
"deepLinks": _repository_links(repo),
},
"classes": "repository accepted" if has_snapshot else "repository candidate unresolved",