feat(media-routing): implement 007 media article routing, runtime architecture diagram and update graphify knowledge graph

This commit is contained in:
2026-08-25 01:20:49 -03:00
parent d2d1aad001
commit 47b5215541
45 changed files with 290741 additions and 68310 deletions
+21 -13
View File
@@ -27,9 +27,15 @@ import yaml
SCOPED_PYTHON_PATHS = [
"src/runtime",
"tests/runtime",
"scripts/extract_article_contents.py",
"tests/unit",
"tests/integration",
]
CONTRACT_SCHEMA_DIR = "specs/006-article-consolidation-runtime/contracts"
CONTRACT_SCHEMA_DIRS = [
"specs/006-article-consolidation-runtime/contracts",
"specs/007-media-article-routing/contracts",
]
PROMPTFOO_CONFIG_PATHS = [
"evals/promptfoo.config.yaml",
]
@@ -90,10 +96,11 @@ class RegexASTVisitor(ast.NodeVisitor):
def check_python_ast(root: Path) -> List[str]:
violations: List[str] = []
for scoped_rel in SCOPED_PYTHON_PATHS:
target_dir = root / scoped_rel
if not target_dir.exists():
target_path = root / scoped_rel
if not target_path.exists():
continue
for py_file in target_dir.rglob("*.py"):
py_files = [target_path] if target_path.is_file() else list(target_path.rglob("*.py"))
for py_file in py_files:
try:
content = py_file.read_text(encoding="utf-8")
tree = ast.parse(content, filename=str(py_file))
@@ -107,16 +114,17 @@ def check_python_ast(root: Path) -> List[str]:
def check_json_schemas(root: Path) -> List[str]:
violations: List[str] = []
schema_dir = root / CONTRACT_SCHEMA_DIR
if not schema_dir.exists():
return violations
for schema_rel in CONTRACT_SCHEMA_DIRS:
schema_dir = root / schema_rel
if not schema_dir.exists():
continue
for schema_file in schema_dir.glob("*.schema.json"):
try:
data = json.loads(schema_file.read_text(encoding="utf-8"))
_find_json_pattern_keys(data, str(schema_file), violations)
except Exception as e:
violations.append(f"{schema_file} - Failed to parse JSON: {e}")
for schema_file in schema_dir.glob("*.schema.json"):
try:
data = json.loads(schema_file.read_text(encoding="utf-8"))
_find_json_pattern_keys(data, str(schema_file), violations)
except Exception as e:
violations.append(f"{schema_file} - Failed to parse JSON: {e}")
return violations